You are here

function site_banner_admin_settings_form in Site Banner 7

Implements hook_form_FORM_ID() for node_type_form().

1 string reference to 'site_banner_admin_settings_form'
site_banner_menu in ./site_banner.module
Implements hook_menu().

File

./site_banner.admin.inc, line 13

Code

function site_banner_admin_settings_form() {
  $form = array();

  // ****************
  // setup form structure
  // ****************
  $form = array_merge(site_banner_generate_banner_status_form_elements(variable_get('site_banner_status', FALSE), variable_get('site_banner_debug_status', FALSE), variable_get('site_banner_top_banner_active', TRUE), variable_get('site_banner_bottom_banner_active', TRUE)), site_banner_generate_banner_text_form_elements(variable_get('site_banner_text', site_banner_get_default_text())), site_banner_generate_bg_color_form_elements(variable_get('site_banner_background_color', site_banner_get_default_background_color())), site_banner_generate_text_color_form_elements(variable_get('site_banner_text_color', site_banner_get_default_text_color())));

  // Alter form text to better suit admin page.
  $form['site_banner_text']['#description'] = t('The text to be displayed on the site banner. If the !context_link module is being used, this will be the default text used when no context alters the site banner text.', array(
    '!context_link' => l(t('Context'), 'https://drupal.org/project/context'),
  ));
  $bg_suffix_description_text = '<br/>' . t('If the !context_link module is being used, this will be the default background color used when no context alters the site banner background color.', array(
    '!context_link' => l(t('Context'), 'https://drupal.org/project/context'),
  ));
  $text_suffix_description_text = '<br/>' . t('If the !context_link module is being used, this will be the default text color used when no context alters the site banner text color.', array(
    '!context_link' => l(t('Context'), 'https://drupal.org/project/context'),
  ));
  $form['site_banner_background_color_form']['#description'] .= $bg_suffix_description_text;
  $form['site_banner_text_color_form']['#description'] .= $text_suffix_description_text;
  $form['site_banner_background_custom_color_form']['#description'] .= $bg_suffix_description_text;
  $form['site_banner_text_custom_color_form']['#description'] .= $text_suffix_description_text;

  // Link to the submit handler below.
  $form['#submit'] = array(
    'site_banner_admin_settings_form_submit',
  );
  return system_settings_form($form);
}