diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 8be454dc4..ca6c9a9ca 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -1354,12 +1354,13 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $value = $formVariableValue; } $name = "'" . $this->name . "'"; - $str = 'NSFieldType() . ' onblur="idSet(' . $name . ');" '; + $str = 'NSDependentFields( true ) . ' '; $str .= '/>'; $str .= 'name . ']" '; $str .= 'name="form[' . $this->name . ']" '; + $str .= $this->NSFieldType() . ' '; $str .= 'value="' . $this->htmlentities( $formVariableKeyValue, ENT_COMPAT, 'utf-8' ) . '" '; $str .= 'type="hidden" />'; @@ -1493,7 +1494,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek return $str; } } else { - $html = 'NSFieldType() .' >'; + $html = 'NSFieldType() . ' >'; $html .= $this->htmlentities($formVariableValue, ENT_COMPAT, 'utf-8'); $html .= ''; return $html; @@ -1557,7 +1558,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $value = $formVariableValue; } $name = "'" . $this->name . "'"; - $str = 'NSGridType() . ' onblur="idSet(' . $name . ');" '; + $str = 'NSDependentFields( true ) . ' '; $str .= $this->NSRequiredValue() . ' '; $str .= $this->NSGridLabel() . ' '; @@ -1565,6 +1566,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $str .= 'name . ']" '; $str .= 'name="form' . $rowId . '[' . $this->name . ']" '; + $str .= $this->NSGridType() . ' '; $str .= 'value="' . $this->htmlentities( $formVariableKeyValue, ENT_COMPAT, 'utf-8' ) . '" '; $str .= 'type="hidden" />'; @@ -1681,7 +1683,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek return $str; } } else { - $str = 'name . ']" name="form' . $rowId . '[' . $this->name . ']" ' . $this->NSGridType() . ' >'; + $str = 'NSGridType() . ' >'; $str .= $this->htmlentities( $formVariableValue, ENT_COMPAT, 'utf-8' ); $str .= ''; return $str; @@ -2681,11 +2683,13 @@ class XmlForm_Field_YesNo extends XmlForm_Field //EDIT MODE $readOnlyText = ($this->readonly == 1 || $this->readonly == '1') ? 'disabled' : ''; $html .= 'name . ']" '; $html .= 'name="form[' . $this->name . ']" '; + $html .= $this->NSFieldType() . ' '; $html .= 'type="hidden" value="' . (($value === '0') ? '0' : '1') . '" />'; } } else { @@ -2735,12 +2740,14 @@ class XmlForm_Field_YesNo extends XmlForm_Field //EDIT MODE $readOnlyText = ($this->readonly == 1 || $this->readonly == '1') ? 'disabled' : ''; $html .= 'name . '][' . $r . '][' . $this->name . ']" '; $html .= 'name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" '; + $html .= $this->NSGridType() . ' '; $html .= 'type="hidden" value="' . (($v === '0') ? '0' : '1') . '" />'; } } else { @@ -3177,13 +3185,12 @@ class XmlForm_Field_Checkbox extends XmlForm_Field } elseif ($this->mode === 'view') { $checked = (isset( $value ) && ($value == $this->value)) ? 'checked' : ''; if ($this->labelOnRight) { - $html = ''; - $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled /> + $html = " " . $this->label . ''; } else { - $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled />"; + $html = ""; } - $html .= ""; + $html .= "NSFieldType() . " value='{$value}' />"; return $html; } } @@ -3734,7 +3741,7 @@ class XmlForm_Field_Listbox extends XmlForm_Field return $html; } elseif ($this->mode === 'view') { $valuesFound = array('__NULL__'); - $html = ''; foreach ($this->option as $optionName => $option) { if (in_array( $optionName . "", $value )) { $valuesFound[] = $optionName . ""; @@ -3755,15 +3762,15 @@ class XmlForm_Field_Listbox extends XmlForm_Field } $html .= ''; foreach ($this->option as $optionName => $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; + $html .= "name . "][" . $optionName . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; } foreach ($this->sqlOption as $optionName => $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; + $html .= "name . "][" . $optionName . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; } if (count($valuesFound) - 1 < count($value)) { $valuesNotFound = array_diff($value, $valuesFound); foreach ($valuesNotFound as $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . $option . "\">"; + $html .= "name . "][" . $option . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . $option . "\">"; } } return $html; @@ -4678,7 +4685,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText $html = '' . '' . ' ' . '' . '' . ' ' . '' . ''; } } else { - $html = "$value" . ''; + $html = "$value" . ''; } /** * * Commented because seems is not working well *