function _logintoboggan_toggleboggan in LoginToboggan 6
Same name and namespace in other branches
- 5 logintoboggan.module \_logintoboggan_toggleboggan()
- 7 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 - Implementation of hook_form_alter()
File
- ./
logintoboggan.module, line 641 - Logintoboggan Module
Code
function _logintoboggan_toggleboggan($form) {
drupal_add_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' => '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(
'#value' => $pre,
'#weight' => -300,
);
$form['post'] = array(
'#value' => '</div></div>',
'#weight' => 300,
);
return $form;
}