diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js index 0cd6ab6e6..3ef59b7a4 100755 --- a/gulliver/js/common/core/common.js +++ b/gulliver/js/common/core/common.js @@ -113,7 +113,7 @@ if (typeof(asynchronous)==='undefined') asynchronous = false; data = parameters; questionMark = (ajax_server.split('?').length > 1 ) ? '&' : '?'; - if (method==='GET/POST') { + if ((method==='POST')||(method==='GET/POST')) { objetus.open( 'POST', ajax_server + ((data.length<1024)?(questionMark+data):''), asynchronous ); } else { objetus.open( method, ajax_server + ((method==='GET')? questionMark+data : '') , asynchronous ); @@ -159,7 +159,11 @@ } else if(thisform.elements[i].type == "textarea") { //Handle textareas formdata += thisform.elements[i].name + "=" + encodeURIComponent(thisform.elements[i].value); } else if(thisform.elements[i].type == "checkbox") { //Handle checkbox's - formdata += thisform.elements[i].name + '=' + ((thisform.elements[i].checked)? '1': '0'); + if (typeof(thisform.elements[i].value) != undefined) { + formdata += thisform.elements[i].name + '=' + thisform.elements[i].value; + } else { + formdata += thisform.elements[i].name + '=' + ((thisform.elements[i].checked)? '1': '0'); + } } else if(thisform.elements[i].type == "radio") { //Handle Radio buttons if(thisform.elements[i].checked==true){ formdata += thisform.elements[i].name + "=" + thisform.elements[i].value; diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 9881ab432..d2413f743 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -420,14 +420,14 @@ if(method==='POST')objetus.setRequestHeader("Content-Type","application/x-www-fo {alert("error"+ss.message);}} function ajax_post(ajax_server,parameters,method,callback,asynchronous) {var objetus;objetus=get_xmlhttp();var response;try -{if(typeof(parameters)==='object')parameters=ajax_getForm(parameters);if(!method)method="POST";if(typeof(asynchronous)==='undefined')asynchronous=false;data=parameters;questionMark=(ajax_server.split('?').length>1)?'&':'?';if(method==='GET/POST'){objetus.open('POST',ajax_server+((data.length<1024)?(questionMark+data):''),asynchronous);}else{objetus.open(method,ajax_server+((method==='GET')?questionMark+data:''),asynchronous);} +{if(typeof(parameters)==='object')parameters=ajax_getForm(parameters);if(!method)method="POST";if(typeof(asynchronous)==='undefined')asynchronous=false;data=parameters;questionMark=(ajax_server.split('?').length>1)?'&':'?';if((method==='POST')||(method==='GET/POST')){objetus.open('POST',ajax_server+((data.length<1024)?(questionMark+data):''),asynchronous);}else{objetus.open(method,ajax_server+((method==='GET')?questionMark+data:''),asynchronous);} objetus.onreadystatechange=function(){if(objetus.readyState==4) {if(objetus.status==200) {if(callback)callback(objetus.responseText);}}} if((method==='POST')||(method==='GET/POST'))objetus.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");objetus.send(((method==='GET')?null:data));if(!asynchronous) {if(callback)callback(objetus.responseText);return objetus.responseText;}}catch(ss) {alert("Error: "+var_dump(ss));}} -function ajax_getForm(thisform){var formdata='';for(var i=0;idefaultValue != "") { - $defaultValue = masktophp( $mask, $defaultValue); + if ($this->defaultValue != "") { + $defaultValue = masktophp( $mask, $defaultValue); } if (strpos( $mask, '%' ) === false) { @@ -5461,38 +5461,38 @@ function masktophp ($mask, $value) if (preg_match('/S/',$tmp)) { $tmp = str_replace("S", "s", $tmp); } - if (preg_match('/o/',$tmp)) { - $tmp = str_replace("o", "n", $tmp); + if (preg_match('/o/',$tmp)) { + $tmp = str_replace("o", "n", $tmp); } - if (preg_match('/a/',$tmp)) { - $tmp = str_replace("a", "D", $tmp); + if (preg_match('/a/',$tmp)) { + $tmp = str_replace("a", "D", $tmp); } - if (preg_match('/l/',$tmp)) { - $tmp = str_replace("l", "g", $tmp); + if (preg_match('/l/',$tmp)) { + $tmp = str_replace("l", "g", $tmp); } - if (preg_match('/A/',$tmp)) { - $tmp = str_replace("A", "l", $tmp); + if (preg_match('/A/',$tmp)) { + $tmp = str_replace("A", "l", $tmp); } - if (preg_match('/I/',$tmp)) { - $tmp = str_replace("I", "h", $tmp); + if (preg_match('/I/',$tmp)) { + $tmp = str_replace("I", "h", $tmp); } - if (preg_match('/j/',$tmp)) { - $tmp = str_replace("j", "z", $tmp); + if (preg_match('/j/',$tmp)) { + $tmp = str_replace("j", "z", $tmp); } - if (preg_match('/k/',$tmp)) { - $tmp = str_replace("k", "G", $tmp); + if (preg_match('/k/',$tmp)) { + $tmp = str_replace("k", "G", $tmp); } - if (preg_match('/e/',$tmp)) { - $tmp = str_replace("e", "j", $tmp); + if (preg_match('/e/',$tmp)) { + $tmp = str_replace("e", "j", $tmp); } - if (preg_match('/u/',$tmp)) { - $tmp = str_replace("u", "N", $tmp); + if (preg_match('/u/',$tmp)) { + $tmp = str_replace("u", "N", $tmp); } - if (preg_match('/p/',$tmp)) { - $tmp = str_replace("p", "A", $tmp); + if (preg_match('/p/',$tmp)) { + $tmp = str_replace("p", "A", $tmp); } - if (preg_match('/P/',$tmp)) { - $tmp = str_replace("P", "a", $tmp); + if (preg_match('/P/',$tmp)) { + $tmp = str_replace("P", "a", $tmp); } if ($value == 'today') { diff --git a/workflow/engine/methods/cases/cases_SaveData.php b/workflow/engine/methods/cases/cases_SaveData.php index 8586c5335..6f56ae41b 100755 --- a/workflow/engine/methods/cases/cases_SaveData.php +++ b/workflow/engine/methods/cases/cases_SaveData.php @@ -25,7 +25,6 @@ try { - if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) { throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('{1}',G::LoadTranslation( 'ID_REOPEN' ) ) ) ); diff --git a/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml b/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml index dbc888094..2d51a4aa1 100755 --- a/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml +++ b/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml @@ -75,7 +75,6 @@ } function dynaformSave ( form, bOpen ) { - alert('guardando'); var nameDynaForm = getField('DYN_TITLE').value; var proUid = getField('PRO_UID').value;