You are here

function local_fonts_form_alter in @font-your-face 6.2

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

Implementation of hook_form_alter().

File

modules/local_fonts/local_fonts.module, line 44

Code

function local_fonts_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'fontyourface_settings_form') {

    // Replace button with a link to the custom font form.
    $form['providers']['local_fonts_import']['import'] = array(
      '#type' => 'markup',
      '#value' => l(t('Import Local Font'), 'admin/settings/fontyourface/local_fonts'),
    );
  }
  elseif ($form_id == 'fontyourface_admin_edit_form') {

    // Add delete button.
    $form['buttons']['delete'] = array(
      '#type' => 'submit',
      '#value' => t('Delete font record'),
      '#submit' => array(
        'local_fonts_delete_button_submit',
      ),
    );
  }

  // elseif
}