You are here

function flickr_tags_form_flickr_admin_settings_alter in Flickr 7

Implements hook_form_FORM_ID_alter().

File

tags/flickr_tags.admin.inc, line 10
The admin settings for the Flickr Tags module.

Code

function flickr_tags_form_flickr_admin_settings_alter(&$form, &$form_state) {
  $form['#validate'][] = 'flickr_tags_admin_settings_validate';
  $form['tags_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Tags options'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#weight' => 22,
  );
  $form['tags_settings']['flickr_tags_in_cloud'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum number of tags in a tag cloud'),
    '#required' => TRUE,
    '#default_value' => variable_get('flickr_tags_in_cloud', 150),
    '#description' => t('Applies on the tag cloud on a user profile pages at <em>flickr/%uid/tags/cloud</em>.'),
    '#size' => 3,
    '#maxlength' => 3,
  );
  $form['tags_settings']['flickr_tags_minfont'] = array(
    '#type' => 'textfield',
    '#title' => t('Minimum font size'),
    '#required' => TRUE,
    '#default_value' => variable_get('flickr_tags_minfont', 0.7),
    '#size' => 3,
    '#maxlength' => 3,
    '#field_suffix' => t('em'),
    '#attributes' => array(
      'class' => array(
        'flickr-form-align',
      ),
    ),
  );
  $form['tags_settings']['flickr_tags_maxfont'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum font size'),
    '#required' => TRUE,
    '#default_value' => variable_get('flickr_tags_maxfont', 3.5),
    '#size' => 3,
    '#maxlength' => 3,
    '#field_suffix' => t('em'),
    '#attributes' => array(
      'class' => array(
        'flickr-form-align',
      ),
    ),
  );
}