function dialog_user_form_user_pass_alter in Dialog 7.2
Implement hook_form_FORM_ID_alter().
File
- modules/
dialog_user/ dialog_user.module, line 139 - Provides dialog integration for user.module.
Code
function dialog_user_form_user_pass_alter(&$form, &$form_state, $form_id) {
// Wrap the form in a <div> with a known ID so it can be targeted via AJAX.
$form['#prefix'] = '<div id="dialog-user-user-pass">';
$form['#suffix'] = '</div>';
// Make the 'E-mail new password' button the primary action.
$form['actions']['submit']['#attributes']['class'][] = 'button--primary';
// Add an AJAX submission callback.
$form['actions']['submit']['#ajax'] = array(
'callback' => 'dialog_user_user_pass_submit',
'event' => 'click',
);
}