function styleguide_palette_swatch_delete_form_submit in Style Guide 7
Form submission handler for styleguide_palette_swatch_delete_form().
File
- styleguide_palette/
styleguide_palette.admin.inc, line 200 - Administrative page callbacks for the Style Guide Swatch module.
Code
function styleguide_palette_swatch_delete_form_submit($form, &$form_state) {
$swatch = styleguide_palette_swatch_load($form_state['values']['swatch_id']);
styleguide_palette_swatch_delete($form_state['values']['swatch_id']);
watchdog('styleguid_palette', 'Deleted %title.', array(
'%title' => $swatch['name'],
));
drupal_set_message(t('%title has been deleted.', array(
'%title' => $swatch['name'],
)));
$form_state['redirect'] = 'admin/config/user-interface/styleguide-palette/edit/' . $swatch['theme'];
}