diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 07778674a..ca1dff7f6 100755 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -314,40 +314,50 @@ function database_upgrade($command, $args) { } } - //There records in table "EMAIL_SERVER" - $criteria = new Criteria("workflow"); + //There records in table "EMAIL_SERVER" + $criteria = new Criteria("workflow"); - $criteria->addSelectColumn(EmailServerPeer::MESS_UID); - $criteria->setOffset(0); - $criteria->setLimit(1); + $criteria->addSelectColumn(EmailServerPeer::MESS_UID); + $criteria->setOffset(0); + $criteria->setLimit(1); - $rsCriteria = EmailServerPeer::doSelectRS($criteria); + $rsCriteria = EmailServerPeer::doSelectRS($criteria); - if (!$rsCriteria->next()) { - //Insert the first record - $emailConfiguration = System::getEmailConfiguration(); + if (!$rsCriteria->next()) { + //Insert the first record + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); - if (count($emailConfiguration) > 0) { - $arrayData = array(); + $emailConfiguration = System::getEmailConfiguration(); - $arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"]; - $arrayData["MESS_SERVER"] = $emailConfiguration["MESS_SERVER"]; - $arrayData["MESS_PORT"] = (int)($emailConfiguration["MESS_PORT"]); - $arrayData["MESS_RAUTH"] = (int)($emailConfiguration["MESS_RAUTH"]); - $arrayData["MESS_ACCOUNT"] = $emailConfiguration["MESS_ACCOUNT"]; - $arrayData["MESS_PASSWORD"] = $emailConfiguration["MESS_PASSWORD"]; - $arrayData["MESS_FROM_MAIL"] = $emailConfiguration["MESS_FROM_MAIL"]; - $arrayData["MESS_FROM_NAME"] = $emailConfiguration["MESS_FROM_NAME"]; - $arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"]; - $arrayData["MESS_TRY_SEND_INMEDIATLY"] = (int)($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]); - $arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"]; - $arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0; + if (count($emailConfiguration) > 0) { + $arrayData = array(); - $emailSever = new ProcessMaker\BusinessModel\EmailServer(); + $arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"]; + $arrayData["MESS_SERVER"] = $emailConfiguration["MESS_SERVER"]; + $arrayData["MESS_PORT"] = (int)($emailConfiguration["MESS_PORT"]); + $arrayData["MESS_RAUTH"] = (int)($emailConfiguration["MESS_RAUTH"]); + $arrayData["MESS_ACCOUNT"] = $emailConfiguration["MESS_ACCOUNT"]; + $arrayData["MESS_PASSWORD"] = $emailConfiguration["MESS_PASSWORD"]; + $arrayData["MESS_FROM_MAIL"] = $emailConfiguration["MESS_FROM_MAIL"]; + $arrayData["MESS_FROM_NAME"] = $emailConfiguration["MESS_FROM_NAME"]; + $arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"]; + $arrayData["MESS_TRY_SEND_INMEDIATLY"] = (int)($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]); + $arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"]; + $arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0; - $emailSever->create($arrayData); - } - } + $arrayData = $emailSever->create($arrayData); + } else { + /*----------------------------------********---------------------------------*/ + if (true) { + // + } else { + /*----------------------------------********---------------------------------*/ + $arrayData = $emailSever->create2(array("MESS_ENGINE" => "MAIL")); + /*----------------------------------********---------------------------------*/ + } + /*----------------------------------********---------------------------------*/ + } + } } function delete_app_from_table($con, $tableName, $appUid, $col="APP_UID") { diff --git a/workflow/engine/classes/class.Installer.php b/workflow/engine/classes/class.Installer.php index 072efabd3..fbd79231d 100755 --- a/workflow/engine/classes/class.Installer.php +++ b/workflow/engine/classes/class.Installer.php @@ -224,6 +224,17 @@ class Installer fclose($fp); $this->setPartner(); $this->setAdmin(); + + /*----------------------------------********---------------------------------*/ + if (true) { + // + } else { + /*----------------------------------********---------------------------------*/ + $querySql = ("INSERT INTO EMAIL_SERVER(MESS_ENGINE) VALUES('MAIL')"); + $this->run_query($querySql); + /*----------------------------------********---------------------------------*/ + } + /*----------------------------------********---------------------------------*/ } return $test; } diff --git a/workflow/engine/classes/class.processes.php b/workflow/engine/classes/class.processes.php index 8ab163817..435dd6fd2 100755 --- a/workflow/engine/classes/class.processes.php +++ b/workflow/engine/classes/class.processes.php @@ -202,6 +202,18 @@ class Processes return $oOutput->outputExists( $sUid ); } + /** + * verify if the object exists + * + * @param string $sUid + * @return boolean + */ + public function processVariableExists ($sUid = '') + { + $oProcessVariable = new ProcessVariables(); + return $oProcessVariable->ProcessVariableExists( $sUid ); + } + /** * verify if the object exists * @@ -638,6 +650,19 @@ class Processes } } + /** + * get an unused process variables GUID + * + * @return $sProUid + */ + public function getUnusedProcessVariableGUID () + { + do { + $sNewUid = G::generateUniqueID(); + } while ($this->processVariableExists( $sNewUid )); + return $sNewUid; + } + /** * change the GUID for a serialized process * @@ -769,6 +794,12 @@ class Processes } } + if (isset($oData->processVariables)) { + foreach ($oData->processVariables as $key => $value) { + $oData->processVariables[$key]["PRJ_UID"] = $sNewProUid; + } + } + return true; } @@ -2105,6 +2136,29 @@ class Processes } } + /** + * Renew all the unique id for "Process User" + * + * @param $data Object with the data + * + * return void + */ + public function renewAllProcessVariableUid(&$data) + { + try { + $map = array (); + foreach ($data->processVariables as $key => $val) { + if (isset( $val['VAR_UID'] )) { + $newGuid = $this->getUnusedProcessVariableGUID(); + $map[$val['VAR_UID']] = $newGuid; + $data->processVariables[$key]['VAR_UID'] = $newGuid; + } + } + + } catch (Exception $e) { + throw $e; + } + } /** * Renew the GUID's for all the Uids for all the elements * @@ -2134,6 +2188,7 @@ class Processes $this->renewAllEvent( $oData ); $this->renewAllCaseScheduler( $oData ); $this->renewAllProcessUserUid($oData); + $this->renewAllProcessVariableUid($oData); } /** diff --git a/workflow/engine/classes/class.system.php b/workflow/engine/classes/class.system.php index 5874faa0d..1ec808e89 100755 --- a/workflow/engine/classes/class.system.php +++ b/workflow/engine/classes/class.system.php @@ -968,7 +968,7 @@ class System public function getEmailConfiguration () { - $emailServer = new ProcessMaker\BusinessModel\EmailServer(); + $emailServer = new \ProcessMaker\BusinessModel\EmailServer(); $arrayEmailServerDefault = $emailServer->getEmailServerDefault(); diff --git a/workflow/engine/classes/model/ProcessVariables.php b/workflow/engine/classes/model/ProcessVariables.php old mode 100644 new mode 100755 index b473d619f..6d1f2a4a2 --- a/workflow/engine/classes/model/ProcessVariables.php +++ b/workflow/engine/classes/model/ProcessVariables.php @@ -64,4 +64,26 @@ class ProcessVariables extends BaseProcessVariables { throw($oError); } } + + /** + * verify if process variable row specified in [sUid] exists. + * + * @param string $sUid the uid + */ + public function ProcessVariableExists($sUid) + { + $con = Propel::getConnection(ProcessVariablesPeer::DATABASE_NAME); + + try { + $oObj = ProcessVariablesPeer::retrieveByPk($sUid); + + if (is_object($oObj) && get_class($oObj) == 'ProcessVariables') { + return true; + } else { + return false; + } + } catch (Exception $oError) { + throw ($oError); + } + } } // ProcessVariables diff --git a/workflow/engine/classes/model/om/BaseEmailServer.php b/workflow/engine/classes/model/om/BaseEmailServer.php index 4239ebbd0..111488080 100644 --- a/workflow/engine/classes/model/om/BaseEmailServer.php +++ b/workflow/engine/classes/model/om/BaseEmailServer.php @@ -85,7 +85,7 @@ abstract class BaseEmailServer extends BaseObject implements Persistent * The value for the smtpsecure field. * @var string */ - protected $smtpsecure = ''; + protected $smtpsecure = 'No'; /** * The value for the mess_try_send_inmediatly field. @@ -475,7 +475,7 @@ abstract class BaseEmailServer extends BaseObject implements Persistent $v = (string) $v; } - if ($this->smtpsecure !== $v || $v === '') { + if ($this->smtpsecure !== $v || $v === 'No') { $this->smtpsecure = $v; $this->modifiedColumns[] = EmailServerPeer::SMTPSECURE; } diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 7764f6ae5..105e7af8c 100755 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -4204,7 +4204,7 @@ - + diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index a84927064..4571d970b 100755 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -784,6 +784,16 @@ class Installer extends Controller '" . mysql_real_escape_string( serialize( array ('LANG' => 'en','STATUS' => 'active' ) ) ) . "' )" ); + + /*----------------------------------********---------------------------------*/ + if (true) { + // + } else { + /*----------------------------------********---------------------------------*/ + $this->mysqlQuery("INSERT INTO EMAIL_SERVER(MESS_ENGINE) VALUES('MAIL')"); + /*----------------------------------********---------------------------------*/ + } + /*----------------------------------********---------------------------------*/ } // Change admin user @@ -927,7 +937,7 @@ class Installer extends Controller return $info; } } - + $this->installLog( G::LoadTranslation('ID_INDEX_FILE_UPDATED', SYS_LANG, Array($indexFileUpdated, $sysConf['default_lang'],$sysConf['default_skin']))); $this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') ); @@ -1080,6 +1090,16 @@ class Installer extends Controller '" . addslashes( serialize( array ('LANG' => 'en','STATUS' => 'active' ) ) ) . "' )" ); + + /*----------------------------------********---------------------------------*/ + if (true) { + // + } else { + /*----------------------------------********---------------------------------*/ + $this->mssqlQuery("INSERT INTO EMAIL_SERVER(MESS_ENGINE) VALUES('MAIL')"); + /*----------------------------------********---------------------------------*/ + } + /*----------------------------------********---------------------------------*/ } //change admin user diff --git a/workflow/engine/data/mssql/insert.sql b/workflow/engine/data/mssql/insert.sql index 1424383be..7d81db5ed 100755 --- a/workflow/engine/data/mssql/insert.sql +++ b/workflow/engine/data/mssql/insert.sql @@ -2554,7 +2554,7 @@ SELECT 'LABEL','ID_INFO','en','Info','2014-01-15' UNION ALL SELECT 'LABEL','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This action will delete the current document and all its versions','2014-01-15' UNION ALL -SELECT 'JAVASCRIPT','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This will delete the current document and its past versions.','2014-01-15' +SELECT 'JAVASCRIPT','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This action will delete the current document and its past versions.','2014-01-15' UNION ALL SELECT 'LABEL','ID_SETUP_MAILCONF_TITLE','en','Test SMTP Connection','2014-01-15' UNION ALL @@ -3154,15 +3154,15 @@ SELECT 'LABEL','ID_NO_SELECTION_WARNING','en','One item should be selected in or UNION ALL SELECT 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2014-01-15' UNION ALL -SELECT 'JAVASCRIPT','ID_EXIST_PROCESS','en','This process will not be saved, because another process has the same name.','2014-01-15' +SELECT 'JAVASCRIPT','ID_EXIST_PROCESS','en','This process will not be saved because there is a process with the same name.','2014-01-15' UNION ALL -SELECT 'JAVASCRIPT','ID_EXIST_DYNAFORM','en','There is a Dynaform with the same name in this process. It is not saving','2014-01-15' +SELECT 'JAVASCRIPT','ID_EXIST_DYNAFORM','en','Not saved because there is a DynaForm with the same name','2014-01-15' UNION ALL SELECT 'LABEL','ID_CLASS_TABLE_DOESNT_EXIST','en','This Class Table doesn''t exist!','2014-01-15' UNION ALL -SELECT 'JAVASCRIPT','ID_EXIST_INPUTDOCUMENT','en','Can not save, because there is an Input Document with the same name in this process.','2014-01-15' +SELECT 'JAVASCRIPT','ID_EXIST_INPUTDOCUMENT','en','Not saved because there is an Input Document with the same name in this process.','2014-01-15' UNION ALL -SELECT 'JAVASCRIPT','ID_EXIST_OUTPUTDOCUMENT','en','Can not save, because, there is an Output Document with the same name in this process.','2014-01-15' +SELECT 'JAVASCRIPT','ID_EXIST_OUTPUTDOCUMENT','en','Not saved because there is an Output Document with the same name in this process.','2014-01-15' UNION ALL SELECT 'LABEL','ID_CASE_SCHEDULER_VALIDATE_ALERT','en','User or password is empty.','2014-10-21' UNION ALL diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index c20f1b78e..ab37fe821 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -1979,7 +1979,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_EXTERNAL_FILE','en','External','2014-01-15') , ( 'LABEL','ID_INFO','en','Info','2014-01-15') , ( 'LABEL','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This action will delete the current document and all its versions','2014-01-15') , -( 'JAVASCRIPT','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This will delete the current document and its past versions.','2014-01-15') , +( 'JAVASCRIPT','ID_CONFIRM_DELETE_INPUT_AND_HISTORY','en','This action will delete the current document and its past versions.','2014-01-15') , ( 'LABEL','ID_SETUP_MAILCONF_TITLE','en','Test SMTP Connection','2014-01-15') , ( 'LABEL','DBCONNECTIONS_TITLE','en','Testing database server configuration','2014-01-15') , ( 'LABEL','ID_DBCNN_TITLE','en','Checking server configuration','2014-01-15') , @@ -2282,11 +2282,11 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_OFF','en','Off','2014-01-15') , ( 'LABEL','ID_NO_SELECTION_WARNING','en','One item should be selected in order to execute the action.','2014-01-15') , ( 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2014-01-15') , -( 'JAVASCRIPT','ID_EXIST_PROCESS','en','This process will not be saved, because another process has the same name.','2014-01-15') , -( 'JAVASCRIPT','ID_EXIST_DYNAFORM','en','There is a Dynaform with the same name in this process. It is not saving','2014-01-15') , +( 'JAVASCRIPT','ID_EXIST_PROCESS','en','This process will not be saved because there is a process with the same name.','2014-01-15') , +( 'JAVASCRIPT','ID_EXIST_DYNAFORM','en','Not saved because there is a DynaForm with the same name','2014-01-15') , ( 'LABEL','ID_CLASS_TABLE_DOESNT_EXIST','en','This Class Table doesn''t exist!','2014-01-15') , -( 'JAVASCRIPT','ID_EXIST_INPUTDOCUMENT','en','Can not save, because there is an Input Document with the same name in this process.','2014-01-15') , -( 'JAVASCRIPT','ID_EXIST_OUTPUTDOCUMENT','en','Can not save, because, there is an Output Document with the same name in this process.','2014-01-15') , +( 'JAVASCRIPT','ID_EXIST_INPUTDOCUMENT','en','Not saved because there is an Input Document with the same name in this process.','2014-01-15') , +( 'JAVASCRIPT','ID_EXIST_OUTPUTDOCUMENT','en','Not saved because there is an Output Document with the same name in this process.','2014-01-15') , ( 'LABEL','ID_CASE_SCHEDULER_VALIDATE_ALERT','en','User or password is empty.','2014-10-21') , ( 'LABEL','ID_DELEGATE_DATE_FROM','en','Delegated date from','2014-01-15') , ( 'JAVASCRIPT','ID_DUPLICATE_CATEGORY_NAME','en','Duplicate category name.','2014-01-15') ; diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql index 3ce09e07b..40fe53ca9 100755 --- a/workflow/engine/data/mysql/schema.sql +++ b/workflow/engine/data/mysql/schema.sql @@ -2427,7 +2427,7 @@ CREATE TABLE `EMAIL_SERVER` `MESS_PASSWORD` VARCHAR(256) default '' NOT NULL, `MESS_FROM_MAIL` VARCHAR(256) default '' NOT NULL, `MESS_FROM_NAME` VARCHAR(256) default '' NOT NULL, - `SMTPSECURE` VARCHAR(3) default 'NO' NOT NULL, + `SMTPSECURE` VARCHAR(3) default 'No' NOT NULL, `MESS_TRY_SEND_INMEDIATLY` INTEGER default 0 NOT NULL, `MAIL_TO` VARCHAR(256) default '' NOT NULL, `MESS_DEFAULT` INTEGER default 0 NOT NULL, diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index a4615f9c3..8f70c7433 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -36,7 +36,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1 ) { //settings options // $G_TMP_MENU->AddIdRawOption('LOGO', 'uplogo', G::LoadTranslation('ID_LOGO'), 'icon-pmlogo.png', '', 'settings'); $G_TMP_MENU->AddIdRawOption('LOGO', '../admin/pmLogo', G::LoadTranslation('ID_LOGO'), 'icon-pmlogo.png','', 'settings'); - $G_TMP_MENU->AddIdRawOption('EMAILS','../admin/emails', G::LoadTranslation('ID_EMAIL'), 'icon-email-settings1.png', '', 'settings'); + $G_TMP_MENU->AddIdRawOption("EMAIL_SERVER", "../emailServer/emailServer", G::LoadTranslation("ID_EMAIL_SERVER_TITLE"), "icon-email-settings1.png", "", "settings"); $G_TMP_MENU->AddIdRawOption('CALENDAR', 'calendarList', G::LoadTranslation('ID_CALENDAR'), 'icon-calendar.png', '', 'settings' ); //if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1) // $G_TMP_MENU->AddIdRawOption('CASES_LIST_SETUP', '../cases/casesListSetup', G::LoadTranslation('ID_CASES_LIST_SETUP'), "",'', 'settings'); @@ -103,7 +103,7 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) { $G_TMP_MENU->AddIdRawOption('EMAILS', '../mails/emailList', ucfirst (strtolower ( G::LoadTranslation('ID_EMAILS'))), '', '', 'logs'); /*----------------------------------********---------------------------------*/ if (isset($sAudit) && $sAudit != false && $licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) { - $G_TMP_MENU->AddIdRawOption('AUDIT_LOG', '../setup/auditLog', ucfirst (G::LoadTranslation('ID_AUDITLOG_DISPLAY')), '', '', 'logs'); + $G_TMP_MENU->AddIdRawOption('AUDIT_LOG', '../setup/auditLog', ucfirst (G::LoadTranslation('ID_AUDITLOG_DISPLAY')), '', '', 'logs'); } /*----------------------------------********---------------------------------*/ } diff --git a/workflow/engine/methods/emailServer/emailServer.php b/workflow/engine/methods/emailServer/emailServer.php new file mode 100644 index 000000000..7f65cf1dd --- /dev/null +++ b/workflow/engine/methods/emailServer/emailServer.php @@ -0,0 +1,22 @@ +userCanAccess("PM_SETUP") != 1) { + G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels"); + exit(0); +} + +//Data +$configuration = new Configurations(); +$arrayConfigPage = $configuration->getConfiguration("emailServerList", "pageSize", null, $_SESSION["USER_LOGGED"]); + +$arrayConfig = array(); +$arrayConfig["pageSize"] = (isset($arrayConfigPage["pageSize"]))? $arrayConfigPage["pageSize"] : 20; + +$headPublisher = &headPublisher::getSingleton(); +$headPublisher->addContent("emailServer/emailServer"); //Adding a HTML file +$headPublisher->addExtJsScript("emailServer/emailServer", false); //Adding a JavaScript file +$headPublisher->assign("CONFIG", $arrayConfig); + +G::RenderPage("publish", "extJs"); + diff --git a/workflow/engine/methods/emailServer/emailServerAjax.php b/workflow/engine/methods/emailServer/emailServerAjax.php new file mode 100644 index 000000000..78dc6c652 --- /dev/null +++ b/workflow/engine/methods/emailServer/emailServerAjax.php @@ -0,0 +1,205 @@ + $cboEmailEngine, + "MESS_SERVER" => $server, + "MESS_PORT" => $port, + "MESS_RAUTH" => $reqAuthentication, + "MESS_ACCOUNT" => $accountFrom, + "MESS_PASSWORD" => $password, + "MESS_FROM_MAIL" => $fromMail, + "MESS_FROM_NAME" => $fromName, + "SMTPSECURE" => $smtpSecure, + "MESS_TRY_SEND_INMEDIATLY" => $sendTestMail, + "MAIL_TO" => $mailTo, + "MESS_DEFAULT" => $emailServerDefault + ); + + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); + + $arrayEmailServerData = $emailSever->create($arrayData); + + $response["status"] = "OK"; + $response["data"] = $arrayEmailServerData; + } catch (Exception $e) { + $response["status"] = "ERROR"; + $response["message"] = $e->getMessage(); + } + break; + case "UPD": + $arrayData = array(); + + $emailServerUid = $_POST["emailServerUid"]; + + $server = ""; + $port = ""; + $reqAuthentication = 0; + $password = ""; + $smtpSecure = ""; + + $cboEmailEngine = $_POST["cboEmailEngine"]; + $accountFrom = (isset($_POST["accountFrom"]))? $_POST["accountFrom"] : ""; + $fromName = $_POST["fromName"]; + $fromMail = $_POST["fromMail"]; + $sendTestMail = (int)($_POST["sendTestMail"]); + $mailTo = ($sendTestMail == 1)? $_POST["mailTo"] : ""; + $emailServerDefault = (int)($_POST["emailServerDefault"]); + + if ($cboEmailEngine == "PHPMAILER") { + $server = $_POST["server"]; + $port = (int)($_POST["port"]); + $reqAuthentication = (int)($_POST["reqAuthentication"]); + $password = ($reqAuthentication == 1)? $_POST["password"] : ""; + $smtpSecure = $_POST["smtpSecure"]; + } + + try { + $arrayData = array( + "MESS_ENGINE" => $cboEmailEngine, + "MESS_SERVER" => $server, + "MESS_PORT" => $port, + "MESS_RAUTH" => $reqAuthentication, + "MESS_ACCOUNT" => $accountFrom, + "MESS_PASSWORD" => $password, + "MESS_FROM_MAIL" => $fromMail, + "MESS_FROM_NAME" => $fromName, + "SMTPSECURE" => $smtpSecure, + "MESS_TRY_SEND_INMEDIATLY" => $sendTestMail, + "MAIL_TO" => $mailTo, + "MESS_DEFAULT" => $emailServerDefault + ); + + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); + + $arrayEmailServerData = $emailSever->update($emailServerUid, $arrayData); + + $response["status"] = "OK"; + $response["data"] = $arrayEmailServerData; + } catch (Exception $e) { + $response["status"] = "ERROR"; + $response["message"] = $e->getMessage(); + } + + break; + case "DEL": + $emailServerUid = $_POST["emailServerUid"]; + + try { + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); + + $result = $emailSever->delete($emailServerUid); + + $response["status"] = "OK"; + } catch (Exception $e) { + $response["status"] = "ERROR"; + $response["message"] = $e->getMessage(); + } + break; + case "LST": + $pageSize = $_POST["pageSize"]; + $search = $_POST["search"]; + + $sortField = (isset($_POST["sort"]))? $_POST["sort"]: ""; + $sortDir = (isset($_POST["dir"]))? $_POST["dir"]: ""; + $start = (isset($_POST["start"]))? $_POST["start"]: 0; + $limit = (isset($_POST["limit"]))? $_POST["limit"]: $pageSize; + + try { + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); + + $result = $emailSever->getEmailServers(array("filter" => $search), $sortField, $sortDir, $start, $limit); + + $response["status"] = "OK"; + $response["success"] = true; + $response["resultTotal"] = $result["total"]; + $response["resultRoot"] = $result["data"]; + } catch (Exception $e) { + $response["status"] = "ERROR"; + $response["message"] = $e->getMessage(); + } + break; + case "TEST": + $arrayData = array(); + + $server = ""; + $port = ""; + $reqAuthentication = 0; + $password = ""; + $smtpSecure = ""; + + $cboEmailEngine = $_POST["cboEmailEngine"]; + $accountFrom = (isset($_POST["accountFrom"]))? $_POST["accountFrom"] : ""; + $fromName = $_POST["fromName"]; + $fromMail = $_POST["fromMail"]; + $sendTestMail = (int)($_POST["sendTestMail"]); + $mailTo = ($sendTestMail == 1)? $_POST["mailTo"] : ""; + $emailServerDefault = (int)($_POST["emailServerDefault"]); + + if ($cboEmailEngine == "PHPMAILER") { + $server = $_POST["server"]; + $port = (int)($_POST["port"]); + $reqAuthentication = (int)($_POST["reqAuthentication"]); + $password = ($reqAuthentication == 1)? $_POST["password"] : ""; + $smtpSecure = $_POST["smtpSecure"]; + } + + try { + $arrayData = array( + "MESS_ENGINE" => $cboEmailEngine, + "MESS_SERVER" => $server, + "MESS_PORT" => $port, + "MESS_RAUTH" => $reqAuthentication, + "MESS_ACCOUNT" => $accountFrom, + "MESS_PASSWORD" => $password, + "MESS_FROM_MAIL" => $fromMail, + "MESS_FROM_NAME" => $fromName, + "SMTPSECURE" => $smtpSecure, + "MESS_TRY_SEND_INMEDIATLY" => $sendTestMail, + "MAIL_TO" => $mailTo, + "MESS_DEFAULT" => $emailServerDefault + ); + + $emailSever = new \ProcessMaker\BusinessModel\EmailServer(); + + $arrayEmailServerData = $emailSever->testConnection($arrayData); + + $response["data"] = $arrayEmailServerData; + } catch (Exception $e) { + $response["status"] = "ERROR"; + $response["message"] = $e->getMessage(); + } + break; +} + +echo G::json_encode($response); + diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php b/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php index b049ccb1a..c9a04957b 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/EmailServer.php @@ -5,21 +5,16 @@ class EmailServer { private $arrayFieldDefinition = array( "MESS_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "emailServerUid"), - "MESS_ENGINE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("PHPMAILER", "MAIL"), "fieldNameAux" => "emailServerEngine"), "MESS_SERVER" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerServer"), "MESS_PORT" => array("type" => "int", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPort"), - "MESS_RAUTH" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "emailServerRauth"), - "MESS_ACCOUNT" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerUserName"), "MESS_PASSWORD" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPassword"), "MESS_FROM_MAIL" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerFromMail"), "MESS_FROM_NAME" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerFromName"), "SMTPSECURE" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("No", "tls", "ssl"), "fieldNameAux" => "emailServerSecureConnection"), - "MESS_TRY_SEND_INMEDIATLY" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "emailServerSendTestMail"), - "MAIL_TO" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerMailTo"), "MESS_DEFAULT" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "emailServerDefault") ); @@ -732,6 +727,80 @@ class EmailServer //Create $cnn = \Propel::getConnection("workflow"); + try { + $emailServer = new \EmailServer(); + + $passwd = $arrayData["MESS_PASSWORD"]; + $passwdDec = \G::decrypt($passwd, "EMAILENCRYPT"); + $auxPass = explode("hash:", $passwdDec); + + if (count($auxPass) > 1) { + if (count($auxPass) == 2) { + $passwd = $auxPass[1]; + } else { + array_shift($auxPass); + $passwd = implode("", $auxPass); + } + } + + $arrayData["MESS_PASSWORD"] = $passwd; + + if ($arrayData["MESS_PASSWORD"] != "") { + $arrayData["MESS_PASSWORD"] = "hash:" . $arrayData["MESS_PASSWORD"]; + $arrayData["MESS_PASSWORD"] = \G::encrypt($arrayData["MESS_PASSWORD"], "EMAILENCRYPT"); + } + + $emailServer->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME); + + $emailServerUid = \ProcessMaker\Util\Common::generateUID(); + + $emailServer->setMessUid($emailServerUid); + + if ($emailServer->validate()) { + $cnn->begin(); + + $result = $emailServer->save(); + + $cnn->commit(); + + if (isset($arrayData["MESS_DEFAULT"]) && (int)($arrayData["MESS_DEFAULT"]) == 1) { + $this->setEmailServerDefaultByUid($emailServerUid); + } + + //Return + return $this->getEmailServer($emailServerUid); + } else { + $msg = ""; + + foreach ($emailServer->getValidationFailures() as $validationFailure) { + $msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage(); + } + + throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . (($msg != "")? "\n" . $msg : "")); + } + } catch (\Exception $e) { + $cnn->rollback(); + + throw $e; + } + } catch (\Exception $e) { + throw $e; + } + } + + /** + * Create Email Server by data + * + * @param array $arrayData Data + * + * return array Return data of the new Email Server created + */ + public function create2(array $arrayData) + { + try { + //Create + $cnn = \Propel::getConnection("workflow"); + try { $emailServer = new \EmailServer(); @@ -804,6 +873,27 @@ class EmailServer try { $emailServer = \EmailServerPeer::retrieveByPK($emailServerUid); + + $passwd = $arrayData["MESS_PASSWORD"]; + $passwdDec = \G::decrypt($passwd, "EMAILENCRYPT"); + $auxPass = explode("hash:", $passwdDec); + + if (count($auxPass) > 1) { + if (count($auxPass) == 2) { + $passwd = $auxPass[1]; + } else { + array_shift($auxPass); + $passwd = implode("", $auxPass); + } + } + + $arrayData["MESS_PASSWORD"] = $passwd; + + if ($arrayData["MESS_PASSWORD"] != "") { + $arrayData["MESS_PASSWORD"] = "hash:" . $arrayData["MESS_PASSWORD"]; + $arrayData["MESS_PASSWORD"] = \G::encrypt($arrayData["MESS_PASSWORD"], "EMAILENCRYPT"); + } + $emailServer->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME); if ($emailServer->validate()) { @@ -1056,6 +1146,21 @@ class EmailServer while ($rsCriteria->next()) { $row = $rsCriteria->getRow(); + $passwd = $row["MESS_PASSWORD"]; + $passwdDec = \G::decrypt($passwd, "EMAILENCRYPT"); + $auxPass = explode("hash:", $passwdDec); + + if (count($auxPass) > 1) { + if (count($auxPass) == 2) { + $passwd = $auxPass[1]; + } else { + array_shift($auxPass); + $passwd = implode("", $auxPass); + } + } + + $row["MESS_PASSWORD"] = $passwd; + $arrayEmailServer[] = $this->getEmailServerDataFromRecord($row); } diff --git a/workflow/engine/templates/emailServer/emailServer.html b/workflow/engine/templates/emailServer/emailServer.html new file mode 100644 index 000000000..b50650598 --- /dev/null +++ b/workflow/engine/templates/emailServer/emailServer.html @@ -0,0 +1,2 @@ +
+ diff --git a/workflow/engine/templates/emailServer/emailServer.js b/workflow/engine/templates/emailServer/emailServer.js new file mode 100644 index 000000000..630549482 --- /dev/null +++ b/workflow/engine/templates/emailServer/emailServer.js @@ -0,0 +1,1120 @@ +Ext.namespace("emailServer"); + +emailServer.application = { + init: function () + { + var EMAILSERVEROPTION = ""; + var EMAILSERVEROPTION_AUX = ""; + + var FLAGTEST = 1; + + var loadMaskData = new Ext.LoadMask(Ext.getBody(), {msg: _("ID_LOADING_GRID")}); + + function emailServerProcessAjax(option, emailServerUid) + { + //Message + var msg = ""; + + switch (option) { + case "INS": + msg = _("ID_EMAIL_SERVER_INSERT_DATA"); + break; + case "UPD": + msg = _("ID_EMAIL_SERVER_UPDATE_DATA"); + break; + case "DEL": + msg = _("ID_EMAIL_SERVER_DELETE_DATA"); + break; + //case "LST": + // break; + case "TEST": + msg = _("ID_EMAIL_SERVER_TEST_DATA"); + break; + } + + var loadMaskAux = new Ext.LoadMask(Ext.getBody(), {msg: msg}); + loadMaskAux.show(); + + //Data + var p; + + switch (option) { + case "INS": + var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue(); + + if (typeEmailEngine == "PHPMAILER") { + var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue(); + var smtpSecure = rdoGrpOption.getGroupValue(); + + p = { + option: option, + + cboEmailEngine: typeEmailEngine, + server: Ext.getCmp("txtServer").getValue(), + port: Ext.getCmp("txtPort").getValue(), + reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0, + accountFrom: Ext.getCmp("txtAccountFrom").getValue(), + password: Ext.getCmp("txtPassword").getValue(), + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + smtpSecure: smtpSecure, + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } else { + //MAIL + p = { + option: option, + + cboEmailEngine: typeEmailEngine, + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } + break; + case "UPD": + var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue(); + + if (typeEmailEngine == "PHPMAILER") { + var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue(); + var smtpSecure = rdoGrpOption.getGroupValue(); + + p = { + option: option, + emailServerUid: emailServerUid, + + cboEmailEngine: typeEmailEngine, + server: Ext.getCmp("txtServer").getValue(), + port: Ext.getCmp("txtPort").getValue(), + reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0, + accountFrom: Ext.getCmp("txtAccountFrom").getValue(), + password: Ext.getCmp("txtPassword").getValue(), + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + smtpSecure: smtpSecure, + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } else { + //MAIL + p = { + option: option, + emailServerUid: emailServerUid, + + cboEmailEngine: typeEmailEngine, + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } + break; + case "DEL": + p = { + option: option, + emailServerUid: emailServerUid + }; + break; + //case "LST": + // break; + case "TEST": + var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue(); + + if (typeEmailEngine == "PHPMAILER") { + var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue(); + var smtpSecure = rdoGrpOption.getGroupValue(); + + p = { + option: option, + + cboEmailEngine: typeEmailEngine, + server: Ext.getCmp("txtServer").getValue(), + port: Ext.getCmp("txtPort").getValue(), + reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0, + accountFrom: Ext.getCmp("txtAccountFrom").getValue(), + password: Ext.getCmp("txtPassword").getValue(), + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + smtpSecure: smtpSecure, + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } else { + //MAIL + p = { + option: option, + + cboEmailEngine: typeEmailEngine, + fromMail: Ext.getCmp("txtFromMail").getValue(), + fromName: Ext.getCmp("txtFromName").getValue(), + sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, + mailTo: Ext.getCmp("txtMailTo").getValue(), + emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + }; + } + break; + } + + Ext.Ajax.request({ + url: "emailServerAjax", + method: "POST", + params: p, + + success: function (response, opts) + { + var dataResponse = Ext.util.JSON.decode(response.responseText); + + switch (option) { + case "INS": + case "UPD": + case "DEL": + if (dataResponse.status) { + if (dataResponse.status == "OK") { + pagingData.moveFirst(); + + switch (option) { + case "INS": + case "UPD": + winData.hide(); + break; + } + } else { + Ext.MessageBox.show({ + title: _("ID_ERROR"), + msg: dataResponse.message, + + icon: Ext.MessageBox.ERROR, + buttons: {ok: _("ID_ACCEPT")} + }); + + winData.setDisabled(false); + } + } + break; + //case "LST": + // break; + + case "TEST": + showTestConnection(typeEmailEngine, dataResponse.data); + + winTestConnection.show(); + break; + } + + loadMaskAux.hide(); + }, + failure: function (response, opts) + { + loadMaskAux.hide(); + } + }); + } + + function emailServerSetForm(option, emailServerUid) + { + switch (option) { + case "INS": + Ext.getCmp("emailServerUid").setValue(""); + + Ext.getCmp("cboEmailEngine").setValue("PHPMAILER"); + + emailServerSetEmailEngine(Ext.getCmp("cboEmailEngine").getValue()); + + Ext.getCmp("txtServer").allowBlank = true; + Ext.getCmp("txtPort").allowBlank = true; + Ext.getCmp("txtAccountFrom").allowBlank = true; + + Ext.getCmp("txtServer").setValue(""); + Ext.getCmp("txtPort").setValue(""); + + Ext.getCmp("chkReqAuthentication").setValue(false); + + emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked); + + Ext.getCmp("txtAccountFrom").setValue(""); + Ext.getCmp("txtPassword").setValue(""); + Ext.getCmp("txtFromMail").setValue(""); + Ext.getCmp("txtFromName").setValue(""); + + Ext.getCmp("rdoGrpSmtpSecure").setValue("No"); + + Ext.getCmp("chkSendTestMail").setValue(false); + + emailServerSetMailTo(Ext.getCmp("chkSendTestMail").checked); + + Ext.getCmp("txtMailTo").setValue(""); + + Ext.getCmp("chkEmailServerDefault").setValue(false); + + winData.setTitle(_("ID_EMAIL_SERVER_NEW")); + winData.setDisabled(false); + winData.show(); + + Ext.getCmp("txtServer").allowBlank = false; + Ext.getCmp("txtPort").allowBlank = false; + Ext.getCmp("txtAccountFrom").allowBlank = false; + break; + case "UPD": + var record = grdpnlMain.getSelectionModel().getSelected(); + + if (typeof(record) != "undefined") { + Ext.getCmp("emailServerUid").setValue(record.get("MESS_UID")); + + Ext.getCmp("cboEmailEngine").setValue(record.get("MESS_ENGINE")); + emailServerSetEmailEngine(record.get("MESS_ENGINE")); + + Ext.getCmp("txtServer").setValue(record.get("MESS_SERVER")); + Ext.getCmp("txtPort").setValue((record.get("MESS_PORT") != 0)? record.get("MESS_PORT") : ""); + + Ext.getCmp("chkReqAuthentication").setValue((parseInt(record.get("MESS_RAUTH")) == 1)? true : false); + + emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked); + + Ext.getCmp("txtAccountFrom").setValue(record.get("MESS_ACCOUNT")); + Ext.getCmp("txtPassword").setValue(record.get("MESS_PASSWORD")); + Ext.getCmp("txtFromMail").setValue(record.get("MESS_FROM_MAIL")); + Ext.getCmp("txtFromName").setValue(record.get("MESS_FROM_NAME")); + + Ext.getCmp("rdoGrpSmtpSecure").setValue((record.get("SMTPSECURE") != "")? record.get("SMTPSECURE") : "No"); + Ext.getCmp("chkSendTestMail").setValue((parseInt(record.get("MESS_TRY_SEND_INMEDIATLY")) == 1)? true : false); + emailServerSetMailTo(Ext.getCmp("chkSendTestMail").checked); + + Ext.getCmp("txtMailTo").setValue(record.get("MAIL_TO")); + Ext.getCmp("chkEmailServerDefault").setValue((parseInt(record.get("MESS_DEFAULT")) == 1)? true : false); + + winData.setTitle(_("ID_EMAIL_SERVER_EDIT")); + winData.setDisabled(false); + winData.show(); + } + break; + } + } + + function emailServerSetEmailEngine(cboEmailEngine) + { + Ext.getCmp("frmEmailServer").getForm().clearInvalid(); + + if (cboEmailEngine == "PHPMAILER") { + Ext.getCmp("txtServer").setVisible(true); + Ext.getCmp("txtPort").setVisible(true); + + Ext.getCmp("chkReqAuthentication").setVisible(true); + + emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked); + + Ext.getCmp("txtAccountFrom").setVisible(true); + Ext.getCmp("rdoGrpSmtpSecure").setVisible(true); + + Ext.getCmp("txtServer").allowBlank = false; + Ext.getCmp("txtPort").allowBlank = false; + Ext.getCmp("txtAccountFrom").allowBlank = false; + } else { + //MAIL + Ext.getCmp("txtServer").setVisible(false); + Ext.getCmp("txtPort").setVisible(false); + + Ext.getCmp("chkReqAuthentication").setVisible(false); + + emailServerSetPassword(false); + + Ext.getCmp("txtAccountFrom").setVisible(false); + Ext.getCmp("rdoGrpSmtpSecure").setVisible(false); + + Ext.getCmp("txtServer").allowBlank = true; + Ext.getCmp("txtPort").allowBlank = true; + Ext.getCmp("txtAccountFrom").allowBlank = true; + Ext.getCmp("txtPassword").allowBlank = true; + } + } + + function emailServerSetPassword(flagPassChecked) + { + if (flagPassChecked) { + Ext.getCmp("txtPassword").setVisible(true); + + Ext.getCmp("txtPassword").allowBlank = false; + } else { + Ext.getCmp("txtPassword").setVisible(false); + + Ext.getCmp("txtPassword").allowBlank = true; + } + } + + function emailServerSetMailTo(flagMailToChecked) + { + if (flagMailToChecked) { + Ext.getCmp("txtMailTo").setVisible(true); + + Ext.getCmp("txtMailTo").allowBlank = false; + } else { + Ext.getCmp("txtMailTo").setVisible(false); + + Ext.getCmp("txtMailTo").allowBlank = true; + } + } + + function showTestConnection(option, testData) + { + var msg = ""; + + FLAGTEST = 1; + + if (option == "PHPMAILER") { + if (typeof(testData.resolving_name) != "undefined") { + if (testData.resolving_name.result) { + msg = msg + "" + testData.resolving_name.title + "
"; + } else { + msg = msg + "" + testData.resolving_name.title + "
" + testData.resolving_name.message + "
"; + FLAGTEST = 0; + } + } + + if (typeof(testData.check_port) != "undefined") { + if (testData.check_port.result) { + msg = msg + "" + testData.check_port.title + "
"; + } else { + msg = msg + "" + testData.check_port.title + "
" + testData.check_port.message + "
"; + FLAGTEST = 0; + } + } + + if (typeof(testData.establishing_connection_host) != "undefined") { + if (testData.establishing_connection_host.result) { + msg = msg + "" + testData.establishing_connection_host.title + "
"; + } else { + msg = msg + "" + testData.establishing_connection_host.title + "
" + testData.establishing_connection_host.message + "
"; + FLAGTEST = 0; + } + } + + if (typeof(testData.login) != "undefined") { + if (testData.login.result != "") { + msg = msg + "" + testData.login.title + "
"; + } else { + msg = msg + "" + testData.login.title + "
" + testData.login.message + "
"; + FLAGTEST = 0; + } + } + + if (typeof(testData.sending_email) != "undefined") { + if (testData.sending_email.result) { + msg = msg + "" + testData.sending_email.title + "
"; + } else { + msg = msg + "" + testData.sending_email.title + "
" + testData.sending_email.message + "
"; + FLAGTEST = 0; + } + } + + } else { + //MAIL + if (typeof(testData.verifying_mail) != "undefined") { + if (testData.verifying_mail.result) { + msg = msg + "" + testData.verifying_mail.title + "
"; + } else { + msg = msg + "" + testData.verifying_mail.title + "
" + testData.verifying_mail.message + "
"; + FLAGTEST = 0; + } + } + + if (typeof(testData.sending_email) != "undefined") { + if (testData.sending_email.result) { + msg = msg + "" + testData.sending_email.title + "
"; + } else { + msg = msg + "" + testData.sending_email.title + "
" + testData.sending_email.message + "
"; + FLAGTEST = 0; + } + } + } + + var html = "
" + _("ID_EMAIL_SERVER_RESULT_TESTING") + "
"; + + html = html + msg + "
"; + + var formItems = Ext.getCmp("frmTestConnectionView").form.items; + formItems.items[0].setValue(html); + } + + function onMnuContext(grid, rowIndex, e) + { + e.stopEvent(); + + var coords = e.getXY(); + + mnuContext.showAt([coords[0], coords[1]]); + } + + //Variables + var pageSize = parseInt(CONFIG.pageSize); + + //Stores + var storeData = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: "emailServerAjax", + method: "POST" + }), + + baseParams: { + option: "LST", + pageSize: pageSize + }, + + reader: new Ext.data.JsonReader({ + totalProperty: "resultTotal", + root: "resultRoot", + + fields: [ + {name: "MESS_UID", type: "string"}, + {name: "MESS_ENGINE", type: "string"}, + {name: "MESS_SERVER", type: "string"}, + {name: "MESS_PORT", type: "int"}, + {name: "MESS_RAUTH", type: "int"}, + {name: "MESS_ACCOUNT", type: "string"}, + {name: "MESS_PASSWORD", type: "string"}, + {name: "MESS_FROM_MAIL", type: "string"}, + {name: "MESS_FROM_NAME", type: "string"}, + {name: "SMTPSECURE", type: "string"}, + {name: "MESS_TRY_SEND_INMEDIATLY", type: "int"}, + {name: "MAIL_TO", type: "string"}, + {name: "MESS_DEFAULT", type: "int"} + ] + }), + + remoteSort: true, + + listeners: { + beforeload: function (store, opt) + { + loadMaskData.show(); + + btnEdit.setDisabled(true); + btnDelete.setDisabled(true); + + this.baseParams = { + option: "LST", + pageSize: pageSize, + search: Ext.getCmp("txtSearch").getValue() + }; + }, + load: function (store, record, opt) + { + loadMaskData.hide(); + } + } + }); + + var storePageSize = new Ext.data.SimpleStore({ + fields: ["size"], + data: [["20"], ["30"], ["40"], ["50"], ["100"]], + autoLoad: true + }); + + var emailUrlValidationText = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))|((([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$/i; + + Ext.apply(Ext.form.VTypes, { + emailUrlValidation: function(val, field) + { + return emailUrlValidationText.test(val); + } + }); + + var storeDataEmailEngine = new Ext.data.ArrayStore({ + idIndex: 0, + fields: ["id", "value"], + + data: [ + ["PHPMAILER", "SMTP (PHPMailer)"], + ["MAIL", "Mail (PHP)"] + ] + }); + + var cboEmailEngine = new Ext.form.ComboBox({ + id: "cboEmailEngine", + name: "cboEmailEngine", + + valueField: "id", + displayField: "value", + + value: "PHPMAILER", + store: storeDataEmailEngine, + + fieldLabel: _("EMAIL_ENGINE"), //Email Engine + triggerAction: "all", + + mode: "local", + editable: false, + lazyRender: true, + selectOnFocus: true, + forceSelection: true, + + listeners: { + select: function(combo, value) + { + emailServerSetEmailEngine(Ext.getCmp("cboEmailEngine").getValue()); + } + } + }); + + var txtServer = new Ext.form.TextField({ + id: "txtServer", + name: "txtServer", + + fieldLabel: _("ID_SERVER") //Server + }); + + var txtPort = new Ext.form.NumberField({ + id: "txtPort", + name: "txtPort", + + fieldLabel: _("PORT_DEFAULT"), //Port (default 25) + + anchor: "36%", + maxLength: 3, + emptyText: null + }); + + var chkReqAuthentication = new Ext.form.Checkbox({ + id: "chkReqAuthentication", + name: "chkReqAuthentication", + + boxLabel: _("REQUIRE_AUTHENTICATION"), //Require authentication + + handler: function() + { + emailServerSetPassword(this.checked); + } + }); + + var txtAccountFrom = new Ext.form.TextField({ + id: "txtAccountFrom", + name: "txtAccountFrom", + + fieldLabel: _("ID_EMAIL_SERVER_ACCOUNT_FROM"), //Account From + + vtype: "emailUrlValidation" + }); + + var txtPassword = new Ext.form.TextField({ + id: "txtPassword", + name: "txtPassword", + inputType: "password", + + fieldLabel: _("ID_PASSWORD"), //Password + + hidden: true + }); + + var txtFromMail = new Ext.form.TextField({ + id: "txtFromMail", + name: "txtFromMail", + + fieldLabel: _("ID_FROM_EMAIL"), //From Mail + + vtype: "email" + }); + + var txtFromName = new Ext.form.TextField({ + id: "txtFromName", + name: "txtFromName", + + fieldLabel: _("ID_FROM_NAME") //From Name + }); + + var rdoGrpSmtpSecure = new Ext.form.RadioGroup({ + id: "rdoGrpSmtpSecure", + name: "rdoGrpSmtpSecure", + + fieldLabel: _("USE_SECURE_CONNECTION"), //Use Secure Connection + + columns: 3, + vertical: true, + + items: [ + {boxLabel: "No", inputValue: "No", name: "rdoGrpSmtpSecure", checked: true}, + {boxLabel: "TLS", inputValue: "tls", name: "rdoGrpSmtpSecure"}, + {boxLabel: "SSL", inputValue: "ssl", name: "rdoGrpSmtpSecure"} + ] + }); + + var chkSendTestMail = new Ext.form.Checkbox({ + id: "chkSendTestMail", + name: "chkSendTestMail", + + boxLabel: _("SEND_TEST_MAIL"), //Send a test mail + + handler: function() + { + emailServerSetMailTo(this.checked); + } + }); + + var txtMailTo = new Ext.form.TextField({ + id: "txtMailTo", + name: "txtMailTo", + + fieldLabel: _("MAIL_TO"), //Mail to + + hidden: true + }); + + var chkEmailServerDefault = new Ext.form.Checkbox({ + id: "chkEmailServerDefault", + name: "chkEmailServerDefault", + + boxLabel: _("ID_EMAIL_SERVER_THIS_CONFIGURATION_IS_DEFAULT") + }); + + var btnTest = new Ext.Action({ + id: "btnTest", + text: _("ID_TEST"), + + width: 55, + + handler: function () + { + if (Ext.getCmp("frmEmailServer").getForm().isValid()) { + EMAILSERVEROPTION = "TEST"; + + winData.setDisabled(true); + + emailServerProcessAjax(EMAILSERVEROPTION, ""); + } else { + Ext.MessageBox.alert(_("ID_INVALID_DATA"), _("ID_CHECK_FIELDS_MARK_RED")); + } + } + }); + + var btnSave = new Ext.Action({ + id: "btnSave", + text: _("ID_SAVE_CHANGES"), + + width: 85, + disabled: true, + + handler: function () + { + if (Ext.getCmp("frmEmailServer").getForm().isValid()) { + winData.setDisabled(true); + + emailServerProcessAjax(EMAILSERVEROPTION, Ext.getCmp("emailServerUid").getValue()); + } else { + Ext.MessageBox.alert(_("ID_INVALID_DATA"), _("ID_CHECK_FIELDS_MARK_RED")); + } + } + }); + + var btnCancel = new Ext.Action({ + id: "btnCancel", + text: _("ID_CANCEL"), + + width: 85, + disabled: false, + + handler: function () + { + winData.hide(); + } + }); + + //Components + var winData = new Ext.Window({ + layout: "fit", + width: 550, + height: 388, + //title: "", + modal: true, + resizable: false, + closeAction: "hide", + + items: [ + new Ext.FormPanel({ + id: "frmEmailServer", + + frame: true, + labelAlign: "right", + labelWidth: 150, + autoWidth: true, + autoScroll: false, + + defaults: {width: 325}, + + items: [ + { + xtype: "hidden", + id: "emailServerUid", + name: "emailServerUid" + }, + cboEmailEngine, + txtServer, + txtPort, + chkReqAuthentication, + txtAccountFrom, + txtPassword, + txtFromMail, + txtFromName, + rdoGrpSmtpSecure, + chkSendTestMail, + txtMailTo, + chkEmailServerDefault + ] + }) + ], + + buttons: [btnTest, btnSave, btnCancel] + }); + + var winTestConnection = new Ext.Window({ + layout: "fit", + width: 480, + height: 350, + title: _("ID_EMAIL_SERVER_TITLE_TESTING"), + modal: true, + resizable: false, + closeAction: "hide", + + items: [ + new Ext.FormPanel({ + id: "frmTestConnectionView", + + frame: true, + labelAlign: "right", + labelWidth: 1, + autoWidth: true, + autoScroll: true, + items: [ + { + xtype: "displayfield", + fieldLabel: "" + } + ] + }) + ], + + buttons: [ + { + id: "btnAccept", + text: _("ID_ACCEPT"), + + handler: function () + { + winTestConnection.hide(); + winData.setDisabled(false); + + if (FLAGTEST == 1) { + EMAILSERVEROPTION = EMAILSERVEROPTION_AUX; + + btnSave.setDisabled(false); + } else { + btnSave.setDisabled(true); + } + } + } + ], + + listeners: { + hide: function (win) + { + winData.setDisabled(false); + + if (FLAGTEST == 1) { + btnSave.setDisabled(false); + } else { + btnSave.setDisabled(true); + } + } + } + }); + + var btnNew = new Ext.Action({ + id: "btnNew", + + text: _("ID_NEW"), + iconCls: "button_menu_ext ss_sprite ss_add", + + handler: function () + { + EMAILSERVEROPTION = "INS"; + EMAILSERVEROPTION_AUX = "INS"; + + emailServerSetForm(EMAILSERVEROPTION, ""); + + Ext.getCmp("btnSave").disable(); + } + }); + + var btnEdit = new Ext.Action({ + id: "btnEdit", + + text: _("ID_EDIT"), + iconCls: "button_menu_ext ss_sprite ss_pencil", + + handler: function () + { + var record = grdpnlMain.getSelectionModel().getSelected(); + + if (typeof(record) != "undefined") { + Ext.getCmp("btnSave").disable(); + + EMAILSERVEROPTION = "UPD"; + EMAILSERVEROPTION_AUX = EMAILSERVEROPTION; + + emailServerSetForm(EMAILSERVEROPTION, record.get("MESS_UID")); + } + } + }); + + var btnDelete = new Ext.Action({ + id: "btnDelete", + + text: _("ID_DELETE"), + iconCls: "button_menu_ext ss_sprite ss_cross", + + handler: function () + { + var record = grdpnlMain.getSelectionModel().getSelected(); + + if (typeof(record) != "undefined") { + Ext.MessageBox.confirm( + _("ID_CONFIRM"), + _("ID_EMAIL_SERVER_DELETE_WARNING_MESSAGE"), + function (btn) + { + if (btn == "yes") { + EMAILSERVEROPTION = "DEL"; + + emailServerProcessAjax(EMAILSERVEROPTION, record.get("MESS_UID")); + } + } + ); + } + } + }); + + var btnSearch = new Ext.Action({ + id: "btnSearch", + + text: _("ID_SEARCH"), + + handler: function () + { + pagingData.moveFirst(); + } + }); + + var txtSearch = new Ext.form.TextField({ + id: "txtSearch", + + emptyText: _("ID_ENTER_SEARCH_TERM"), + width: 150, + allowBlank: true, + + listeners: { + specialkey: function (f, e) + { + if (e.getKey() == e.ENTER) { + pagingData.moveFirst(); + } + } + } + }); + + var btnTextClear = new Ext.Action({ + id: "btnTextClear", + + text: "X", + ctCls: "pm_search_x_button", + handler: function () + { + txtSearch.reset(); + } + }); + + var cboPageSize = new Ext.form.ComboBox({ + id: "cboPageSize", + + mode: "local", + triggerAction: "all", + store: storePageSize, + valueField: "size", + displayField: "size", + width: 50, + editable: false, + + listeners: { + select: function (combo, record, index) + { + pageSize = parseInt(record.data["size"]); + + pagingData.pageSize = pageSize; + pagingData.moveFirst(); + } + } + }); + + var pagingData = new Ext.PagingToolbar({ + pageSize: pageSize, + store: storeData, + displayInfo: true, + displayMsg: "Displaying data " + "{" + "0" + "}" + " - " + "{" + "1" + "}" + " of " + "{" + "2" + "}", + emptyMsg: "No data to display", + items: ["-", "Page size:", cboPageSize] + }); + + var rendererMessServer = function (value) + { + return (value != "")? value : "-"; + }; + + var rendererMessPort = function (value) + { + return (value != 0)? value : "-"; + }; + + var rendererMessSmtpSecure = function (value) + { + return (value != "")? value : "-"; + }; + + var rendererMessDefault = function (value) + { + return (value == 1)? "" : ""; + }; + + var cmodel = new Ext.grid.ColumnModel({ + defaults: { + sortable: true + }, + + columns: [ + {id: "MESS_UID", dataIndex: "MESS_UID", hidden: true, header: "uid_emailServer", width: 0, hideable: false, align: "left"}, + {id: "MESS_ENGINE", dataIndex: "MESS_ENGINE", hidden: false, header: _("EMAIL_ENGINE"), width: 80, hideable: true, align: "left"}, + {id: "MESS_SERVER", dataIndex: "MESS_SERVER", hidden: false, header: _("ID_SERVER"), width: 150, hideable: true, align: "center", renderer: rendererMessServer}, + {id: "MESS_PORT", dataIndex: "MESS_PORT", hidden: false, header: _("ID_EMAIL_SERVER_PORT"), width: 50, hideable: true, align: "center", renderer: rendererMessPort}, + {id: "MESS_RAUTH", dataIndex: "MESS_RAUTH", hidden: true, header: _("REQUIRE_AUTHENTICATION"), width: 50, hideable: false, align: "left"}, + {id: "MESS_ACCOUNT", dataIndex: "MESS_ACCOUNT", hidden: false, header: _("ID_EMAIL_SERVER_ACCOUNT_FROM"), width: 130, hideable: true, align: "left"}, + {id: "MESS_PASSWORD", dataIndex: "MESS_PASSWORD", hidden: true, header: _("ID_PASSWORD"), width: 130, hideable: false, align: "left"}, + {id: "MESS_FROM_MAIL", dataIndex: "MESS_FROM_MAIL", hidden: false, header: _("ID_FROM_EMAIL"), width: 130, hideable: true, align: "left"}, + {id: "MESS_FROM_NAME", dataIndex: "MESS_FROM_NAME", hidden: false, header: _("ID_FROM_NAME"), width: 150, hideable: true, align: "left"}, + {id: "SMTPSECURE", dataIndex: "SMTPSECURE", hidden: false, header: _("USE_SECURE_CONNECTION"), width: 140, hideable: true, align: "center", renderer: rendererMessSmtpSecure}, + {id: "MESS_TRY_SEND_INMEDIATLY", dataIndex: "MESS_TRY_SEND_INMEDIATLY", hidden: true, header: _("SEND_TEST_MAIL"), width: 50, hideable: false, align: "left"}, + {id: "MAIL_TO", dataIndex: "MAIL_TO", hidden: false, header: _("MAIL_TO"), width: 150, hideable: true, align: "left"}, + {id: "MESS_DEFAULT", dataIndex: "MESS_DEFAULT", hidden: false, header: _("ID_EMAIL_SERVER_DEFAULT"), width: 50, hideable: true, align: "center", renderer: rendererMessDefault} + ] + }); + + var smodel = new Ext.grid.RowSelectionModel({ + singleSelect: true, + listeners: { + rowselect: function (sm) + { + btnEdit.setDisabled(false); + btnDelete.setDisabled(false); + }, + rowdeselect: function (sm) + { + btnEdit.setDisabled(true); + btnDelete.setDisabled(true); + } + } + }); + + var arrayAux1 = []; + + /*----------------------------------********---------------------------------*/ + arrayAux1.push(btnNew); + arrayAux1.push("-"); + /*----------------------------------********---------------------------------*/ + arrayAux1.push(btnEdit); + /*----------------------------------********---------------------------------*/ + arrayAux1.push(btnDelete); + arrayAux1.push("->"); + arrayAux1.push(txtSearch); + arrayAux1.push(btnTextClear); + arrayAux1.push(btnSearch); + /*----------------------------------********---------------------------------*/ + + var grdpnlMain = new Ext.grid.GridPanel({ + id: "grdpnlMain", + + store: storeData, + colModel: cmodel, + selModel: smodel, + + columnLines: true, + viewConfig: {forceFit: true}, + enableColumnResize: true, + enableHdMenu: true, + + tbar: arrayAux1, + + /*----------------------------------********---------------------------------*/ + bbar: pagingData, + /*----------------------------------********---------------------------------*/ + + title: _("ID_EMAIL_SERVER_TITLE"), + border: false, + + listeners: { + rowdblclick: function (grid, rowIndex, evt) + { + var record = grdpnlMain.getSelectionModel().getSelected(); + + if (typeof(record) != "undefined") { + Ext.getCmp("btnSave").disable(); + + EMAILSERVEROPTION = "UPD"; + EMAILSERVEROPTION_AUX = EMAILSERVEROPTION; + + emailServerSetForm(EMAILSERVEROPTION, record.get("MESS_UID")); + } + } + } + }); + + var arrayAux2 = []; + + arrayAux2.push(btnEdit); + /*----------------------------------********---------------------------------*/ + arrayAux2.push(btnDelete); + /*----------------------------------********---------------------------------*/ + + var mnuContext = new Ext.menu.Menu({ + id: "mnuContext", + + items: arrayAux2 + }); + + //Initialize events + grdpnlMain.on( + "rowcontextmenu", + function (grid, rowIndex, evt) + { + var sm = grid.getSelectionModel(); + sm.selectRow(rowIndex, sm.isSelected(rowIndex)); + }, + this + ); + + grdpnlMain.addListener("rowcontextmenu", onMnuContext, this); + + cboPageSize.setValue(pageSize); + + grdpnlMain.store.load(); + + //Load all panels + var viewport = new Ext.Viewport({ + layout: "fit", + autoScroll: false, + items: [grdpnlMain] + }); + } +} + +Ext.onReady(emailServer.application.init, emailServer.application); + diff --git a/workflow/engine/xmlform/cases/cases_ListAll.xml b/workflow/engine/xmlform/cases/cases_ListAll.xml index c0d5a297d..3b28eddb6 100755 --- a/workflow/engine/xmlform/cases/cases_ListAll.xml +++ b/workflow/engine/xmlform/cases/cases_ListAll.xml @@ -55,7 +55,7 @@ Data Final - + Estado Estado diff --git a/workflow/engine/xmlform/cases/cases_ListAllDelete.xml b/workflow/engine/xmlform/cases/cases_ListAllDelete.xml index ee0d46ea6..9d7eb712a 100755 --- a/workflow/engine/xmlform/cases/cases_ListAllDelete.xml +++ b/workflow/engine/xmlform/cases/cases_ListAllDelete.xml @@ -55,7 +55,7 @@ Data Final - + Estado Estado diff --git a/workflow/engine/xmlform/cases/cases_ListAll_Reassign.xml b/workflow/engine/xmlform/cases/cases_ListAll_Reassign.xml index b83e0b1e4..ceb06fa13 100755 --- a/workflow/engine/xmlform/cases/cases_ListAll_Reassign.xml +++ b/workflow/engine/xmlform/cases/cases_ListAll_Reassign.xml @@ -46,7 +46,7 @@ Finalizar fecha - + Estado diff --git a/workflow/engine/xmlform/cases/cases_ListStarted.xml b/workflow/engine/xmlform/cases/cases_ListStarted.xml index 77b959dcd..934492a35 100755 --- a/workflow/engine/xmlform/cases/cases_ListStarted.xml +++ b/workflow/engine/xmlform/cases/cases_ListStarted.xml @@ -35,7 +35,7 @@ - + diff --git a/workflow/engine/xmlform/cases/cases_ListToRevise.xml b/workflow/engine/xmlform/cases/cases_ListToRevise.xml index 0f171ea2a..4d7430344 100755 --- a/workflow/engine/xmlform/cases/cases_ListToRevise.xml +++ b/workflow/engine/xmlform/cases/cases_ListToRevise.xml @@ -35,7 +35,7 @@ - + diff --git a/workflow/engine/xmlform/cases/cases_OptionsSent.xml b/workflow/engine/xmlform/cases/cases_OptionsSent.xml index f6f576470..33d0477fb 100755 --- a/workflow/engine/xmlform/cases/cases_OptionsSent.xml +++ b/workflow/engine/xmlform/cases/cases_OptionsSent.xml @@ -12,7 +12,7 @@ - + diff --git a/workflow/engine/xmlform/cases/cases_TransferHistory.xml b/workflow/engine/xmlform/cases/cases_TransferHistory.xml index 5afcf042d..e8e5e3ae1 100755 --- a/workflow/engine/xmlform/cases/cases_TransferHistory.xml +++ b/workflow/engine/xmlform/cases/cases_TransferHistory.xml @@ -22,7 +22,7 @@ - + diff --git a/workflow/engine/xmlform/cases/cases_advancedSearch.xml b/workflow/engine/xmlform/cases/cases_advancedSearch.xml index 7e94c737f..d5f17f8f3 100755 --- a/workflow/engine/xmlform/cases/cases_advancedSearch.xml +++ b/workflow/engine/xmlform/cases/cases_advancedSearch.xml @@ -55,7 +55,7 @@ Data Final - + Estado Estado diff --git a/workflow/engine/xmlform/cases/cases_advancedSearchFilter.xml b/workflow/engine/xmlform/cases/cases_advancedSearchFilter.xml index 8c1a6682e..b66d86f74 100755 --- a/workflow/engine/xmlform/cases/cases_advancedSearchFilter.xml +++ b/workflow/engine/xmlform/cases/cases_advancedSearchFilter.xml @@ -29,7 +29,7 @@ - + diff --git a/workflow/engine/xmlform/events/eventsEdit.xml b/workflow/engine/xmlform/events/eventsEdit.xml index e4ece2acc..8060ef19b 100755 --- a/workflow/engine/xmlform/events/eventsEdit.xml +++ b/workflow/engine/xmlform/events/eventsEdit.xml @@ -7,7 +7,7 @@ - + diff --git a/workflow/engine/xmlform/events/eventsNew.xml b/workflow/engine/xmlform/events/eventsNew.xml index cc5a300d1..6778343d7 100755 --- a/workflow/engine/xmlform/events/eventsNew.xml +++ b/workflow/engine/xmlform/events/eventsNew.xml @@ -7,7 +7,7 @@ - + diff --git a/workflow/engine/xmlform/groups/groups_AvailableUsers.xml b/workflow/engine/xmlform/groups/groups_AvailableUsers.xml index b6c74c3bc..c7afdbdd5 100755 --- a/workflow/engine/xmlform/groups/groups_AvailableUsers.xml +++ b/workflow/engine/xmlform/groups/groups_AvailableUsers.xml @@ -4,10 +4,10 @@ - + - + diff --git a/workflow/engine/xmlform/patterns/patterns_GridDiscriminator.xml b/workflow/engine/xmlform/patterns/patterns_GridDiscriminator.xml index 4c9021573..3141b658a 100755 --- a/workflow/engine/xmlform/patterns/patterns_GridDiscriminator.xml +++ b/workflow/engine/xmlform/patterns/patterns_GridDiscriminator.xml @@ -4,7 +4,7 @@ SELECT TAS_UID, CON_VALUE FROM TASK LEFT JOIN CONTENT ON (TAS_UID = CON_ID AND CON_CATEGORY = 'TAS_TITLE' AND CON_LANG = '@#LANG') WHERE PRO_UID = '@#PROCESS' ]]> - + diff --git a/workflow/engine/xmlform/processes/processes_DeleteCases.xml b/workflow/engine/xmlform/processes/processes_DeleteCases.xml index e75907762..2683ff093 100755 --- a/workflow/engine/xmlform/processes/processes_DeleteCases.xml +++ b/workflow/engine/xmlform/processes/processes_DeleteCases.xml @@ -20,6 +20,6 @@ - + diff --git a/workflow/engine/xmlform/processes/processes_Edit.xml b/workflow/engine/xmlform/processes/processes_Edit.xml index 005449a84..8025323fb 100755 --- a/workflow/engine/xmlform/processes/processes_Edit.xml +++ b/workflow/engine/xmlform/processes/processes_Edit.xml @@ -40,7 +40,7 @@ WHERE - + diff --git a/workflow/engine/xmlform/processes/processes_ImportExisting.xml b/workflow/engine/xmlform/processes/processes_ImportExisting.xml index af238c966..ff4a2b08f 100755 --- a/workflow/engine/xmlform/processes/processes_ImportExisting.xml +++ b/workflow/engine/xmlform/processes/processes_ImportExisting.xml @@ -7,7 +7,7 @@ - + diff --git a/workflow/engine/xmlform/processes/processes_ImportExistingXpdl.xml b/workflow/engine/xmlform/processes/processes_ImportExistingXpdl.xml index d602f69b0..6440c78b7 100755 --- a/workflow/engine/xmlform/processes/processes_ImportExistingXpdl.xml +++ b/workflow/engine/xmlform/processes/processes_ImportExistingXpdl.xml @@ -4,10 +4,10 @@ Importing Existing Process]]> - + - + diff --git a/workflow/engine/xmlform/processes/processes_ValidatingGroups.xml b/workflow/engine/xmlform/processes/processes_ValidatingGroups.xml index f6ea9839b..42bd69b79 100755 --- a/workflow/engine/xmlform/processes/processes_ValidatingGroups.xml +++ b/workflow/engine/xmlform/processes/processes_ValidatingGroups.xml @@ -4,7 +4,7 @@ Importing Groups]]> - + @@ -15,7 +15,7 @@ - + diff --git a/workflow/engine/xmlform/setup/emails.xml b/workflow/engine/xmlform/setup/emails.xml index 611e3b703..fa2a1371a 100755 --- a/workflow/engine/xmlform/setup/emails.xml +++ b/workflow/engine/xmlform/setup/emails.xml @@ -47,7 +47,7 @@ - + diff --git a/workflow/engine/xmlform/setup/showMessage.xml b/workflow/engine/xmlform/setup/showMessage.xml index 141ef8f34..7d326e4ff 100755 --- a/workflow/engine/xmlform/setup/showMessage.xml +++ b/workflow/engine/xmlform/setup/showMessage.xml @@ -5,6 +5,6 @@ Error - + diff --git a/workflow/engine/xmlform/setup/uplogoList.xml b/workflow/engine/xmlform/setup/uplogoList.xml index 5f30b8151..6f1ca7875 100755 --- a/workflow/engine/xmlform/setup/uplogoList.xml +++ b/workflow/engine/xmlform/setup/uplogoList.xml @@ -4,7 +4,7 @@ - + diff --git a/workflow/engine/xmlform/tracker/tracker_TransferHistory.xml b/workflow/engine/xmlform/tracker/tracker_TransferHistory.xml index f82addb0d..d9c47e4c4 100755 --- a/workflow/engine/xmlform/tracker/tracker_TransferHistory.xml +++ b/workflow/engine/xmlform/tracker/tracker_TransferHistory.xml @@ -22,6 +22,6 @@ - + diff --git a/workflow/engine/xmlform/users/users_DeleteAssign.xml b/workflow/engine/xmlform/users/users_DeleteAssign.xml index 778c47518..cdeb534dd 100755 --- a/workflow/engine/xmlform/users/users_DeleteAssign.xml +++ b/workflow/engine/xmlform/users/users_DeleteAssign.xml @@ -16,6 +16,6 @@ - +