You are here

function local_fonts_delete_form_submit in @font-your-face 7

Same name and namespace in other branches
  1. 7.2 modules/local_fonts/local_fonts.module \local_fonts_delete_form_submit()

Handles submission of delete form.

File

modules/local_fonts/local_fonts.module, line 382

Code

function local_fonts_delete_form_submit($form, &$form_state) {
  if ($form_state['input']['op'] == t('Cancel')) {
    drupal_goto('admin/appearance/fontyourface/edit/' . $form['fid']['#value']);
  }
  else {
    $font = fontyourface_get_font($form['fid']['#value']);
    local_fonts_delete_font($font);
    drupal_set_message(t('@font deleted.', array(
      '@font' => $font->name,
    )));
    drupal_goto('admin/appearance/fontyourface');
  }

  // else
}