From 6ef5c587ac712c4d5eeebb0a0b864a0f82b48154 Mon Sep 17 00:00:00 2001
From: "yogeshwar.g" <yogeshwar.g@vtigersolutions.com>
Date: Sun, 7 Apr 2024 17:16:43 +0530
Subject: [PATCH] #Fixes::158404979::Yogeshwar::In the workflow while updating
 the fields ,the field type multiple combo picklist allowing to enter the
 value apart from the value present in the picklist

---
 languages/en_us/Vtiger.php                              | 2 +-
 layouts/v7/modules/Settings/Workflows/resources/Edit.js | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/languages/en_us/Vtiger.php b/languages/en_us/Vtiger.php
index ecb68bcbc..7a186a110 100644
--- a/languages/en_us/Vtiger.php
+++ b/languages/en_us/Vtiger.php
@@ -1421,7 +1421,7 @@ $jsLanguageStrings = array(
 	'JS_SUBJECT_VALUE_CANT_BE_EMPTY' => 'Subject value cannot be empty',
 	'JS_PERCENTAGE_SHOULD_BE_LESS_THAN_100' => 'Percentage should be less than 100',
 
-
+	'INVALID PICKLIST'  => 'Invalid value for Picklist field',
 	'INVALID_NUMBER_OF' => 'Invalid number of',
 	'INVALID_NUMBER' => 'Invalid number',
 	'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Are you sure that you want to delete?',
diff --git a/layouts/v7/modules/Settings/Workflows/resources/Edit.js b/layouts/v7/modules/Settings/Workflows/resources/Edit.js
index 4954a8f0c..87f8edc6e 100644
--- a/layouts/v7/modules/Settings/Workflows/resources/Edit.js
+++ b/layouts/v7/modules/Settings/Workflows/resources/Edit.js
@@ -951,7 +951,8 @@ Settings_Vtiger_Edit_Js("Settings_Workflows_Edit_Js", {
          jQuery('.btn-success').on('click', function(event) {
             var enteredValue = fieldSpecificUi.val().trim();
             if (!editablePicklistValues.includes(enteredValue)) {
-               alert('Invalid value entered for picklist field: ' + enteredValue);
+               var message = app.vtranslate('INVALID PICKLIST');
+               app.helper.showErrorNotification({'message': message})
                event.preventDefault();
             }
          });
-- 
GitLab