BUG 12295 "No se pueden guardar las importaciones..." SOLVED

- No se pueden guardar las importaciones de triggers en un proceso.
- Problema resuelto, se han adicionado validaciones al importar un Triggers. Al seleccionar un Triggers de un proceso en
  la importacion el codigo fuente se muestra y se lo guardar con normalidad.
* Available from version ProcessMaker-2.5.2-testing.1
This commit is contained in:
Luis Fernando Saisa Lopez
2013-07-19 14:22:35 -04:00
parent a9562dfa3e
commit 0115e23f7c
2 changed files with 34 additions and 8 deletions

View File

@@ -33,6 +33,9 @@
<td class='FormLabel' width="{$form_labelWidth}">{$TRIGGER_UID}</td>
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRIGGER_UID}</td>
</tr>
<div style="display: none;">{$form.TRIGGER_UID_AUX}</div>
<tr>
<td class='FormLabel' width="{$form_labelWidth}"><font color="red">* </font>{$TRI_TITLE}</td>
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRI_TITLE}</td>

View File

@@ -26,7 +26,7 @@
</en>
</PROCESS_UID>
<TRIGGER_UID type="dropdown" dependentfields="TRI_DESCRIPTION,TRI_WEBBOT" >
<TRIGGER_UID type="dropdown" dependentfields="TRI_WEBBOT,TRI_DESCRIPTION,TRIGGER_UID_AUX" >
<![CDATA[
SELECT TGR.TRI_UID, CON.CON_VALUE
FROM TRIGGERS AS TGR, CONTENT AS CON
@@ -41,6 +41,15 @@
</en>
</TRIGGER_UID>
<TRIGGER_UID_AUX type="text" maxlength="64" validate="Any" size="15" mode="edit">
<![CDATA[
SELECT TGR.TRI_UID
FROM TRIGGERS AS TGR
WHERE TGR.TRI_UID = '@#TRIGGER_UID'
]]>
<en></en>
</TRIGGER_UID_AUX>
<TRI_TITLE type="text" size="70" maxlength="100" required="1" >
<en>Title of the new trigger</en>
</TRI_TITLE>
@@ -55,7 +64,7 @@
<en>Description of the new trigger</en>
</TRI_DESCRIPTION>
<TRI_WEBBOT type="textarea" rows="10" cols="67" readonly="1" onChange="alert('des:'+document.getElementById('form[TRI_WEBBOT]').value); triggerEditor.setCode(document.getElementById('form[TRI_WEBBOT]').value);">
<TRI_WEBBOT type="textarea" rows="10" cols="67" readonly="1">
<![CDATA[
SELECT TGR.TRI_WEBBOT
FROM TRIGGERS AS TGR
@@ -100,8 +109,21 @@
currentPopupWindow.remove();
}
function triggerCheckWebbotTimer()
{
var triUid = getField("TRIGGER_UID_AUX").value;
if (triUid != triUidPrev) {
triggerEditor.setValue(document.getElementById("form[TRI_WEBBOT]").value);
triUidPrev = triUid;
} else {
setTimeout("triggerCheckWebbotTimer()", 100);
}
}
var cboTriggerUid = getField("TRIGGER_UID");
var txtTgrTitle = getField("TRI_TITLE");
var triUidPrev = "";
leimnud.event.add(
getField("PROCESS_UID"),
@@ -109,6 +131,8 @@
function ()
{
txtTgrTitle.value = "";
triggerEditor.setValue("");
triUidPrev= "";
}
);
@@ -117,14 +141,13 @@
"change",
function ()
{
txtTgrTitle.value = "";
if (cboTriggerUid.value != "") {
txtTgrTitle.value = cboTriggerUid.options[cboTriggerUid.selectedIndex].text;
}
if (triggerEditor) {
triggerEditor.setValue(document.getElementById('form[TRI_WEBBOT]').value);
//triggerEditor.setCode(document.getElementById('form[TRI_WEBBOT]').value);
setTimeout("triggerCheckWebbotTimer()", 100);
} else {
txtTgrTitle.value = "";
triggerEditor.setValue("");
triUidPrev= "";
}
}
);