function fontyourface_admin_edit_form_submit in @font-your-face 6
Same name and namespace in other branches
- 6.2 fontyourface.module \fontyourface_admin_edit_form_submit()
- 7 fontyourface.module \fontyourface_admin_edit_form_submit()
Edit form submit handler.
File
- ./
fontyourface.module, line 523
Code
function fontyourface_admin_edit_form_submit($form, &$form_state) {
$font = new stdClass();
$font->fid = $form['fid']['#value'];
$font = fontyourface_get_font($font);
if ($form['#post']['op'] == t('Disable')) {
fontyourface_delete_font($font);
drupal_set_message(t('Disabled font') . ' <i>' . $font->name . '</i>.');
drupal_goto('admin/build/themes/fontyourface');
}
else {
$font->css = $form['css']['#value'];
drupal_write_record('fontyourface', $font, 'fid');
drupal_set_message(t('Updated font') . ' <i>' . $font->name . '</i>.');
drupal_goto('admin/build/themes/fontyourface');
}
// else
}