function _logintoboggan_toggleboggan in LoginToboggan 7
Same name and namespace in other branches
- 5 logintoboggan.module \_logintoboggan_toggleboggan()
- 6 logintoboggan.module \_logintoboggan_toggleboggan()
User login block with JavaScript to expand
this should really be themed
Return value
array the reconstituted user login block
1 call to _logintoboggan_toggleboggan()
- logintoboggan_form_alter in ./
logintoboggan.module - Implement hook_form_alter().
File
- ./
logintoboggan.module, line 867 - LoginToboggan module
Code
function _logintoboggan_toggleboggan($form) {
$form['#attached']['js'][] = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.js';
$pre = '<div id="toboggan-container" class="toboggan-container">';
$options = array(
'attributes' => array(
'id' => 'toboggan-login-link',
'class' => array(
'toboggan-login-link',
),
),
'query' => drupal_get_destination(),
);
$pre .= '<div id="toboggan-login-link-container" class="toboggan-login-link-container">';
$pre .= l(theme('lt_login_link'), 'user/login', $options);
$pre .= '</div>';
//the block that will be toggled
$pre .= '<div id="toboggan-login" class="user-login-block">';
$form['pre'] = array(
'#markup' => $pre,
'#weight' => -300,
);
$form['post'] = array(
'#markup' => '</div></div>',
'#weight' => 300,
);
return $form;
}