From 2240773cba0076aa1f60bd9f279dbd0b85d95d36 Mon Sep 17 00:00:00 2001 From: u1 Date: Mon, 7 Aug 2017 23:52:32 -0400 Subject: [PATCH] HOR-3365 conflict resolution --- .../content/translations/english/processmaker.en.po | 9 +++++++-- workflow/engine/data/mysql/insert.sql | 3 ++- .../src/ProcessMaker/BusinessModel/WebEntryEvent.php | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index a89380ea1..f2e55728a 100644 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -15440,8 +15440,13 @@ msgid "Remove selected" msgstr "Remove selected" # TRANSLATION -# LABEL/ENTER_VALID_URL -#: LABEL/ENTER_VALID_URL +# LABEL/ID_SELECT_DYNAFORM_USE_IN_CASE +#: LABEL/ID_SELECT_DYNAFORM_USE_IN_CASE +msgid "The \"dyn_uid\" parameter is required to configure a Web Entry of type \"Single Dynaform\"" +msgstr "The \"dyn_uid\" parameter is required to configure a Web Entry of type \"Single Dynaform\"" + +# LABEL/ID_ENTER_VALID_URL +#: LABEL/ID_ENTER_VALID_URL msgid "Enter a valid URL to redirect the browser after the web entry is completed" msgstr "Enter a valid URL to redirect the browser after the web entry is completed" diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 73820b0f2..85ea16483 100644 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -4068,8 +4068,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_SMTP_ERROR_MET_TURN_SMTP_NOT_IMPLEMENTED','en','The method TURN of the SMTP is not implemented','2014-10-21') , ( 'LABEL','ID_EVENT_ADD_CURRENT','en','Add current task user','2014-02-12') , ( 'LABEL','ID_EVENT_ADD_USERS','en','Add users','2014-02-12') , +( 'LABEL','ID_SELECT_DYNAFORM_USE_IN_CASE','en','The "dyn_uid" parameter is required to configure a Web Entry of type "Single Dynaform"','2017-07-05') , ( 'LABEL','ID_EVENT_REMOVE_SELECTED','en','Remove selected','2014-02-12') , -( 'LABEL','ENTER_VALID_URL','en','Enter a valid URL to redirect the browser after the web entry is completed','2017-07-04') ; +( 'LABEL','ID_ENTER_VALID_URL','en','Enter a valid URL to redirect the browser after the web entry is completed','2017-07-04') ; INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES ( 'LABEL','ID_EVENT_ADD_DYNAVAR','en','Add dynavar','2014-02-12') , diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php index b3bb30349..258e4bdf1 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/WebEntryEvent.php @@ -351,8 +351,12 @@ class WebEntryEvent $process->throwExceptionIfNotExistsUser($arrayData["USR_UID"], $this->arrayFieldNameForException["userUid"]); } + if ($arrayData["WE_TYPE"] === "SINGLE" && empty($arrayData["DYN_UID"])) { + throw new \Exception(\G::LoadTranslation("ID_SELECT_DYNAFORM_USE_IN_CASE")); + } + if ($arrayData["WE_CALLBACK"] === "CUSTOM" && empty($arrayData["WE_CALLBACK_URL"])) { - throw new \Exception(\G::LoadTranslation("ENTER_VALID_URL")); + throw new \Exception(\G::LoadTranslation("ID_ENTER_VALID_URL")); } } catch (\Exception $e) { throw $e;