function flexslider_form_optionset_edit_submit in Flex Slider 7
Submit handler for 'Save option set' button; Save the changed option set.
File
- ./
flexslider.admin.inc, line 357 - Administrative page callbacks for the flexslider module.
Code
function flexslider_form_optionset_edit_submit($form, &$form_state) {
$optionset =& $form_state['optionset'];
$optionset->title = $form_state['values']['title'];
//$optionset['theme'] = $form_state['values']['theme'];
//$optionset['imagestyle_thumb'] = $form_state['values']['image_styles']['thumb'];
$optionset->imagestyle_normal = $form_state['values']['image_style']['normal'];
//$optionset['imagestyle_big'] = $form_state['values']['image_styles']['big'];
// Assign the values to the option set
$optionset->options['animation'] = $form_state['values']['animation'];
$optionset->options['animationDuration'] = (int) $form_state['values']['animationDuration'];
$optionset->options['slideDirection'] = $form_state['values']['slideDirection'];
$optionset->options['slideshow'] = $form_state['values']['slideshow'];
$optionset->options['slideshowSpeed'] = (int) $form_state['values']['slideshowSpeed'];
$optionset->options['animationLoop'] = $form_state['values']['animationLoop'];
$optionset->options['randomize'] = $form_state['values']['randomize'];
$optionset->options['slideToStart'] = (int) $form_state['values']['slideToStart'];
$optionset->options['directionNav'] = $form_state['values']['directionNav'];
$optionset->options['controlNav'] = $form_state['values']['controlNav'];
$optionset->options['keyboardNav'] = $form_state['values']['keyboardNav'];
$optionset->options['mousewheel'] = $form_state['values']['mousewheel'];
$optionset->options['prevText'] = $form_state['values']['prevText'];
$optionset->options['nextText'] = $form_state['values']['nextText'];
$optionset->options['pausePlay'] = $form_state['values']['pausePlay'];
$optionset->options['pauseText'] = $form_state['values']['pauseText'];
$optionset->options['playText'] = $form_state['values']['playText'];
$optionset->options['pauseOnAction'] = $form_state['values']['pauseOnAction'];
$optionset->options['controlsContainer'] = $form_state['values']['controlsContainer'];
$optionset->options['manualControls'] = $form_state['values']['manualControls'];
ctools_include('export');
ctools_export_crud_save('flexslider_optionset', $optionset);
drupal_set_message(t('Option set %name changed.', array(
'%name' => $optionset->name,
)));
$form_state['redirect'] = 'admin/config/media/flexslider';
}