email is now required for registration as people are forgetting their password

This commit is contained in:
Athou
2013-06-16 11:50:22 +02:00
parent 379e342e30
commit b75a180150
3 changed files with 4 additions and 5 deletions

View File

@@ -74,8 +74,8 @@ public class PasswordRecoveryPage extends BasePage {
publicUrl += "/recover2";
return String
.format("You asked for password recovery, <a href='%s'>follow this link</a> to change your password. Ignore this if you didn't request a password recovery.",
callbackUrl(user, publicUrl));
.format("You asked for password recovery for account '%s', <a href='%s'>follow this link</a> to change your password. Ignore this if you didn't request a password recovery.",
user.getName(), callbackUrl(user, publicUrl));
}
private String callbackUrl(User user, String publicUrl) throws Exception {

View File

@@ -17,7 +17,7 @@
</div>
</div>
<div class="control-group">
<label class="control-label">Email address (optional, for password recovery only)</label>
<label class="control-label">Email address (used for password recovery only)</label>
<div class="controls">
<input type="email" wicket:id="email" class="input-block-level"></input>
</div>

View File

@@ -12,7 +12,6 @@ import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
@@ -93,7 +92,7 @@ public class RegisterPanel extends Panel {
}));
form.add(new PasswordTextField("password", MF.m(model, p.getPassword()))
.setResetPassword(false).add(StringValidator.minimumLength(6)));
form.add(new TextField<String>("email", MF.m(model, p.getEmail())) {
form.add(new RequiredTextField<String>("email", MF.m(model, p.getEmail())) {
@Override
protected String getInputType() {
return "email";