You are here

function popup_ui_form_formatters_submit in Popup 7

Same name and namespace in other branches
  1. 8 modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters_submit()
  2. 7.x modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters_submit()
  3. 6.x modules/popup_ui/includes/popup_ui.admin.inc \popup_ui_form_formatters_submit()

File

modules/popup_ui/includes/popup_ui.admin.inc, line 342

Code

function popup_ui_form_formatters_submit(&$form, &$form_state) {
  module_load_include('inc', 'popup_ui', 'includes/popup_ui.util');
  $values = $form_state['values'];
  $formatters = array();
  foreach ($form_state['values']['format_forms'] as $label => $fieldset) {
    $row = $fieldset['fieldset']['fields'];
    if ($row['label']) {
      $formatters[$row['label']] = $row;
    }
  }
  _popup_ui_formatter_settings($formatters);
  _popup_ui_flush_all();
  drupal_set_message(t('The popup filters have been saved.'));
  $form['#redirect'] = array(
    'admin/config/user-interface/popup/formats',
  );
}