You are here

function fontyourface_settings_form in @font-your-face 6.2

Same name and namespace in other branches
  1. 6 fontyourface.module \fontyourface_settings_form()
  2. 7 fontyourface.module \fontyourface_settings_form()

Creates settings form.

5 string references to 'fontyourface_settings_form'
fontdeck_form_alter in modules/fontdeck/fontdeck.module
Implements hook_form_alter().
fonts_com_form_alter in modules/fonts_com/fonts_com.module
Implements hook_form_alter().
fontyourface_menu in ./fontyourface.module
Implements hook_menu().
local_fonts_form_alter in modules/local_fonts/local_fonts.module
Implementation of hook_form_alter().
typekit_api_form_alter in modules/typekit_api/typekit_api.module
Implements hook_form_alter().

File

./fontyourface.module, line 415

Code

function fontyourface_settings_form() {
  $form = array(
    'providers' => array(
      '#type' => 'fieldset',
      '#title' => 'Providers',
    ),
    'logging' => array(
      '#type' => 'fieldset',
      '#title' => 'Logging',
      'detailed_logs' => array(
        '#type' => 'checkbox',
        '#default_value' => variable_get('fontyourface_detailed_logging', FALSE),
        '#title' => t('Keep detailed watchdog logs'),
        '#description' => t("Don't leave this on when testing is complete. It will make everything run a bit slower."),
      ),
      'update' => array(
        '#type' => 'submit',
        '#value' => t('Change logging settings'),
      ),
    ),
  );
  foreach (module_implements('fontyourface_info') as $module) {
    $info_function = $module . '_fontyourface_info';
    $provider = $info_function();
    $count = db_fetch_object(db_query("SELECT COUNT(fid) AS total FROM {fontyourface_font} WHERE provider = '%s'", $module));
    $form['providers'][$module . '_import'] = array(
      '#prefix' => '<div>',
      '#value' => t('@provider is enabled with @count fonts.', array(
        '@provider' => $provider['name'],
        '@count' => $count->total,
      )) . ' ',
      '#suffix' => '</div>',
      'import' => array(
        '#type' => 'submit',
        '#value' => 'Import ' . $provider['name'],
      ),
    );
  }

  // foreach
  return $form;
}