You are here

function lockr_admin_advanced_form in Lockr 7.2

Same name and namespace in other branches
  1. 7.3 lockr.admin.inc \lockr_admin_advanced_form()
  2. 7 include/advanced_form.inc \lockr_admin_advanced_form()

Returns form array for advanced settings.

1 call to lockr_admin_advanced_form()
lockr_admin_form in ./lockr.admin.inc
Form constructor for Lockr registration form.

File

include/advanced_form.inc, line 11
Form handlers for advanced admin settings.

Code

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