You are here

function fasttoggle_settings_form in Fasttoggle 7

Same name and namespace in other branches
  1. 5 fasttoggle.module \fasttoggle_settings_form()
  2. 6 fasttoggle.admin.inc \fasttoggle_settings_form()

Configures what fast toggling options are available (menu callback)

1 string reference to 'fasttoggle_settings_form'
fasttoggle_menu in ./fasttoggle.module
Implements hook_menu().

File

./fasttoggle.admin.inc, line 122

Code

function fasttoggle_settings_form() {
  $form = array();
  $form['fasttoggle_label_style'] = array(
    '#type' => 'radios',
    '#title' => t('Label style'),
    '#description' => t('Select what kind of labels you want for fasttoggle links. See the README.txt for information about providing your own labels.'),
    '#options' => array(
      FASTTOGGLE_LABEL_STATUS => t('Status (reflects the current state, e.g. "published", "active")'),
      FASTTOGGLE_LABEL_ACTION => t('Action (shows what happens upon a click, e.g. "unpublish", "block")'),
    ),
    '#default_value' => variable_get('fasttoggle_label_style', FASTTOGGLE_LABEL_STATUS),
  );
  $custom_labels = variable_get('fasttoggle_labels', array());
  if (!empty($custom_labels)) {
    $form['fasttoggle_label_style']['#options'][FASTTOGGLE_LABEL_CUSTOM] = t('Custom (configure in your settings.php)');
  }
  return system_settings_form(array_merge_recursive($form, fasttoggle_get_settings_form_items()));
}