Merged in jennydmz/processmaker/BUG-14953 (pull request #722)

BUG-14953 WEBENTRY - ProcessMaker does not check if Javascript is running.
This commit is contained in:
Julio Cesar Laura Avendaño
2014-08-29 12:34:00 -04:00
3 changed files with 39 additions and 3 deletions

View File

@@ -72,9 +72,15 @@
$previouspage = $_POST['previous_step']['PAGE'];
$html .= '</td></tr><tr><td align="center">';
$html .= '<input type="button" value="Back" class="module_app_button___gray" onclick="javascript:history.back()">';
$html .= '<input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href=\''.$netxpage.'\'">';
if($netxpage == ""){
$html .= '<a href='.$previouspage.'>';
$html .= '<input type="button" value="Back" class="module_app_button___gray" />';
$html .= '</a>';
} else{
$html .= '<input type="button" value="Back" class="module_app_button___gray" onclick="javascript:history.back()">';
$html .= '<input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href=\''.$netxpage.'\'">';
}
echo '<div class="grid" style="width:'.$width_content.'">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>

View File

@@ -137,6 +137,30 @@ try {
* you can change it or redirect to another page
* i.e. G::header("Location: http://www.processmaker.com");
*/
$_POST['__notValidateThisFields__'] = (isset( $_POST['__notValidateThisFields__'] ) && $_POST['__notValidateThisFields__'] != '') ? $_POST['__notValidateThisFields__'] : $_POST['DynaformRequiredFields'];
if ($missing_req_values = $oForm->validateRequiredFields( $_POST['form'], Bootstrap::json_decode( stripslashes( $_POST['__notValidateThisFields__'] ) ) )) {
$fieldsRequired = Bootstrap::json_decode(str_replace(array("%27", "%39"), array("\"", "'"), $_POST["DynaformRequiredFields"]));
foreach ($fieldsRequired as $key1 => $value1) {
foreach ($missing_req_values as $key2 => $value2) {
if ($value1->name == $value2) {
$missing_req_values[$key2] = $value1->label;
}
}
}
$_POST['next_step']['PAGE'] = "";
$_POST['previous_step']['PAGE'] = $_SERVER['HTTP_REFERER'];
$_POST['req_val'] = $missing_req_values;
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'cases/missRequiredFields' );
G::RenderPage( 'publish', 'blank' );
exit( 0 );
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showInfo", "", $aMessage);
G::RenderPage("publish", "blank");