From da90c2553e2b7854375d40b09570a3c20138803b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 6 Aug 2009 16:42:38 +0000 Subject: [PATCH] Fix [2833245] - Usability - form Generate Charges two buttons same label https://sourceforge.net/tracker/?func=detail&aid=2833245&group_id=176962&atid=879332 --- client/src/org/compiere/apps/form/VCharge.java | 5 +++-- .../WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/org/compiere/apps/form/VCharge.java b/client/src/org/compiere/apps/form/VCharge.java index 21498b9de7..2c889deb49 100644 --- a/client/src/org/compiere/apps/form/VCharge.java +++ b/client/src/org/compiere/apps/form/VCharge.java @@ -53,6 +53,7 @@ import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +import org.compiere.util.Util; /** * Create Charge from Accounts @@ -137,12 +138,12 @@ public class VCharge extends Charge nameLabel.setText(Msg.translate(Env.getCtx(), "Name")); nameField.setColumns(20); valueField.setColumns(10); - newButton.setText(Msg.getMsg(Env.getCtx(), "Create")); + newButton.setText(Msg.getMsg(Env.getCtx(), "Create") + " " + Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New"))); newButton.addActionListener(this); accountPanel.setBorder(accountBorder); accountPanel.setLayout(accountLayout); accountBorder.setTitle(Msg.getMsg(Env.getCtx(), "ChargeFromAccount")); - accountButton.setText(Msg.getMsg(Env.getCtx(), "Create")); + accountButton.setText(Msg.getMsg(Env.getCtx(), "Create") + " " + Msg.getMsg(Env.getCtx(), "From") + " " + Msg.getElement(Env.getCtx(), "Account_ID")); accountButton.addActionListener(this); accountOKPanel.setLayout(accountOKLayout); accountOKLayout.setAlignment(FlowLayout.RIGHT); diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java index d4ef3c1057..804db32848 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java @@ -45,6 +45,7 @@ import org.compiere.apps.form.Charge; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; +import org.compiere.util.Util; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; @@ -277,7 +278,7 @@ public class WCharge extends Charge implements IFormController, EventListener Panel southPanel = new Panel(); southPanel.setAlign("right"); south.appendChild(southPanel); - m_btnAccount.setLabel(Msg.getMsg(Env.getCtx(), AD_MESSAGE_CREATE)); + m_btnAccount.setLabel(Msg.getMsg(Env.getCtx(), AD_MESSAGE_CREATE) + " " + Msg.getMsg(Env.getCtx(), "From") + " " + Msg.getElement(Env.getCtx(), "Account_ID")); m_btnAccount.addEventListener(Events.ON_CLICK, this); southPanel.appendChild(m_btnAccount); @@ -304,7 +305,7 @@ public class WCharge extends Charge implements IFormController, EventListener // bottom row m_lblName.setValue(Msg.translate(Env.getCtx(), EColumn.NAME.title())); m_txbNameField.setCols(nameFieldColumns); - m_btnNew.setLabel(Msg.getMsg(Env.getCtx(), AD_MESSAGE_CREATE)); + m_btnNew.setLabel(Msg.getMsg(Env.getCtx(), AD_MESSAGE_CREATE) + " " + Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New"))); m_btnNew.addEventListener(Events.ON_CLICK, this); Rows rows = new Rows();