From ce48a8835ec3542caa8fdfd562958d9dc7c3b99b Mon Sep 17 00:00:00 2001 From: Zuhri Utama Date: Fri, 24 Nov 2023 21:06:10 +0700 Subject: [PATCH] IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant (#2115) * IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant * IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant #2 --- .../webui/editor/WChosenboxListEditor.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WChosenboxListEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WChosenboxListEditor.java index 0cc5223290..4344ace4b6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WChosenboxListEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WChosenboxListEditor.java @@ -286,15 +286,17 @@ public class WChosenboxListEditor extends WEditor implements ContextMenuListener addChangeLogMenu(popupMenu); popupMenu.removeNewUpdateMenu(); - Menuitem editor = new Menuitem(); - editor.setAttribute("EVENT", WEditorPopupMenu.ASSISTANT_EVENT); - editor.setLabel(Msg.getMsg(Env.getCtx(), "Assistant")); - if (ThemeManager.isUseFontIconForImage()) - editor.setIconSclass("z-icon-Wizard"); - else - editor.setImage(ThemeManager.getThemeResource("images/Wizard16.png")); - editor.addEventListener(Events.ON_CLICK, popupMenu); - popupMenu.appendChild(editor); + if(gridField.getDisplayType() == DisplayType.ChosenMultipleSelectionList && gridField.isEditable(true)) { + Menuitem editor = new Menuitem(); + editor.setAttribute("EVENT", WEditorPopupMenu.ASSISTANT_EVENT); + editor.setLabel(Msg.getMsg(Env.getCtx(), "Assistant")); + if (ThemeManager.isUseFontIconForImage()) + editor.setIconSclass("z-icon-Wizard"); + else + editor.setImage(ThemeManager.getThemeResource("images/Wizard16.png")); + editor.addEventListener(Events.ON_CLICK, popupMenu); + popupMenu.appendChild(editor); + } } }