diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java index 0e027553f2..07710deaaf 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java @@ -99,7 +99,7 @@ public class LoginPanel extends Window implements EventListener /** * */ - private static final long serialVersionUID = -3181808670168474967L; + private static final long serialVersionUID = -9091534075824025355L; private static LogAuthFailure logAuthFailure = new LogAuthFailure(); @@ -117,6 +117,7 @@ public class LoginPanel extends Window implements EventListener private Checkbox chkRememberMe; private Checkbox chkSelectRole; private ToolBarButton btnResetPassword; + private ConfirmPanel pnlButtons; boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); public LoginPanel(Properties ctx, LoginWindow loginWindow) @@ -241,7 +242,7 @@ public class LoginPanel extends Window implements EventListener div = new Div(); 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); Button okBtn = pnlButtons.getButton(ConfirmPanel.A_OK); okBtn.setWidgetListener("onClick", "zAu.cmd0.showBusy(null)"); @@ -303,6 +304,19 @@ public class LoginPanel extends Window implements EventListener } } }); + + // 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() @@ -362,19 +376,6 @@ public class LoginPanel extends Window implements EventListener btnResetPassword = new ToolBarButton(Msg.getMsg(Language.getBaseAD_Language(), "ForgotMyPassword")); 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) @@ -423,7 +424,11 @@ public class LoginPanel extends Window implements EventListener } 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 { Executions.getCurrent().sendRedirect(helpURL, "_blank"); } @@ -484,6 +489,8 @@ public class LoginPanel extends Window implements EventListener chkRememberMe.setLabel(Msg.getMsg(language, "RememberMe")); chkSelectRole.setLabel(Msg.getMsg(language, "SelectRole")); 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) { diff --git a/org.adempiere.ui.zk/theme/default/login-left.zul b/org.adempiere.ui.zk/theme/default/login-left.zul index 787cda76e2..42963b363f 100644 --- a/org.adempiere.ui.zk/theme/default/login-left.zul +++ b/org.adempiere.ui.zk/theme/default/login-left.zul @@ -9,7 +9,7 @@ Copyright (C) 2009 Idalica Corporation
- +
diff --git a/org.adempiere.ui.zk/theme/default/login-links.zul b/org.adempiere.ui.zk/theme/default/login-links.zul index 1668427d5f..ba13863fd3 100644 --- a/org.adempiere.ui.zk/theme/default/login-links.zul +++ b/org.adempiere.ui.zk/theme/default/login-links.zul @@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation } - - + diff --git a/org.adempiere.ui.zk/theme/default/vendor-logo.zul b/org.adempiere.ui.zk/theme/default/vendor-logo.zul index dc8901e62d..6a99a4aaa8 100644 --- a/org.adempiere.ui.zk/theme/default/vendor-logo.zul +++ b/org.adempiere.ui.zk/theme/default/vendor-logo.zul @@ -6,7 +6,7 @@ Copyright (C) 2009 Idalica Corporation
+ if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal"}"> @@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation
+ if="${desktop.execution.serverName.startsWith("demo.")}"> @@ -23,7 +23,7 @@ Copyright (C) 2009 Idalica Corporation style="font-family:Arial,sans-serif; color:#578BB8; font-size:1.5em; font-weight: bold;" />
-
+
diff --git a/org.adempiere.ui.zk/theme/default/version-info.zul b/org.adempiere.ui.zk/theme/default/version-info.zul index 1a7d227f7c..1e61bcbebb 100644 --- a/org.adempiere.ui.zk/theme/default/version-info.zul +++ b/org.adempiere.ui.zk/theme/default/version-info.zul @@ -55,7 +55,7 @@ Copyright (C) 2009 Idalica Corporation Host : - ${desktop.execution.localName} + ${desktop.execution.serverName}