This is an automated email from the ASF dual-hosted git repository.
andreapatricelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 1b471a0 [SYNCOPE-1421] added password reset page
1b471a0 is described below
commit 1b471a0ce8a0ce7c160774dfb52c6a39ca7c1d71
Author: Andrea Patricelli <[email protected]>
AuthorDate: Fri Apr 12 11:08:08 2019 +0200
[SYNCOPE-1421] added password reset page
---
.../markup/html/form/AjaxCaptchaFieldPanel.java | 73 +++++++++
.../apache/syncope/client/enduser/pages/Login.java | 1 -
.../client/enduser/pages/SelfPasswordReset.java | 17 +++
.../client/enduser/panels/SelfPwdResetPanel.java | 169 +++++++++++++++++++++
.../enduser/wizards/any/AbstractCaptchaPanel.java | 39 ++---
.../client/enduser/wizards/any/Captcha.java | 7 +-
.../client/enduser/wizards/any/CaptchaPanel.java | 8 +
.../enduser/wizards/any/UserWizardBuilder.java | 2 -
.../html/form/AjaxCaptchaFieldPanel.html} | 14 +-
.../syncope/client/enduser/pages/Login.properties | 2 +-
.../client/enduser/pages/SelfPasswordReset.html | 11 +-
.../client/enduser/panels/SelfPwdResetPanel.html | 51 +++++++
.../SelfPwdResetPanel.properties} | 12 +-
.../SelfPwdResetPanel_it.properties} | 12 +-
.../SelfPwdResetPanel_ja.properties} | 14 +-
.../SelfPwdResetPanel_pt_BR.properties} | 14 +-
.../enduser/panels/SelfPwdResetPanel_ru.properties | 24 +++
.../client/enduser/wizards/any/CaptchaPanel.html | 7 +-
18 files changed, 405 insertions(+), 72 deletions(-)
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.java
new file mode 100644
index 0000000..40e407a
--- /dev/null
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.enduser.markup.html.form;
+
+import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
+import org.apache.syncope.client.ui.commons.Constants;
+import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.validation.IValidator;
+
+public class AjaxCaptchaFieldPanel extends FieldPanel<String> {
+
+ private static final long serialVersionUID = 238940918106696068L;
+
+ public AjaxCaptchaFieldPanel(final String id, final String name, final
IModel<String> model) {
+ this(id, name, model, true);
+ }
+
+ public AjaxCaptchaFieldPanel(
+ final String id, final String name, final IModel<String> model,
final boolean enableOnChange) {
+ super(id, name, model);
+
+ field = new RequiredTextField<String>("textField", model,
String.class) {
+
+ private static final long serialVersionUID = -8751221833502425836L;
+
+ @Override
+ protected void onComponentTag(final ComponentTag tag) {
+ super.onComponentTag(tag);
+ // clear the field after each render
+ tag.put("value", "");
+ }
+ };
+
+ add(field.setOutputMarkupId(true));
+
+ if (enableOnChange && !isReadOnly()) {
+ field.add(new
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID =
-1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+ }
+
+ public void addValidator(final IValidator<? super String> validator) {
+ this.field.add(validator);
+ }
+
+}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/Login.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/Login.java
index 5045e6c..24385e6 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/Login.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/Login.java
@@ -88,7 +88,6 @@ public class Login extends BaseLogin {
// not authenticated
sendError(getString("login-error"));
notificationPanel.refresh(target);
-
}
}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfPasswordReset.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfPasswordReset.java
index b509ddf..ccc05ab 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfPasswordReset.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfPasswordReset.java
@@ -18,14 +18,31 @@
*/
package org.apache.syncope.client.enduser.pages;
+import org.apache.syncope.client.enduser.panels.SelfPwdResetPanel;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.request.mapper.parameter.PageParameters;
public class SelfPasswordReset extends BaseEnduserWebPage {
private static final long serialVersionUID = 164651008547631054L;
+ private final SelfPwdResetPanel pwdResetPanel;
+
public SelfPasswordReset(final PageParameters parameters) {
super(parameters);
+
+ WebMarkupContainer content = new WebMarkupContainer("content");
+ content.setOutputMarkupId(true);
+ body.add(content);
+
+ Form<?> form = new Form<>("selfPwdResetForm");
+ content.add(form);
+
+ pwdResetPanel = new SelfPwdResetPanel("selfPwdResetPanel",
getPageReference());
+ pwdResetPanel.setOutputMarkupId(true);
+
+ form.add(pwdResetPanel);
}
}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.java
new file mode 100644
index 0000000..d6dc438
--- /dev/null
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.enduser.panels;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.enduser.SyncopeEnduserSession;
+import org.apache.syncope.client.enduser.pages.BaseEnduserWebPage;
+import org.apache.syncope.client.enduser.pages.Login;
+import org.apache.syncope.client.enduser.wizards.any.CaptchaPanel;
+import org.apache.syncope.client.ui.commons.Constants;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.rest.api.service.SecurityQuestionService;
+import org.apache.syncope.common.rest.api.service.UserSelfService;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.IEventSource;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SelfPwdResetPanel extends Panel implements IEventSource {
+
+ private static final long serialVersionUID = -2841210052053545578L;
+
+ private static final Logger LOG =
LoggerFactory.getLogger(SelfPwdResetPanel.class);
+
+ private String usernameText;
+
+ private final TextField<String> securityQuestion;
+
+ private final CaptchaPanel<Void> captcha;
+
+ protected final Model<String> securityAnswerModel = new Model<>();
+
+ public SelfPwdResetPanel(final String id, final PageReference pageRef) {
+ super(id);
+
+ TextField<String> username = new TextField<>("username", new
PropertyModel<>(SelfPwdResetPanel.this,
+ "usernameText"), String.class);
+ username.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ loadSecurityQuestion(pageRef, target);
+ }
+
+ });
+ username.setRequired(true);
+ add(username);
+
+ securityQuestion = new TextField<>("securityQuestion", new
PropertyModel<>(Model.of(), "content"),
+ String.class);
+ securityQuestion.setOutputMarkupId(true);
+ securityQuestion.setEnabled(false);
+ add(securityQuestion);
+
+ AjaxLink<Void> reloadLink = new AjaxLink<>("reloadLink") {
+
+ private static final long serialVersionUID = -817438685948164787L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ loadSecurityQuestion(pageRef, target);
+ }
+ };
+ add(reloadLink);
+
+ AjaxTextFieldPanel securityAnswer = new
AjaxTextFieldPanel("securityAnswer", "securityAnswer",
+ securityAnswerModel);
+ securityAnswer.setOutputMarkupId(true);
+ securityAnswer.setOutputMarkupPlaceholderTag(true);
+ securityAnswer.setRequired(true);
+ add(securityAnswer);
+
+ captcha = new CaptchaPanel<>("captchaPanel");
+ add(captcha);
+
+ AjaxButton submitButton = new AjaxButton("submit") {
+
+ private static final long serialVersionUID = 4284361595033427185L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target) {
+ // captcha check
+ if (!captcha.captchaCheck()) {
+
SyncopeEnduserSession.get().error(getString(Constants.CAPTCHA_ERROR));
+ ((BaseEnduserWebPage)
pageRef.getPage()).getNotificationPanel().refresh(target);
+ } else {
+ try {
+
SyncopeEnduserSession.get().getService(UserSelfService.class)
+ .requestPasswordReset(usernameText,
securityAnswerModel.getObject());
+ final PageParameters parameters = new PageParameters();
+ parameters.add("successMessage",
getString("self.pwd.reset.success"));
+ setResponsePage(Login.class, parameters);
+ } catch (SyncopeClientException sce) {
+ LOG.error("Unable to reset password of [{}]",
usernameText, sce);
+
SyncopeEnduserSession.get().error(StringUtils.isBlank(sce.getMessage())
+ ? sce.getClass().getName()
+ : sce.getMessage());
+ ((BaseEnduserWebPage)
pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }
+ }
+
+ };
+ submitButton.setOutputMarkupId(true);
+ submitButton.setDefaultFormProcessing(false);
+ add(submitButton);
+
+ Button cancel = new Button("cancel") {
+
+ private static final long serialVersionUID = 3669569969172391336L;
+
+ @Override
+ public void onSubmit() {
+ setResponsePage(Login.class);
+ }
+
+ };
+ cancel.setOutputMarkupId(true);
+ cancel.setDefaultFormProcessing(false);
+ add(cancel);
+ }
+
+ protected void loadSecurityQuestion(final PageReference pageRef, final
AjaxRequestTarget target) {
+ try {
+ SecurityQuestionTO securityQuestionTO =
SyncopeEnduserSession.get().getService(
+ SecurityQuestionService.class).readByUser(usernameText);
+ // set security question field model
+
securityQuestion.setModel(Model.of(securityQuestionTO.getContent()));
+ target.add(securityQuestion);
+ } catch (Exception e) {
+ LOG.error("Unable to get security question for [{}]",
usernameText, e);
+
SyncopeEnduserSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName()
+ : e.getMessage());
+ ((BaseEnduserWebPage)
pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }
+
+}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/AbstractCaptchaPanel.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/AbstractCaptchaPanel.java
index deb52c0..0d510e2 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/AbstractCaptchaPanel.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/AbstractCaptchaPanel.java
@@ -18,14 +18,13 @@
*/
package org.apache.syncope.client.enduser.wizards.any;
+import
org.apache.syncope.client.enduser.markup.html.form.AjaxCaptchaFieldPanel;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.markup.html.captcha.CaptchaImageResource;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.Model;
public abstract class AbstractCaptchaPanel<T> extends Panel {
@@ -33,7 +32,7 @@ public abstract class AbstractCaptchaPanel<T> extends Panel {
protected String randomText;
- protected String captchaText;
+ protected final Model<String> captchaText = new Model<>();
protected final CaptchaImageResource captchaImageResource;
@@ -46,7 +45,7 @@ public abstract class AbstractCaptchaPanel<T> extends Panel {
captchaImage.setOutputMarkupId(true);
add(captchaImage);
- AjaxButton realoadCaptchaButton = new AjaxButton("reloadButton") {
+ AjaxButton reloadCaptchaButton = new AjaxButton("reloadButton") {
private static final long serialVersionUID = -957948639666058749L;
@@ -57,33 +56,17 @@ public abstract class AbstractCaptchaPanel<T> extends Panel
{
}
};
- realoadCaptchaButton.setDefaultFormProcessing(false);
- add(realoadCaptchaButton);
+ reloadCaptchaButton.setDefaultFormProcessing(false);
+ add(reloadCaptchaButton);
- add(new RequiredTextField<String>("captcha",
- new PropertyModel<>(AbstractCaptchaPanel.this, "captchaText"),
String.class) {
-
- private static final long serialVersionUID = -5918382907429502528L;
-
- @Override
- protected void onComponentTag(final ComponentTag tag) {
- super.onComponentTag(tag);
- // clear the field after each render
- tag.put("value", "");
- }
-
- });
- }
-
- public String getRandomText() {
- return randomText;
- }
-
- public String getCaptchaText() {
- return captchaText;
+ add(new AjaxCaptchaFieldPanel("captcha", "captcha", captchaText)
+ .setOutputMarkupId(true)
+ .setOutputMarkupPlaceholderTag(true));
}
protected abstract CaptchaImageResource createCaptchaImageResource();
protected abstract void reload();
+
+ public abstract boolean captchaCheck();
}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Captcha.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Captcha.java
index d0a1243..2c14e44 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Captcha.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Captcha.java
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.client.enduser.wizards.any;
-import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.enduser.SyncopeWebApplication;
import org.apache.wicket.extensions.wizard.WizardModel;
import org.apache.wicket.extensions.wizard.WizardStep;
@@ -36,11 +35,7 @@ public class Captcha extends WizardStep implements
WizardModel.ICondition {
}
public boolean captchaCheck() {
- final String captchaText = captchaPanel.getCaptchaText();
- final String randomText = captchaPanel.getRandomText();
- return StringUtils.isBlank(captchaText) ||
StringUtils.isBlank(randomText)
- ? false
- : captchaText.equals(randomText);
+ return captchaPanel.captchaCheck();
}
public void reload() {
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.java
index 63158f7..45d95b0 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.java
@@ -19,6 +19,7 @@
package org.apache.syncope.client.enduser.wizards.any;
import java.security.SecureRandom;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.RandomStringGenerator;
import org.apache.wicket.extensions.markup.html.captcha.CaptchaImageResource;
@@ -57,4 +58,11 @@ public class CaptchaPanel<T> extends AbstractCaptchaPanel<T>
{
this.captchaImageResource.invalidate();
}
+ @Override
+ public boolean captchaCheck() {
+ return StringUtils.isBlank(captchaText.getObject()) ||
StringUtils.isBlank(randomText)
+ ? false
+ : captchaText.getObject().equals(randomText);
+ }
+
}
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/UserWizardBuilder.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/UserWizardBuilder.java
index 4caecec..6ed5583 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/UserWizardBuilder.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/UserWizardBuilder.java
@@ -80,8 +80,6 @@ public class UserWizardBuilder extends AnyWizardBuilder
implements UserForm {
protected Serializable onApplyInternal(final AnyWrapper<UserTO>
modelObject) {
// captcha check
if (captcha != null && captcha.evaluate() && !captcha.captchaCheck()) {
-// sendError("Entered captcha is not matching");
- // force captcha redrawing
throw new CaptchaNotMatchingException();
}
UserTO inner = modelObject.getInnerObject();
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.html
similarity index 70%
copy from
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
copy to
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.html
index e83a151..39471d3 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/markup/html/form/AjaxCaptchaFieldPanel.html
@@ -17,8 +17,14 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
- <wicket:extend><div class="container">
- SELF PASSWORD RESET
- </div>
+ <wicket:extend>
+ <fieldset class="input-group">
+ <div id="captcha_text" class="captcha_elem">
+ <input type="text" size="27" wicket:id="textField" placeholder=""/>
+ </div>
+ <div id="captcha_message" class="captcha_elem">
+ <wicket:message
key="captcha.message">[CAPTCHA_MESSAGE]</wicket:message>
+ </div>
+ </fieldset>
</wicket:extend>
-</html>
\ No newline at end of file
+</html>
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
index bf6a3e9..d0d4dd8 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
@@ -19,4 +19,4 @@ password=Password
submit=Login
login-error=Wrong username and/or password
self-registration=Self Registration
-self-pwd-reset=Self Password Reset
+self-pwd-reset=Password Reset
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
index e83a151..be995c7 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/SelfPasswordReset.html
@@ -17,8 +17,13 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
- <wicket:extend><div class="container">
- SELF PASSWORD RESET
- </div>
+ <wicket:extend>
+ <section class="content" wicket:id="content">
+ <div class="box">
+ <form wicket:id="selfPwdResetForm">
+ <div class="box-body" wicket:id="selfPwdResetPanel"/>
+ </form>
+ </div>
+ </section>
</wicket:extend>
</html>
\ No newline at end of file
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.html
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.html
new file mode 100644
index 0000000..f9fadd2
--- /dev/null
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <fieldset class="form-group">
+ <div class="form-group">
+ <label for="username"><wicket:message key="username"/></label>
+ <input id="username" type="text" wicket:id="username"
class="form-control"
+ wicket:message="placeholder:username"
+ autofocus="autofocus" />
+ </div>
+ <div class="form-group">
+ <label for="securityQuestion"><wicket:message
key="securityQuestion"/></label>
+ <input id="securityQuestion" type="text" wicket:id="securityQuestion"
class="form-control"
+ wicket:message="placeholder:securityQuestion"
+ autofocus="autofocus" />
+ <div class="suggestions">(<wicket:message key="not.loading">
+ </wicket:message><a wicket:id="reloadLink"> <wicket:message
key="reload"></wicket:message></a>)</div>
+ </div>
+ <div class="form-group">
+ <span wicket:id="securityAnswer">[SECURITY ANSWER]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="captchaPanel">[CAPTCHA]</span>
+ </div>
+ </fieldset>
+ <div class="pull-left">
+ <input wicket:id="cancel" type="submit" wicket:message="value:cancel"
class="btn btn-default pull-left"/>
+ </div>
+ <div class="pull-right">
+ <input wicket:id="submit" type="submit" wicket:message="value:submit"
class="btn btn-primary"/>
+ </div>
+ </wicket:panel>
+</html>
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.properties
similarity index 81%
copy from
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
copy to
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.properties
index bf6a3e9..bf0bcfa 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel.properties
@@ -15,8 +15,10 @@
# specific language governing permissions and limitations
# under the License.
username=Username
-password=Password
-submit=Login
-login-error=Wrong username and/or password
-self-registration=Self Registration
-self-pwd-reset=Self Password Reset
+securityQuestion=Security Question
+securityAnswer=Security Answer
+reload=Reload
+not.loading=Not loading?
+submit=Submit
+cancel=Cancel
+self.pwd.reset.success=Password successfully reset
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_it.properties
similarity index 79%
copy from
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
copy to
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_it.properties
index bf6a3e9..285d736 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_it.properties
@@ -15,8 +15,10 @@
# specific language governing permissions and limitations
# under the License.
username=Username
-password=Password
-submit=Login
-login-error=Wrong username and/or password
-self-registration=Self Registration
-self-pwd-reset=Self Password Reset
+securityQuestion=Security Question
+securityAnswer=Risposta di sicurezza
+reload=Ricarica
+not.loading=Non carica?
+submit=Salva
+cancel=Annulla
+self.pwd.reset.success=La password \u00e8 stata resettata con successo
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ja.properties
similarity index 64%
copy from
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
copy to
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ja.properties
index bf6a3e9..9f2b802 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ja.properties
@@ -14,9 +14,11 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-username=Username
-password=Password
-submit=Login
-login-error=Wrong username and/or password
-self-registration=Self Registration
-self-pwd-reset=Self Password Reset
+username=\u30e6\u30fc\u30b6\u30fc\u540d
+securityQuestion=\u79d8\u5bc6\u306e\u8cea\u554f
+securityAnswer=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u56de\u7b54
+reload=\u30ea\u30ed\u30fc\u30c9
+not.loading=\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f
+submit=\u63d0\u51fa\u3059\u308b
+cancel=\u30ad\u30e3\u30f3\u30bb\u30eb
+self.pwd.reset.success=\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u307e\u3057\u305f
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_pt_BR.properties
similarity index 58%
copy from
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
copy to
client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_pt_BR.properties
index bf6a3e9..9307da2 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Login.properties
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_pt_BR.properties
@@ -14,9 +14,11 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-username=Username
-password=Password
-submit=Login
-login-error=Wrong username and/or password
-self-registration=Self Registration
-self-pwd-reset=Self Password Reset
+username=Nome de usu\u00e1rio\n
+securityQuestion=Pergunta de Seguran\u00e7a
+securityAnswer=Resposta de seguran\u00e7a
+reload=recarregar
+not.loading=N\u00e3o est\u00e1 carregando?\n
+submit=Enviar
+cancel=Cancelar
+self.pwd.reset.success=Senha redefinida com sucesso\nSenha\nTraduzioni di
senha\nSostantivoFrequenza\npassword\nsenha, palavra de passe,
contra-senha\nwatchword\nlema, palavra de ordem, senha, divisa,
passe\nparole\npalavra de honra, senha\nshibboleth\nsenha, palavra, prova,
pedra-de-toque\nSinonimi di senha\nSostantivo\ncontra-senha\n
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ru.properties
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ru.properties
new file mode 100644
index 0000000..fc5b52f
--- /dev/null
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/panels/SelfPwdResetPanel_ru.properties
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+username=\u0438\u043c\u044f
\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
+securityQuestion=\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0439
\u0432\u043e\u043f\u0440\u043e\u0441
+securityAnswer=\u041e\u0442\u0432\u0435\u0442
\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438
+reload=\u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c
+not.loading=\u041d\u0435
\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f?\n
+submit=\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c
+cancel=\u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c
+self.pwd.reset.success=\u041f\u0430\u0440\u043e\u043b\u044c
\u0443\u0441\u043f\u0435\u0448\u043d\u043e
\u0441\u0431\u0440\u043e\u0448\u0435\u043d\n
diff --git
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.html
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.html
index a1561c6..1a3fa63 100644
---
a/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.html
+++
b/client/idrepo/enduser/src/main/resources/org/apache/syncope/client/enduser/wizards/any/CaptchaPanel.html
@@ -30,11 +30,8 @@ under the License.
<button id="infoLink" class="btn btn-default btn-xs fa
fa-question-circle" title="What is this?"
onclick="window.open('https://it.wikipedia.org/wiki/CAPTCHA')"></button>
</div>
- <div id="captcha_text" class="captcha_elem">
- <input wicket:id="captcha" type="text" size="28" />
- </div>
- <div id="captcha_message" class="captcha_elem">
- <wicket:message
key="captcha.message">[CAPTCHA_MESSAGE]</wicket:message>
+ <div>
+ <span wicket:id="captcha">[CAPTCHA]</span>
</div>
</div>
</wicket:extend>