function opigno_simple_ui_form_alter in Opigno 7
Same name and namespace in other branches
- 7.0 modules/opigno_simple_ui/opigno_simple_ui.module \opigno_simple_ui_form_alter()
Implements hook_form_alter().
File
- modules/
simple_ui/ opigno_simple_ui.module, line 121
Code
function opigno_simple_ui_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'user_login_block') {
$form['user_login_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('User login'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['user_login_fieldset']['name'] = $form['name'];
$form['user_login_fieldset']['pass'] = $form['pass'];
$form['user_login_fieldset']['actions'] = $form['actions'];
$form['user_login_fieldset']['links'] = $form['links'];
unset($form['name']);
unset($form['pass']);
unset($form['actions']);
unset($form['links']);
}
if ($form_id == 'user_login') {
$form['#submit'][] = 'opigno_simple_ui_login_redirect';
}
}