function fontyourface_admin_edit_form_submit in @font-your-face 6.2
Same name and namespace in other branches
- 6 fontyourface.module \fontyourface_admin_edit_form_submit()
- 7 fontyourface.module \fontyourface_admin_edit_form_submit()
Edit form submit handler.
File
- ./
fontyourface.module, line 716
Code
function fontyourface_admin_edit_form_submit($form, &$form_state) {
$font = fontyourface_get_font($form['fid']['#value']);
if ($form['#post']['op'] == t('Cancel')) {
drupal_goto('admin/build/themes/fontyourface');
}
else {
if ($form['enabled']['#value'] > $font->enabled) {
fontyourface_enable_font($font);
}
elseif ($form['enabled']['#value'] < $font->enabled) {
fontyourface_disable_font($font);
}
// elseif
if ($font->css_selector != $form['css']['#value']) {
fontyourface_set_css_selector($font, $form['css']['#value']);
}
// if
drupal_set_message(t('Updated') . ' <i>' . $font->name . '</i>.');
}
// else
}