function pagerer_pane_form_submit in Pagerer 7
Pane level settings form - submission.
File
- ./
pagerer.admin.inc, line 701 - Pagerer administration
Code
function pagerer_pane_form_submit($form, &$form_state) {
// Get pagerer preset.
$preset_name = $form_state['build_info']['args'][0];
$preset = _pagerer_get_preset($preset_name);
// Pane to be configured.
$pane = $form_state['build_info']['args'][1];
$p = $pane . '_pane';
$v = $form_state['values'];
$preset[$p]['theme_variables']['pager_breaker'] = $v['pager_breaker'];
$preset[$p]['theme_variables']['pager_separator'] = $v['pager_separator'];
$preset[$p]['theme_variables']['range_separator'] = $v['range_separator'];
$preset[$p]['theme_variables']['display_restriction'] = $v['display_restriction'];
$preset[$p]['theme_variables']['display'] = $v['display'];
$preset[$p]['theme_variables']['quantity'] = $v['quantity'];
$preset[$p]['theme_variables']['label_display'] = $v['label_display'];
$preset[$p]['theme_variables']['current_display'] = $v['current_display'];
$preset[$p]['theme_variables']['total_display'] = $v['total_display'];
$preset[$p]['theme_variables']['first_link'] = $v['first_link'];
$preset[$p]['theme_variables']['previous_link'] = $v['previous_link'];
$preset[$p]['theme_variables']['next_link'] = $v['next_link'];
$preset[$p]['theme_variables']['last_link'] = $v['last_link'];
if (isset($v['progr_links'])) {
$preset[$p]['theme_variables']['progr_links'] = $v['progr_links'];
}
if (isset($v['factors'])) {
$preset[$p]['theme_variables']['factors'] = $v['factors'];
}
$preset[$p]['theme_variables']['widget_resize'] = $v['widget_resize'];
$preset[$p]['theme_variables']['slider_action'] = $v['slider_action'];
$preset[$p]['theme_variables']['slider_action_timelapse'] = $v['slider_action_timelapse'];
$preset[$p]['theme_variables']['slider_navigation_icons'] = $v['slider_navigation_icons'];
_pagerer_save_preset($preset_name, $preset);
drupal_set_message(t('The pane configuration has been saved.'), 'status');
$form_state['redirect'] = _PAGERER_CONFIG_PATH . '/edit/' . $preset_name;
}