BUG-12488 Date fields are editable even when you not select this function and the fields of date have to be validate it

Descripcion: You can edit the date field even if you don't select editable in the menu of a date field.

Solucion: Se asigna las propiedades por default a cada campo de un formulario, asi para este bug en especifico se le asigna la propiedad "editable=0" al campo tipo "Date"
This commit is contained in:
Omar Suca
2013-08-08 16:46:55 -04:00
parent 6ce905a5b4
commit bbfbfa46de

View File

@@ -132,6 +132,9 @@ if (file_exists(PATH_XMLFORM . 'dynaforms/fields/' . $type . '.xml')) {
}
}
}
if ($type === 'date' && isset($_POST['form']['PME_EDITABLE'])) {
$_POST['form']['PME_EDITABLE'] = (empty($_POST['form']['PME_EDITABLE'])) ? 0 : $_POST['form']['PME_EDITABLE'];
}
}
foreach ($_POST['form'] as $key => $value) {
@@ -229,11 +232,10 @@ unset($FieldAttributes['XMLNODE_VALUE']);
unset($FieldAttributes['BTN_CANCEL']);
unset($FieldAttributes['SAVELABEL']);
foreach ($FieldAttributes as $key => $value) {
if ($value != "") {
if (!empty($value) || is_integer($value)) {
$FieldAttrib[strtolower($key)] = $value;
}
}
$fields->saveField($attributes, $FieldAttrib, $labels);
G::LoadClass('xmlDb');