function flag_form_submit in Flag 5
Same name and namespace in other branches
- 8.4 flag.module \flag_form_submit()
- 6.2 includes/flag.admin.inc \flag_form_submit()
- 6 includes/flag.admin.inc \flag_form_submit()
- 7.3 includes/flag.admin.inc \flag_form_submit()
- 7.2 includes/flag.admin.inc \flag_form_submit()
Add/Edit flag form submit.
File
- includes/
flag.admin.inc, line 403 - Contains administrative pages for creating, editing, and deleting flags.
Code
function flag_form_submit($form_id, $form_values) {
$flag = $form_values['_flag'];
unset($form_values['_flag']);
$flag
->form_input($form_values);
$flag
->save();
$flag
->enable();
drupal_set_message(t('Flag @name has been saved.', array(
'@name' => $flag
->get_title(),
)));
_flag_clear_cache();
return 'admin/build/flags';
}