BUG 10906 Campo Check box no funciona correctamente en version 2.0.46-testing.7 SOLVED
- Cuando el valor de una grilla no contiene los valores de una columna los checboxes no se muertan - Los datos de una grilla son sanitizados antes de ser enviado al metodo renderGrid
This commit is contained in:
@@ -5558,6 +5558,24 @@ class xmlformTemplate extends Smarty
|
||||
}*/
|
||||
|
||||
if ($field->type == "grid") {
|
||||
// Fix data for grids
|
||||
if (is_array($form->fields[$k]->fields)) {
|
||||
foreach ($form->fields[$k]->fields as $gridFieldName => $gridField) {
|
||||
for ($i = 1; $i <= count($value); $i++) {
|
||||
if (!isset($value[$i][$gridFieldName])) {
|
||||
switch ($gridField->type) {
|
||||
case 'checkbox':
|
||||
$defaultAttribute = 'falseValue';
|
||||
break;
|
||||
default:
|
||||
$defaultAttribute = 'defaultValue';
|
||||
break;
|
||||
}
|
||||
$value[$i][$gridFieldName] = isset($gridField->$defaultAttribute) ? $gridField->$defaultAttribute : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$result["form"][$k] = $form->fields[$k]->renderGrid( $value, $form, $therow );
|
||||
} else {
|
||||
switch ($field->type) {
|
||||
|
||||
Reference in New Issue
Block a user