You are here

function panels_mini_context_form_submit in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_mini/panels_mini.admin.inc \panels_mini_context_form_submit()

Process submission of the mini panel edit form.

File

panels_mini/panels_mini.module, line 679
panels_mini.module

Code

function panels_mini_context_form_submit($form_id, $form_values) {
  $panel_mini = $form_values['panel_mini'];

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