function galleria_form_optionset_add_submit in Galleria 7
Submit handler for adding a new option set.
File
- includes/
galleria.admin.inc, line 76 - Administrative page callbacks for the galleria module.
Code
function galleria_form_optionset_add_submit($form, &$form_state) {
ctools_include('export');
$optionset = ctools_export_crud_new('galleria_optionset');
$optionset->name = $form_state['values']['name'];
$optionset->title = $form_state['values']['title'];
$optionset->options = array(
'height' => 300,
'width' => 450,
);
$saved = ctools_export_crud_save('galleria_optionset', $optionset);
drupal_set_message(t('Option set %name was created.', array(
'%name' => $optionset->name,
)));
$form_state['redirect'] = 'admin/config/media/galleria/edit/' . $optionset->name;
}