BUGS 9407 and 9411 fixed for release 2.0.42

- Added required validations
This commit is contained in:
Julio Cesar Laura
2012-07-03 17:35:19 -04:00
parent 2f218c4cc2
commit 3f6da015e6
2 changed files with 81 additions and 74 deletions

View File

@@ -4569,12 +4569,16 @@ class xmlformTemplate extends Smarty
$result [$k] = G::replaceDataField ( $form->fields [$k]->label, $form->values );
if (! is_array ( $value )) {
if ($form->type == 'grid') {
$therow = isset($form->values[$form->name]) ? count($form->values[$form->name]) : $therow;
$aAux = array ();
// $index = ($therow >count ( $form->owner->values [$form->name] ))? $therow : count($form->owner->values [$form->name] );
for($i = 0; $i < $therow; $i ++) {
$aAux = array();
if ($therow == -1) {
for($i = 0; $i < count($form->values[$form->name]); $i++) {
$aAux [] = '';
}
} else {
for($i = 0; $i < $therow; $i++) {
$aAux [] = '';
}
}
$result ['form'] [$k] = $form->fields [$k]->renderGrid ( $aAux, $form );
} else {
$result ['form'] [$k] = $form->fields [$k]->render ( $value, $form );

View File

@@ -33,6 +33,9 @@
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
if (!class_exists('PMScript')) {
G::LoadClass('pmScript');
}
/**
* ProcessMaker has made a number of its PHP functions available be used in triggers and conditions.