You are here

function botcha_recipebook_delete_form_submit in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 7.2 botcha.admin.inc \botcha_recipebook_delete_form_submit()

Submit handler for botcha_recipebook_delete_form().

File

./botcha.admin.inc, line 352
Implementation of botcha administration forms.

Code

function botcha_recipebook_delete_form_submit($form, &$form_state) {
  $recipebook = $form['#recipebook'];
  drupal_set_message(t('Recipe book %rbid successfully deleted.', array(
    '%rbid' => $recipebook->id,
  )));

  // Remove recipe book.
  $recipebook
    ->delete();
  $form_state['redirect'] = Botcha::BOTCHA_ADMIN_PATH . '/recipebook';
}