You are here

function galleria_optionset_form_delete_submit in Galleria 7

Submit handler for deleting an option set.

File

includes/galleria.admin.inc, line 882
Administrative page callbacks for the galleria module.

Code

function galleria_optionset_form_delete_submit($form, &$form_state) {
  $optionset =& $form_state['optionset'];
  $op = $optionset->export_type & EXPORT_IN_CODE ? 'reverted' : 'deleted';
  ctools_include('export');
  ctools_export_crud_delete('galleria_optionset', $optionset);
  drupal_set_message(t('Option set %name was ' . $op . '.', array(
    '%name' => $optionset->name,
  )));
  $form_state['redirect'] = 'admin/config/media/galleria';
}