You are here

function luxe_form_alter in Luxe 7

File

./luxe.module, line 28

Code

function luxe_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'user_login':
      drupal_set_title('');
      $form['lost_password'] = array(
        '#markup' => '<div class="login-forgot">' . l(variable_get('luxe_recover_text', 'Forgot your password?'), 'user/password') . '</div>',
      );
      break;
    case 'user_pass':
      drupal_set_title(variable_get('luxe_recover_title', 'Forgot your password?'));
      $form['lost_password'] = array(
        '#markup' => '<div class="login-forgot">' . l(t('No? Go log in then.'), 'user') . '</div>',
      );
      break;
    case 'user_register_form':
      $user_desc = variable_get('luxe_register_username_description', '');
      if (!empty($user_desc)) {
        $form['account']['name']['#description'] = variable_get('luxe_register_username_description', '');
      }
      $mail_desc = variable_get('luxe_register_mail_description', '');
      if (!empty($mail_desc)) {
        $form['account']['mail']['#description'] = variable_get('luxe_register_mail_description', '');
      }
      break;
  }
}