From 7dfc160989b0cd9bbbc62ef4b1ebab5fdfe893a6 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Thu, 3 Jan 2013 11:01:16 -0400 Subject: [PATCH] BUG 10257: P.M. 2.0.46 Error al crear un trigger (PMFSendMessage) IMPROVEMENT - All fields are required. - was changed some fields a optional. --- workflow/engine/classes/class.pmFunctions.php | 16 ++++++++-------- .../templates/triggers/triggers_CreateWizard.php | 7 ++++--- .../templates/triggers/triggers_EditWizard.php | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 3965bac53..6fd6f1b30 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -779,16 +779,16 @@ function getEmailConfiguration () * * @param string(32) | $caseId | UID for case | The UID (unique identification) for a case, which is a string of 32 hexadecimal characters to identify the case. * @param string(32) | $sFrom | Email addres | The email address of the person who sends out the email. - * @param string(32) | $sTo | Email receptor | The email address(es) to whom the email is sent. If multiple recipients, separate each email address with a comma. - * @param string(32) | $sCc | Email addres for copies | The email address(es) of people who will receive carbon copies of the email. - * @param string(32) | $sBcc | Email addres for copies hidden | The email address(es) of people who will receive blind carbon copies of the email. - * @param string(32) | $sSubject | Subject of the email | The subject (title) of the email. - * @param string(32) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email. - * @param array | $aFields | An optional associative array | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values. - * @param array | $aAttachment | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email. + * @param string(100) | $sTo | Email receptor | The email address(es) to whom the email is sent. If multiple recipients, separate each email address with a comma. + * @param string(100) | $sCc = '' | Email addres for copies | The email address(es) of people who will receive carbon copies of the email. + * @param string(100) | $sBcc = ''| Email addres for copies hidden | The email address(es) of people who will receive blind carbon copies of the email. + * @param string(50) | $sSubject | Subject of the email | The subject (title) of the email. + * @param string(50) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email. + * @param array | $aFields = array() | An optional associative array | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values. + * @param array | $aAttachment = array() | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email. * @param boolean | $showMessage = true | Show message | Optional parameter. * @param int | $delIndex = 0 | Delegation index of the case | Optional parameter. The delegation index of the current task in the case. - * @return int | $result | result | Result of sending email + * @return int | | result | Result of sending email * */ //@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value. diff --git a/workflow/engine/templates/triggers/triggers_CreateWizard.php b/workflow/engine/templates/triggers/triggers_CreateWizard.php index 2c4610f61..29f6fc5ad 100755 --- a/workflow/engine/templates/triggers/triggers_CreateWizard.php +++ b/workflow/engine/templates/triggers/triggers_CreateWizard.php @@ -68,7 +68,7 @@ try { $methodReturnLabelRequired = G::LoadTranslation ( "ID_REQUIRED_FIELD" ); $fieldRequired[] = 'TRI_ANSWER'; } else { - $methodReturnLabelRequired = $methodreturnA[1]; + $methodReturnLabelRequired = G::LoadTranslation ( "ID_NOT_REQUIRED" );//$methodreturnA[1]; } $methodReturnLabel .= "
" . trim( $methodReturnLabelRequired ) . " | " . trim($methodreturnA[0]); } else { @@ -118,7 +118,7 @@ try { $sPMfunction = $sNameFun . " ("; $methodParametersOnlyNames = array (); - + if (count ( $aParametersFun ) > 0) { $template->newBlock ( 'paremetersTriggersGroup' ); $template->assign ( 'PARAMETERS_LABEL', G::LoadTranslation ( 'ID_PARAMETERS' ) ); @@ -153,7 +153,7 @@ try { $fieldDescription = ($paramDescription!="")?$paramDescription . "
":""; if ($paramDefaultValue != "") { - $fieldDescription .= $paramDefaultValue . " | " . $paramType; + $fieldDescription .= G::LoadTranslation ( "ID_NOT_REQUIRED" ) . " | " . $paramDefaultValue . " | " . $paramType; } else { $fieldDescription .= G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType; $fieldRequired[] = trim (str_replace ("$", "", $paramName)); @@ -163,6 +163,7 @@ try { } } } + $template->gotoBlock ( '_ROOT' ); $template->assign ('FIELDS_REQUIRED', implode ( ",", $fieldRequired )); $template->assign ( 'ALLFUNCTION', implode ( ",", $methodParametersOnlyNames ) ); diff --git a/workflow/engine/templates/triggers/triggers_EditWizard.php b/workflow/engine/templates/triggers/triggers_EditWizard.php index d4a8efd2d..e4fc2b935 100755 --- a/workflow/engine/templates/triggers/triggers_EditWizard.php +++ b/workflow/engine/templates/triggers/triggers_EditWizard.php @@ -67,7 +67,7 @@ try { $methodReturnLabelRequired = G::LoadTranslation ( "ID_REQUIRED_FIELD" ); $fieldRequired[] = 'TRI_ANSWER'; } else { - $methodReturnLabelRequired = $methodreturnA[1]; + $methodReturnLabelRequired = G::LoadTranslation ( "ID_NOT_REQUIRED" );//$methodreturnA[1]; } $methodReturnLabel .= "
" . trim( $methodReturnLabelRequired ) . " | " . trim($methodreturnA[0]); } else { @@ -157,7 +157,7 @@ try { $template->assign ( 'ADD_TRI_VALUE', str_replace("'", """, $paramValue) ); if ($paramDefaultValue != "") { $fieldDescription = $paramDescription . "
"; - $fieldDescription .= $paramDefaultValue . " | " . $paramType; + $fieldDescription .= G::LoadTranslation ( "ID_NOT_REQUIRED" ) . " | " . $paramDefaultValue . " | " . $paramType; } else { $fieldDescription = ""; $fieldDescription .= G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType;