IDEMPIERE-1935:in changepassword window, push "enter" key make waiting window never end
This commit is contained in:
parent
7aa1fe51b2
commit
45ede791a4
|
@ -53,6 +53,7 @@ import org.zkoss.zhtml.Td;
|
||||||
import org.zkoss.zhtml.Tr;
|
import org.zkoss.zhtml.Tr;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Image;
|
import org.zkoss.zul.Image;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,10 +315,7 @@ public class ResetPasswordPanel extends Window implements EventListener<Event>
|
||||||
{
|
{
|
||||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||||
{
|
{
|
||||||
if (txtAnswer != null && txtAnswer.isReadonly())
|
validate ();
|
||||||
validateEmail();
|
|
||||||
else
|
|
||||||
validateResetPassword();
|
|
||||||
}
|
}
|
||||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||||
{
|
{
|
||||||
|
@ -326,6 +324,15 @@ public class ResetPasswordPanel extends Window implements EventListener<Event>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void validate (){
|
||||||
|
Clients.clearBusy();
|
||||||
|
|
||||||
|
if (txtAnswer != null && txtAnswer.isReadonly())
|
||||||
|
validateEmail();
|
||||||
|
else
|
||||||
|
validateResetPassword();
|
||||||
|
}
|
||||||
|
|
||||||
protected void validateEmail()
|
protected void validateEmail()
|
||||||
{
|
{
|
||||||
String email = txtEmail.getValue();
|
String email = txtEmail.getValue();
|
||||||
|
|
|
@ -168,6 +168,12 @@ public class LoginWindow extends FWindow implements EventListener<Event>
|
||||||
changePasswordPanel.validateChangePassword();
|
changePasswordPanel.validateChangePassword();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResetPasswordPanel resetPasswordPanel = (ResetPasswordPanel)this.getFellowIfAny("resetPasswordPanel");
|
||||||
|
if (resetPasswordPanel != null){
|
||||||
|
resetPasswordPanel.validate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue