You are here

function flag_form_submit in Flag 6.2

Same name and namespace in other branches
  1. 8.4 flag.module \flag_form_submit()
  2. 5 includes/flag.admin.inc \flag_form_submit()
  3. 6 includes/flag.admin.inc \flag_form_submit()
  4. 7.3 includes/flag.admin.inc \flag_form_submit()
  5. 7.2 includes/flag.admin.inc \flag_form_submit()

Add/Edit flag form submit.

File

includes/flag.admin.inc, line 538
Contains administrative pages for creating, editing, and deleting flags.

Code

function flag_form_submit($form, &$form_state) {
  $flag = $form['#flag'];
  $flag
    ->form_input($form_state['values']);
  $flag
    ->save();
  $flag
    ->enable();
  drupal_set_message(t('Flag @name has been saved.', array(
    '@name' => $flag
      ->get_title(),
  )));
  _flag_clear_cache();
  $form_state['redirect'] = 'admin/build/flags';
}