You are here

function pagerer_preset_add_form_submit in Pagerer 7

Preset add form - submission.

File

./pagerer.admin.inc, line 352
Pagerer administration

Code

function pagerer_preset_add_form_submit($form, &$form_state) {
  $preset_name = $form_state['values']['name'];
  $theme_registry = theme_get_registry();
  $preset = $theme_registry['pagerer']['variables'];
  _pagerer_save_preset($preset_name, $preset);
  drupal_set_message(t('Preset %name was created.', array(
    '%name' => $preset_name,
  )));
  $form_state['redirect'] = _PAGERER_CONFIG_PATH . '/edit/' . $preset_name;
}