diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java index d7cfdc1c9b..20399406c6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java @@ -53,6 +53,7 @@ import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Tr; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Image; /** @@ -314,10 +315,7 @@ public class ResetPasswordPanel extends Window implements EventListener { if (event.getTarget().getId().equals(ConfirmPanel.A_OK)) { - if (txtAnswer != null && txtAnswer.isReadonly()) - validateEmail(); - else - validateResetPassword(); + validate (); } else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL)) { @@ -326,6 +324,15 @@ public class ResetPasswordPanel extends Window implements EventListener } } + public void validate (){ + Clients.clearBusy(); + + if (txtAnswer != null && txtAnswer.isReadonly()) + validateEmail(); + else + validateResetPassword(); + } + protected void validateEmail() { String email = txtEmail.getValue(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java index 261df9bf72..dbd925db7b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java @@ -168,6 +168,12 @@ public class LoginWindow extends FWindow implements EventListener changePasswordPanel.validateChangePassword(); return; } + + ResetPasswordPanel resetPasswordPanel = (ResetPasswordPanel)this.getFellowIfAny("resetPasswordPanel"); + if (resetPasswordPanel != null){ + resetPasswordPanel.validate(); + return; + } } }