function panels_stylizer_edit_pane_style_form_submit in Panels 6.3
Same name and namespace in other branches
- 7.3 plugins/styles/stylizer.inc \panels_stylizer_edit_pane_style_form_submit()
Store the preconfigured values.
1 string reference to 'panels_stylizer_edit_pane_style_form_submit'
- panels_stylizer_pane_add_style in plugins/
styles/ stylizer.inc - Allow on-the-fly creation of styles in panes.
File
- plugins/
styles/ stylizer.inc, line 332 - Definition of the 'stylizer' panel style.
Code
function panels_stylizer_edit_pane_style_form_submit(&$form, &$form_state) {
if (!user_access('administer panels styles')) {
return;
}
// Only validate if preconfigured is checked.
if ($form_state['values']['preconfigured'] && !empty($form_state['clicked_button']['#wizard type'])) {
$form_state['owner info']['owner settings']['admin_title'] = $form_state['values']['admin_title'];
$form_state['owner info']['owner settings']['admin_description'] = $form_state['values']['admin_description'];
// Clean up preview files before we set the name
ctools_stylizer_cleanup_style($form_state['plugin'], $form_state['settings']);
$form_state['settings']['name'] = $form_state['values']['name'];
$form_state['name'] = $form_state['values']['name'];
$form_state['owner info']['owner settings']['preconfigured'] = $form_state['values']['preconfigured'];
}
}