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 ){
|
||||
$xmlForm = $context;
|
||||
$codes = explode('-', $reference);
|
||||
foreach($codes as $i=>$code){
|
||||
//$codes = explode('-', $reference);
|
||||
/*foreach($codes as $i=>$code){
|
||||
$codes[$i] = trim($code);
|
||||
if ( $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) ) {
|
||||
continue;
|
||||
@@ -340,11 +343,19 @@ class languages {
|
||||
|
||||
G::LoadSystem('dynaformhandler');
|
||||
$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
|
||||
$dynaform->addChilds($fieldName, Array($LOCALE=>$rowTranslation['msgstr']));
|
||||
} else if( sizeof($codes) == 3 ) { //is a node child for a language node
|
||||
$name = trim($codes[2]);
|
||||
} else if( sizeof($codes) > 2 ) { //is a node child for a language node
|
||||
$name = $match[3] == "''" ? '' : $match[3];
|
||||
$childNode = Array(
|
||||
Array('name'=>'option', 'value'=>$rowTranslation['msgstr'], 'attributes'=>Array('name'=>$name))
|
||||
);
|
||||
|
||||
@@ -173,7 +173,7 @@ foreach ($aXMLForms as $xmlFormPath) {
|
||||
|
||||
//get all fields of each xmlform
|
||||
foreach ($dynaNodes as $oNode) {
|
||||
|
||||
|
||||
$sNodeName = $oNode->nodeName;
|
||||
//$arrayNode = $dynaForm->getArray($oNode, Array('type', $_BASE_LANG, $_BASE_LANG));
|
||||
$arrayNode = $dynaForm->getArray($oNode);
|
||||
@@ -190,6 +190,11 @@ foreach ($aXMLForms as $xmlFormPath) {
|
||||
$langNode = $arrayNode[$_BASE_LANG][0];
|
||||
$originNodeText = getTextValue($langNode);
|
||||
}
|
||||
|
||||
/*if( strpos($xmlFormPath, 'patterns/patterns_GridParallelByEvaluationType.xml') !== false){
|
||||
g::pr($arrayNode);
|
||||
g::dump(getTextValue($langNode));
|
||||
}*/
|
||||
|
||||
// Getting the Base Target Text
|
||||
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( isset($aMsgids[$msgid]) )
|
||||
$msgid = '[' . $xmlFormFile . '?' . $nodeName . ']' . $originNodeText;
|
||||
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '] ' . $originNodeText;
|
||||
|
||||
$poFile->addTranslatorComment($xmlFormFile . '?' . $nodeName);
|
||||
$poFile->addTranslatorComment($xmlFormFile);
|
||||
$poFile->addReference($nodeType . ' - ' . $nodeName);
|
||||
$poFile->addTranslation($msgid, stripslashes($targetNodeText));
|
||||
|
||||
/*if( strpos($xmlFormPath, 'patterns/patterns_GridParallelByEvaluationType.xml') !== false){
|
||||
echo 'msgstr: ' .$msgid, stripslashes($targetNodeText);
|
||||
echo '<br>';
|
||||
}*/
|
||||
|
||||
|
||||
$aMsgids[$msgid] = true;
|
||||
|
||||
//if this node has options child nodes
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm name="patterns_GridParallelByEvaluationType" type="grid" width="100%">
|
||||
|
||||
<ROU_NEXT_TASK type="dropdown"><![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'
|
||||
]]><en>Next Task</en>
|
||||
</ROU_NEXT_TASK>
|
||||
<ROU_NEXT_TASK type="dropdown">
|
||||
<![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']]>
|
||||
<en>Next Task
|
||||
<option name="-1">End of process</option>
|
||||
</en>
|
||||
</ROU_NEXT_TASK>
|
||||
|
||||
<ROU_CONDITION type="textpm" size="35" maxlength="255" showVars="1" process="@#PROCESS">
|
||||
<en>Condition</en>
|
||||
<en>Condition</en>
|
||||
</ROU_CONDITION>
|
||||
<ROU_OPTIONAL type="hidden"/>
|
||||
</dynaForm>
|
||||
|
||||
Reference in New Issue
Block a user