On this page
function overlay_form_user_profile_form_alter
overlay_form_user_profile_form_alter(&$form, &$form_state)
Implements hook_form_FORM_ID_alter().
File
- modules/overlay/overlay.module, line 98
- Displays the Drupal administration interface in an overlay.
Code
function overlay_form_user_profile_form_alter(&$form, &$form_state) {
if ($form['#user_category'] == 'account') {
$account = $form['#user'];
if (user_access('access overlay', $account)) {
$form['overlay_control'] = array(
'#type' => 'fieldset',
'#title' => t('Administrative overlay'),
'#weight' => 4,
'#collapsible' => TRUE,
);
$form['overlay_control']['overlay'] = array(
'#type' => 'checkbox',
'#title' => t('Use the overlay for administrative pages.'),
'#description' => t('Show administrative pages on top of the page you started from.'),
'#default_value' => isset($account->data['overlay']) ? $account->data['overlay'] : 1,
);
}
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!overlay!overlay.module/function/overlay_form_user_profile_form_alter/7.x