Merge 5274282ae85c
This commit is contained in:
commit
5c1765a76f
|
@ -99,7 +99,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -3181808670168474967L;
|
private static final long serialVersionUID = -9091534075824025355L;
|
||||||
|
|
||||||
private static LogAuthFailure logAuthFailure = new LogAuthFailure();
|
private static LogAuthFailure logAuthFailure = new LogAuthFailure();
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
private Checkbox chkRememberMe;
|
private Checkbox chkRememberMe;
|
||||||
private Checkbox chkSelectRole;
|
private Checkbox chkSelectRole;
|
||||||
private ToolBarButton btnResetPassword;
|
private ToolBarButton btnResetPassword;
|
||||||
|
private ConfirmPanel pnlButtons;
|
||||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||||
|
|
||||||
public LoginPanel(Properties ctx, LoginWindow loginWindow)
|
public LoginPanel(Properties ctx, LoginWindow loginWindow)
|
||||||
|
@ -241,7 +242,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
|
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||||
ConfirmPanel pnlButtons = new ConfirmPanel(false, false, false, false, false, false, true);
|
pnlButtons = new ConfirmPanel(false, false, false, false, false, false, true);
|
||||||
pnlButtons.addActionListener(this);
|
pnlButtons.addActionListener(this);
|
||||||
Button okBtn = pnlButtons.getButton(ConfirmPanel.A_OK);
|
Button okBtn = pnlButtons.getButton(ConfirmPanel.A_OK);
|
||||||
okBtn.setWidgetListener("onClick", "zAu.cmd0.showBusy(null)");
|
okBtn.setWidgetListener("onClick", "zAu.cmd0.showBusy(null)");
|
||||||
|
@ -303,6 +304,19 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Make the default language the language of client System
|
||||||
|
String defaultLanguage = MClient.get(ctx, 0).getAD_Language();
|
||||||
|
for(int i = 0; i < lstLanguage.getItemCount(); i++)
|
||||||
|
{
|
||||||
|
Comboitem li = lstLanguage.getItemAtIndex(i);
|
||||||
|
if (li.getValue().equals(defaultLanguage))
|
||||||
|
{
|
||||||
|
lstLanguage.setSelectedIndex(i);
|
||||||
|
languageChanged(li.getLabel());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initComponents()
|
private void initComponents()
|
||||||
|
@ -362,19 +376,6 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
|
|
||||||
btnResetPassword = new ToolBarButton(Msg.getMsg(Language.getBaseAD_Language(), "ForgotMyPassword"));
|
btnResetPassword = new ToolBarButton(Msg.getMsg(Language.getBaseAD_Language(), "ForgotMyPassword"));
|
||||||
btnResetPassword.setId("btnResetPassword");
|
btnResetPassword.setId("btnResetPassword");
|
||||||
|
|
||||||
// Make the default language the language of client System
|
|
||||||
String defaultLanguage = MClient.get(ctx, 0).getAD_Language();
|
|
||||||
for(int i = 0; i < lstLanguage.getItemCount(); i++)
|
|
||||||
{
|
|
||||||
Comboitem li = lstLanguage.getItemAtIndex(i);
|
|
||||||
if (li.getValue().equals(defaultLanguage))
|
|
||||||
{
|
|
||||||
lstLanguage.setSelectedIndex(i);
|
|
||||||
languageChanged(li.getLabel());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent(Event event)
|
public void onEvent(Event event)
|
||||||
|
@ -423,7 +424,11 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openLoginHelp() {
|
private void openLoginHelp() {
|
||||||
String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/wiki/Login_Help");
|
String langName = (String) lstLanguage.getSelectedItem().getValue();
|
||||||
|
langName = langName.substring(0, 2);
|
||||||
|
String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/{lang}/Login_Help");
|
||||||
|
if (helpURL.contains("{lang}"))
|
||||||
|
helpURL = Util.replace(helpURL, "{lang}", langName);
|
||||||
try {
|
try {
|
||||||
Executions.getCurrent().sendRedirect(helpURL, "_blank");
|
Executions.getCurrent().sendRedirect(helpURL, "_blank");
|
||||||
}
|
}
|
||||||
|
@ -484,6 +489,8 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
chkRememberMe.setLabel(Msg.getMsg(language, "RememberMe"));
|
chkRememberMe.setLabel(Msg.getMsg(language, "RememberMe"));
|
||||||
chkSelectRole.setLabel(Msg.getMsg(language, "SelectRole"));
|
chkSelectRole.setLabel(Msg.getMsg(language, "SelectRole"));
|
||||||
btnResetPassword.setLabel(Msg.getMsg(language, "ForgotMyPassword"));
|
btnResetPassword.setLabel(Msg.getMsg(language, "ForgotMyPassword"));
|
||||||
|
pnlButtons.getButton(ConfirmPanel.A_OK).setLabel(Util.cleanAmp(Msg.getMsg(language, ConfirmPanel.A_OK)));
|
||||||
|
pnlButtons.getButton(ConfirmPanel.A_HELP).setLabel(Util.cleanAmp(Msg.getMsg(language, ConfirmPanel.A_HELP)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Language findLanguage(String langName) {
|
private Language findLanguage(String langName) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
||||||
<div>
|
<div>
|
||||||
<vendorLogo/>
|
<vendorLogo/>
|
||||||
<loginInfo if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"/>
|
<loginInfo if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName.startsWith("demo.")}"/>
|
||||||
<versionInfo/>
|
<versionInfo/>
|
||||||
<loginLinks/>
|
<loginLinks/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="loginLinksBox" if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"
|
<div class="loginLinksBox" if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName.startsWith("demo.")}"
|
||||||
style="position: absolute; bottom: 5px;">
|
style="position: absolute; bottom: 5px;">
|
||||||
|
|
||||||
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
||||||
|
@ -29,7 +29,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
tooltiptext="iDempiere Community" style="height:32px; width:32px" target="_blank"/>
|
tooltiptext="iDempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<zscript if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}">
|
<zscript if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName.startsWith("demo.")}">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
||||||
]]>
|
]]>
|
||||||
|
|
|
@ -6,7 +6,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
<zk>
|
<zk>
|
||||||
|
|
||||||
<div style="background-color: #E5E5E5; margin: 5px;"
|
<div style="background-color: #E5E5E5; margin: 5px;"
|
||||||
if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal"}">
|
if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal"}">
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<toolbarbutton
|
<toolbarbutton
|
||||||
href="http://www.idalica.com" image="http://www.testadempiere.com/images/Idalica_Logo-grey-sm.png" target="_blank"/>
|
href="http://www.idalica.com" image="http://www.testadempiere.com/images/Idalica_Logo-grey-sm.png" target="_blank"/>
|
||||||
|
@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
</hbox>
|
</hbox>
|
||||||
</div>
|
</div>
|
||||||
<div style="background-color: #E5E5E5; margin: 5px;"
|
<div style="background-color: #E5E5E5; margin: 5px;"
|
||||||
if="${desktop.execution.localName.startsWith("demo.")}">
|
if="${desktop.execution.serverName.startsWith("demo.")}">
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<toolbarbutton
|
<toolbarbutton
|
||||||
href="http://www.idempiere.org" image="http://www.idempiere.org/_/rsrc/1341897488671/config/customLogo.gif?revision=2" target="_blank"/>
|
href="http://www.idempiere.org" image="http://www.idempiere.org/_/rsrc/1341897488671/config/customLogo.gif?revision=2" target="_blank"/>
|
||||||
|
@ -23,7 +23,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1.5em; font-weight: bold;" />
|
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1.5em; font-weight: bold;" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 90px" if="${desktop.execution.localName != "ip-10-8-0-1.ec2.internal" and ! desktop.execution.localName.startsWith("demo.")}">
|
<div style="height: 90px" if="${desktop.execution.serverName != "ip-10-8-0-1.ec2.internal" and ! desktop.execution.serverName.startsWith("demo.")}">
|
||||||
<space/>
|
<space/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right">Host</td>
|
<td align="right">Host</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td aligh="left">${desktop.execution.localName}</td>
|
<td aligh="left">${desktop.execution.serverName}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue