You are here

function panels_mini_context_form_submit in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_mini/panels_mini.module \panels_mini_context_form_submit()

Process submission of the mini panel edit form.

File

panels_mini/panels_mini.admin.inc, line 614
Administrative items for the panels mini module.

Code

function panels_mini_context_form_submit($form, &$form_state) {
  $panel_mini = $form_state['panel_mini'];

  // Organize these from the common form.
  panels_common_save_context('requiredcontext', $panel_mini->requiredcontexts, $form_state['values']);
  drupal_set_message(t('Your changes have been saved.'));
  panels_mini_save($panel_mini);
  panels_cache_clear('panel_object:panel_mini', $panel_mini->name);
  if ($form_state['values']['submit'] == t('Save and proceed')) {
    $form_state['redirect'] = "admin/panels/panel-mini/{$panel_mini->name}/edit-content";
  }
}