Display error message

This commit is contained in:
DOHA 2015-02-08 14:20:32 +02:00
parent 64a91eff4c
commit 2a037f5160
5 changed files with 16 additions and 6 deletions

View File

@ -41,7 +41,6 @@ public class RegistrationListener implements ApplicationListener<OnRegistrationC
email.setTo(recipientAddress);
email.setSubject(subject);
email.setText(message + " \r\n" + "http://localhost:8080" + confirmationUrl);
System.out.println(email.getText());
mailSender.send(email);
}
}

View File

@ -130,7 +130,7 @@ public class RegistrationController {
return "redirect:/emailError.html?lang=" + locale.getLanguage();
} catch (final Exception e) {
LOGGER.debug(e.getLocalizedMessage());
model.addAttribute("error", e.getLocalizedMessage());
model.addAttribute("message", e.getLocalizedMessage());
return "redirect:/login.html?lang=" + locale.getLanguage();
}
model.addAttribute("message", messages.getMessage("message.resendToken", null, locale));
@ -156,7 +156,7 @@ public class RegistrationController {
return "redirect:/emailError.html?lang=" + request.getLocale().getLanguage();
} catch (final Exception e) {
LOGGER.debug(e.getLocalizedMessage());
model.addAttribute("error", e.getLocalizedMessage());
model.addAttribute("message", e.getLocalizedMessage());
return "redirect:/login.html?lang=" + request.getLocale().getLanguage();
}
model.addAttribute("message", messages.getMessage("message.resetPassword", null, request.getLocale()));
@ -230,4 +230,4 @@ public class RegistrationController {
}
return registered;
}
}
}

View File

@ -54,7 +54,7 @@ NotEmpty.user.matchingPassword=Required
PasswordMatches.user:Password does not match!
Email.user.email=Invalid Username (Email)
label.form.resendRegistrationToken=Re-send Token
message.resendToken=We will send you a message with a new registration token to your email account.
message.resendToken=We will send you a message with a new registration token to your email account
message.forgetPassword=Forget Password
message.resetPassword=Reset Password
message.updatePassword=Update Password

View File

@ -53,4 +53,9 @@ NotNull.user.matchingPassword=Campo obligatirio
NotEmpty.user.matchingPassword=Campo obligatrio
PasswordMatches.user:Las claves no coinciden!
Email.user.email=Email no es valido
label.form.resendRegistrationToken=Reenviar mensaje de emergencia
label.form.resendRegistrationToken=Reenviar mensaje de emergencia
message.resendToken=Le enviaremos un mensaje con un nuevo token de registro en su cuenta de correo electrónico
message.forgetPassword=Olvide la contraseña
message.resetPassword=Restablecer contraseña
message.updatePassword=Actualizar contraseña
message.userNotFound=Usuario no encontrado

View File

@ -56,6 +56,12 @@
</script>
</head>
<body>
<c:if test="${param.message != null}">
<div class="alert alert-error">
${param.message}
</div>
</c:if>
<div class="container">
<div class="span12">
<h1>