function protected_pages_configure in Protected Pages 7
Same name and namespace in other branches
- 7.2 protected_pages.admin.inc \protected_pages_configure()
Callback function for add protected page.
1 string reference to 'protected_pages_configure'
- protected_pages_menu in ./
protected_pages.module - Implements hook_menu().
File
- ./
protected_pages.admin.inc, line 11 - Provides page callbacks for configuration page.
Code
function protected_pages_configure($form, &$form_state) {
$form['rules_list'] = array(
'#title' => t("Add Protected Page Relative path and password."),
'#type' => 'fieldset',
'#prefix' => '<div id="rules_list">',
'#suffix' => '</div>',
'#description' => t('Please enter the relative path and its corresponding
password. When user opens this url, they will asked to enter password to
view this page. For example, "node/5", "new-events" etc.'),
);
$form['rules_list']['path'] = array(
'#type' => 'textfield',
'#title' => t('Relative Path'),
'#description' => t('Enter relative drupal path. For example, "node/5", "new-events" etc.'),
'#required' => TRUE,
);
$form['rules_list']['password'] = array(
'#type' => 'password_confirm',
'#size' => 25,
'#required' => TRUE,
);
$form['rules_list']['submit'] = array(
'#type' => 'submit',
'#ajax' => array(
'callback' => 'protected_pages_configure_submit_callback',
'wrapper' => 'rules_list',
'effect' => 'fade',
'method' => 'replace',
'progress' => array(
'type' => 'throbber',
'message' => t('Please wait. The data is being saved.'),
),
),
'#value' => t('Save'),
);
$form['rules_list']['pages_table'] = array(
'#markup' => protected_pages_get_pages_list(),
);
return $form;
}