'fieldset', '#title' => t('Authentication'), '#description' => t('Enable Secure Site below. Users must have the "access secured pages" permission in order to access the site once the following setting is enabled.', array('!access' => url('admin/user/permissions', array('fragment' => 'module-securesite')))) ); $form['authentication']['securesite_enabled'] = array( '#type' => 'radios', '#title' => t('Forced authentication'), '#default_value' => variable_get('securesite_enabled', SECURESITE_DISABLED), '#options' => array( SECURESITE_DISABLED => t('Disabled'), SECURESITE_AUTH => t('Use HTTP Auth'), SECURESITE_FORM => t('Use HTML login form'), ), '#description' => t('HTTP Auth requires extra configuration if PHP is not installed as an Apache module. See the Known Issues section of the README.txt included with Secure Site for details.'), ); $form['authentication']['securesite_realm'] = array( '#type' => 'textfield', '#title' => t('Authentication realm'), '#default_value' => variable_get('securesite_realm', variable_get('site_name', 'Drupal')), '#length' => 30, '#maxlength' => 40, '#description' => t('Name to identify login area in HTTP Auth dialog'), ); // Guest access $form['guest'] = array( '#type' => 'fieldset', '#title' => t('Guest access'), '#description' => t('Guest access allows unregistered (anonymous) users to view secure pages, though a username and password are still required. You can set the username and password for all anonymous users below. If left blank, guest user access will be disabled.'), ); $form['guest']['securesite_guest_name'] = array( '#type' => 'textfield', '#title' => t('Guest user'), '#default_value' => variable_get('securesite_guest_name', ''), '#length' => 30, '#maxlength' => 40, '#description' => t('Leave empty to disable guest access'), ); $form['guest']['securesite_guest_pass'] = array( '#type' => 'textfield', '#title' => t('Guest password'), '#default_value' => variable_get('securesite_guest_pass', ''), '#length' => 30, '#maxlength' => 40, '#description' => t('Leave empty to disable guest access'), ); // HTML login form settings $form['login_form'] = array( '#type' => 'fieldset', '#title' => t('Customize HTML forms'), '#description' => t('Configure the message displayed on the HTML login form (if enabled) and password reset form below.') ); $form['login_form']['securesite_login_form'] = array( '#type' => 'textarea', '#title' => t('Custom message for HTML login form'), '#default_value' => variable_get('securesite_login_form', t('

Enter your username and password:

')), '#length' => 60, '#height' => 3, ); $form['login_form']['securesite_request_form'] = array( '#type' => 'textarea', '#title' => t('Custom message for password reset form'), '#default_value' => variable_get('securesite_request_form', t('

Enter your username or e-mail address:

')), '#length' => 60, '#height' => 3, '#description' => t('Leave empty to disable Secure Site\'s password reset form.'), ); // Bypass login settings $form['filter_pages'] = array( '#type' => 'fieldset', '#title' => t('Bypass login'), '#description' => t('Some sites may wish to only use Secure Site for certain pages. Use the settings below to configure which pages force authentication via Secure Site. Select "On every page except the listed pages" and leave the "Pages" list empty to force authentication for all pages (this is the default configuration). The cron page is always accessible.'), ); $form['filter_pages']['securesite_filter_pages_type'] = array( '#type' => 'radios', '#title' => t('Force authentication'), '#default_value' => variable_get('securesite_filter_pages_type', SECURESITE_WHITELIST), '#options' => array( SECURESITE_WHITELIST => t('On every page except the listed pages. Use this setting to restrict access of your entire site.'), SECURESITE_BLACKLIST => t('Only on the listed pages. Use this setting only if you want to restrict access to certain pages, not your entire site.'), ), ); $form['filter_pages']['securesite_filter_pages'] = array( '#type' => 'textarea', '#title' => t('Pages'), '#default_value' => variable_get('securesite_filter_pages', ''), '#length' => 60, '#height' => 3, '#description' => t("Enter one path per line. Enter <front> for your site's front page. \"*\" acts as a wildcard. For example, enter blog for the blog page and blog/* for every personal blog."), ); return system_settings_form($form); }