You are here

function lockr_admin_advanced_form in Lockr 7.3

Same name and namespace in other branches
  1. 7 include/advanced_form.inc \lockr_admin_advanced_form()
  2. 7.2 include/advanced_form.inc \lockr_admin_advanced_form()
1 string reference to 'lockr_admin_advanced_form'
lockr_admin_page in ./lockr.admin.inc

File

./lockr.admin.inc, line 198
Form callbacks for Lockr register form.

Code

function lockr_admin_advanced_form() {
  $content = [
    '#type' => 'fieldset',
    '#title' => t('Advanced'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  ];
  $content['region'] = [
    '#type' => 'select',
    '#title' => t('Region'),
    '#default_value' => variable_get('lockr_region'),
    '#empty_option' => '- Nearest -',
    '#options' => [
      'us' => t('US'),
      'eu' => t('EU'),
    ],
  ];
  $content['custom'] = [
    '#type' => 'checkbox',
    '#title' => 'Set custom certificate location',
    '#default_value' => variable_get('lockr_custom'),
  ];
  $content['custom_cert'] = [
    '#type' => 'textfield',
    '#title' => t('Certificate Path'),
    '#default_value' => variable_get('lockr_cert'),
    '#states' => [
      'visible' => [
        ':input[name="custom"]' => [
          'checked' => TRUE,
        ],
      ],
    ],
  ];
  $content['submit'] = [
    '#type' => 'submit',
    '#value' => t('Save'),
  ];
  $form['content'] = $content;
  return $form;
}