function path_access_admin_configure_form in Path Access 6
Same name and namespace in other branches
- 7 path_access.module \path_access_admin_configure_form()
Define role access form.
1 string reference to 'path_access_admin_configure_form'
- path_access_admin_role_configure in ./
path_access.module - Menu callback; displays the configuration form.
File
- ./
path_access.module, line 159 - Restricts access to any Drupal path on a per-role basis.
Code
function path_access_admin_configure_form(&$form_state, $edit) {
$form['page_vis_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Page specific visibility settings'),
'#collapsible' => FALSE,
);
$form['page_vis_settings']['visibility'] = array(
'#type' => 'radios',
'#title' => t('Allow users to view specific pages'),
'#options' => array(
t('Access every page except the listed pages.'),
t('Access only the listed pages.'),
),
'#default_value' => $edit['visibility'],
);
$form['page_vis_settings']['pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages'),
'#default_value' => $edit['pages'],
'#description' => t("Enter one page per line as a path. The '*' character is a wildcard. Example paths are '<em>blog</em>' for the blog page and '<em>blog/*</em>' for every personal blog. '<em><front></em>' is the front page."),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save path access'),
);
$form['rid'] = array(
'#type' => 'value',
'#value' => $edit['rid'],
);
return $form;
}