forked from Archives/Athou_commafeed
email is now required for registration as people are forgetting their password
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user