You are here

function flag_actions_delete_form in Flag 5

Same name and namespace in other branches
  1. 6.2 flag_actions.module \flag_actions_delete_form()
  2. 6 flag_actions.module \flag_actions_delete_form()
  3. 7.3 flag_actions.module \flag_actions_delete_form()
  4. 7.2 flag_actions.module \flag_actions_delete_form()
1 string reference to 'flag_actions_delete_form'
flag_actions_menu in ./flag_actions.module
Implementation of hook_menu().

File

./flag_actions.module, line 487
Actions support for the Flag module.

Code

function flag_actions_delete_form($aid) {
  $action = flag_actions_get_action($aid);
  $flag = flag_get_flag($action->flag);
  $form = array();
  $form['action'] = array(
    '#type' => 'value',
    '#value' => $action,
  );
  $form['flag'] = array(
    '#type' => 'value',
    '#value' => $flag,
  );
  $question = t('Delete the "@action" action for the @title flag?', array(
    '@action' => $action->description,
    '@title' => $flag
      ->get_title(),
  ));
  $path = 'admin/build/flags/actions';
  return confirm_form($form, $question, $path, NULL, t('Delete'));
}