BUG-14050 Gridd Issue

Delete and Add rows propertie is not saved.
This commit is contained in:
norahmollo
2014-02-10 10:55:44 -04:00
parent cce1720191
commit c3770233cd

View File

@@ -118,10 +118,10 @@ if (file_exists(PATH_XMLFORM . 'dynaforms/fields/' . $type . '.xml')) {
} }
if ($type === 'grid') { if ($type === 'grid') {
if (!isset($_POST['form']['PME_ADDROW']) || $_POST['form']['PME_ADDROW'] == '') { if (!isset($_POST['form']['PME_ADDROW']) || $_POST['form']['PME_ADDROW'] == '') {
$_POST['form']['PME_ADDROW'] = '0'; $_POST['form']['PME_ADDROW'] = 0;
} }
if (!isset($_POST['form']['PME_DELETEROW']) || $_POST['form']['PME_DELETEROW'] == '') { if (!isset($_POST['form']['PME_DELETEROW']) || $_POST['form']['PME_DELETEROW'] == '') {
$_POST['form']['PME_DELETEROW'] = '0'; $_POST['form']['PME_DELETEROW'] = 0;
} }
} }
if ($type === 'dropdown' || $type === 'listbox') { if ($type === 'dropdown' || $type === 'listbox') {
@@ -223,14 +223,15 @@ foreach ($attributes as $key => $value) {
} }
unset($attributes['VALIDATE_NAME']); unset($attributes['VALIDATE_NAME']);
$fields->setFileName(PATH_DYNAFORM . $file . '.xml'); $fields->setFileName(PATH_DYNAFORM . $file . '.xml');
$FieldAttributes = $attributes; $FieldAttributes = $attributes;
$FieldAttrib = array(); $FieldAttrib = array();
unset($FieldAttributes['XMLNODE_NAME']); unset($FieldAttributes['XMLNODE_NAME']);
unset($FieldAttributes['XMLNODE_NAME_OLD']); unset($FieldAttributes['XMLNODE_NAME_OLD']);
unset($FieldAttributes['XMLNODE_VALUE']); unset($FieldAttributes['XMLNODE_VALUE']);
unset($FieldAttributes['BTN_CANCEL']); unset($FieldAttributes['BTN_CANCEL']);
unset($FieldAttributes['SAVELABEL']); unset($FieldAttributes['SAVELABEL']);
foreach ($FieldAttributes as $key => $value) { foreach ($FieldAttributes as $key => $value) {
switch (gettype($value)) { switch (gettype($value)) {
case 'string': case 'string':