BUG 5932: SOLVED, Now routing rule with evaluation have 'End of process' option
This commit is contained in:
committed by
Alexandre Rosenfeld
parent
94571aaef8
commit
0651e049c6
@@ -325,14 +325,17 @@ class languages {
|
|||||||
}
|
}
|
||||||
} else if( $updateXml ){
|
} else if( $updateXml ){
|
||||||
$xmlForm = $context;
|
$xmlForm = $context;
|
||||||
$codes = explode('-', $reference);
|
//$codes = explode('-', $reference);
|
||||||
foreach($codes as $i=>$code){
|
/*foreach($codes as $i=>$code){
|
||||||
$codes[$i] = trim($code);
|
$codes[$i] = trim($code);
|
||||||
if ( $codes[$i] == "''" ){
|
if ( $codes[$i] == "''" ){
|
||||||
$codes[$i] = '';
|
$codes[$i] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fieldName = trim($codes[1]);
|
$fieldName = trim($codes[1]);*/
|
||||||
|
|
||||||
|
//erik: expresion to prevent and hable correctly dropdown values like -1, -2 etc.
|
||||||
|
preg_match('/^([\w_]+)\s-\s([\w_]+)\s*-*\s*([\w\W]*)$/', $reference, $match);
|
||||||
|
|
||||||
if( ! file_exists(PATH_XMLFORM . $xmlForm) ) {
|
if( ! file_exists(PATH_XMLFORM . $xmlForm) ) {
|
||||||
continue;
|
continue;
|
||||||
@@ -340,11 +343,19 @@ class languages {
|
|||||||
|
|
||||||
G::LoadSystem('dynaformhandler');
|
G::LoadSystem('dynaformhandler');
|
||||||
$dynaform = new dynaFormHandler(PATH_XMLFORM . $xmlForm);
|
$dynaform = new dynaFormHandler(PATH_XMLFORM . $xmlForm);
|
||||||
|
$fieldName = $match[2];
|
||||||
|
if( !isset($match[2]) ){
|
||||||
|
print_r($reference);
|
||||||
|
print_r($match);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
$codes = explode('-', $reference);
|
||||||
|
|
||||||
if( sizeof($codes) == 2 ) { //is a normal node
|
if( sizeof($codes) == 2 ) { //is a normal node
|
||||||
$dynaform->addChilds($fieldName, Array($LOCALE=>$rowTranslation['msgstr']));
|
$dynaform->addChilds($fieldName, Array($LOCALE=>$rowTranslation['msgstr']));
|
||||||
} else if( sizeof($codes) == 3 ) { //is a node child for a language node
|
} else if( sizeof($codes) > 2 ) { //is a node child for a language node
|
||||||
$name = trim($codes[2]);
|
$name = $match[3] == "''" ? '' : $match[3];
|
||||||
$childNode = Array(
|
$childNode = Array(
|
||||||
Array('name'=>'option', 'value'=>$rowTranslation['msgstr'], 'attributes'=>Array('name'=>$name))
|
Array('name'=>'option', 'value'=>$rowTranslation['msgstr'], 'attributes'=>Array('name'=>$name))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ foreach ($aXMLForms as $xmlFormPath) {
|
|||||||
|
|
||||||
//get all fields of each xmlform
|
//get all fields of each xmlform
|
||||||
foreach ($dynaNodes as $oNode) {
|
foreach ($dynaNodes as $oNode) {
|
||||||
|
|
||||||
$sNodeName = $oNode->nodeName;
|
$sNodeName = $oNode->nodeName;
|
||||||
//$arrayNode = $dynaForm->getArray($oNode, Array('type', $_BASE_LANG, $_BASE_LANG));
|
//$arrayNode = $dynaForm->getArray($oNode, Array('type', $_BASE_LANG, $_BASE_LANG));
|
||||||
$arrayNode = $dynaForm->getArray($oNode);
|
$arrayNode = $dynaForm->getArray($oNode);
|
||||||
@@ -190,6 +190,11 @@ foreach ($aXMLForms as $xmlFormPath) {
|
|||||||
$langNode = $arrayNode[$_BASE_LANG][0];
|
$langNode = $arrayNode[$_BASE_LANG][0];
|
||||||
$originNodeText = getTextValue($langNode);
|
$originNodeText = getTextValue($langNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*if( strpos($xmlFormPath, 'patterns/patterns_GridParallelByEvaluationType.xml') !== false){
|
||||||
|
g::pr($arrayNode);
|
||||||
|
g::dump(getTextValue($langNode));
|
||||||
|
}*/
|
||||||
|
|
||||||
// Getting the Base Target Text
|
// Getting the Base Target Text
|
||||||
if( isset($arrayNode[$_TARGET_LANG]) ) {
|
if( isset($arrayNode[$_TARGET_LANG]) ) {
|
||||||
@@ -214,13 +219,19 @@ foreach ($aXMLForms as $xmlFormPath) {
|
|||||||
|
|
||||||
// if the nodeName already exists in the po file, we need to create other msgid
|
// if the nodeName already exists in the po file, we need to create other msgid
|
||||||
if( isset($aMsgids[$msgid]) )
|
if( isset($aMsgids[$msgid]) )
|
||||||
$msgid = '[' . $xmlFormFile . '?' . $nodeName . ']' . $originNodeText;
|
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '] ' . $originNodeText;
|
||||||
|
|
||||||
$poFile->addTranslatorComment($xmlFormFile . '?' . $nodeName);
|
$poFile->addTranslatorComment($xmlFormFile . '?' . $nodeName);
|
||||||
$poFile->addTranslatorComment($xmlFormFile);
|
$poFile->addTranslatorComment($xmlFormFile);
|
||||||
$poFile->addReference($nodeType . ' - ' . $nodeName);
|
$poFile->addReference($nodeType . ' - ' . $nodeName);
|
||||||
$poFile->addTranslation($msgid, stripslashes($targetNodeText));
|
$poFile->addTranslation($msgid, stripslashes($targetNodeText));
|
||||||
|
|
||||||
|
/*if( strpos($xmlFormPath, 'patterns/patterns_GridParallelByEvaluationType.xml') !== false){
|
||||||
|
echo 'msgstr: ' .$msgid, stripslashes($targetNodeText);
|
||||||
|
echo '<br>';
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
$aMsgids[$msgid] = true;
|
$aMsgids[$msgid] = true;
|
||||||
|
|
||||||
//if this node has options child nodes
|
//if this node has options child nodes
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<dynaForm name="patterns_GridParallelByEvaluationType" type="grid" width="100%">
|
<dynaForm name="patterns_GridParallelByEvaluationType" type="grid" width="100%">
|
||||||
|
<ROU_NEXT_TASK type="dropdown">
|
||||||
<ROU_NEXT_TASK type="dropdown"><![CDATA[
|
<![CDATA[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']]>
|
||||||
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'
|
<en>Next Task
|
||||||
]]><en>Next Task</en>
|
<option name="-1">End of process</option>
|
||||||
</ROU_NEXT_TASK>
|
</en>
|
||||||
|
</ROU_NEXT_TASK>
|
||||||
|
|
||||||
<ROU_CONDITION type="textpm" size="35" maxlength="255" showVars="1" process="@#PROCESS">
|
<ROU_CONDITION type="textpm" size="35" maxlength="255" showVars="1" process="@#PROCESS">
|
||||||
<en>Condition</en>
|
<en>Condition</en>
|
||||||
</ROU_CONDITION>
|
</ROU_CONDITION>
|
||||||
<ROU_OPTIONAL type="hidden"/>
|
<ROU_OPTIONAL type="hidden"/>
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
|
|||||||
Reference in New Issue
Block a user