You are here

function siteimprove_admin_settings_form in Siteimprove 7

Implements hook_admin_settings() for module settings configuration.

1 string reference to 'siteimprove_admin_settings_form'
siteimprove_menu in ./siteimprove.module
Implements hook_menu().

File

./siteimprove.admin.inc, line 11
Administrative page callbacks for the siteimprove module.

Code

function siteimprove_admin_settings_form($form_state) {
  $form['token'] = array(
    '#title' => t('Token'),
    '#type' => 'fieldset',
  );
  $form['token']['siteimprove_token'] = array(
    '#default_value' => variable_get('siteimprove_token'),
    '#description' => t('Configure Siteimprove Plugin token.'),
    '#maxlength' => 50,
    '#prefix' => '<div id="token-wrapper">',
    '#required' => TRUE,
    '#size' => 50,
    '#suffix' => '</div>',
    '#title' => t('Token'),
    '#type' => 'textfield',
  );
  $form['token']['siteimprove_request_new_token'] = array(
    '#ajax' => array(
      'callback' => 'siteimprove_admin_settings_form_ajax_request_token',
      'wrapper' => 'token-wrapper',
    ),
    '#limit_validation_errors' => array(),
    '#type' => 'button',
    '#value' => t('Request new token'),
  );
  $form['frontend_domain'] = array(
    '#title' => t('Frontend domain'),
    '#description' => t('Are you using a separate edit or backend domain? Then insert your frontend domain below, and this domain will be used in the Siteimprove overlay.'),
    '#type' => 'fieldset',
  );
  $form['frontend_domain']['siteimprove_frontend_domain'] = array(
    '#default_value' => variable_get('siteimprove_frontend_domain'),
    '#description' => t('Input your domain name. If you leave out http:// or https://, the scheme will inherit the scheme of the web request.'),
    '#maxlength' => 50,
    '#required' => FALSE,
    '#size' => 50,
    '#title' => t('Domain'),
    '#type' => 'textfield',
  );
  $form['#validate'][] = 'siteimprove_admin_settings_form_validate';
  return system_settings_form($form);
}