Legend:
- Unmodified
- Added
- Removed
-
forms.php
r20 r21 9 9 var $OnSubmit = ''; 10 10 11 function DefinitionTextTypeToNumericType()12 {13 global $TypeNames;14 15 foreach($this->Definition['Items'] as $Index => $Definition)16 if(!is_numeric($Definition['Type'])) $this->Definition['Items'][$Index]['Type'] = $TypeNames[$Definition['Type']];17 }18 19 11 function ShowEditForm() 20 12 { 21 $this->DefinitionTextTypeToNumericType();22 13 $Output = '<center><form enctype="multipart/form-data" action="'.$this->OnSubmit.'" method="post"><div align="center">'; 23 14 $Table = $this->ShowEditBlock(); … … 28 19 function ShowEditBlock($Context = '') 29 20 { 30 global $Database , $Types, $TypeNames;21 global $Database; 31 22 32 23 $Table = array( … … 37 28 foreach($this->Definition['Items'] as $Index => $Item) 38 29 { 39 if($Item['Type'] != $TypeNames['Hidden'])30 if($Item['Type'] != TypeHiddenId) 40 31 { 41 32 if(!array_key_exists($Index, $this->Values) and isset($Item['Value'])) $this->Values[$Index] = $Item['Value']; … … 49 40 function ShowHiddenBlock($Context = '') 50 41 { 51 global $Database , $Types, $TypeNames;42 global $Database; 52 43 53 44 $Output = ''; … … 55 46 foreach($this->Definition['Items'] as $Item) 56 47 { 57 if($Item['Type'] == $TypeNames['Hidden'])48 if($Item['Type'] == TypeHiddenId) 58 49 { 59 50 if(!array_key_exists($Item['Name'], $this->Values) and isset($Item['Value'])) $this->Values[$Item['Name']] = $Item['Value']; … … 67 58 function ShowReadOnlyForm() 68 59 { 69 $this->DefinitionTextTypeToNumericType();70 71 60 $Output = '<center><div align="center">'; 72 61 $Table = $this->ShowReadOnlyBlock(); … … 77 66 function ShowReadOnlyBlock($Context = '') 78 67 { 79 global $Database , $Types;68 global $Database; 80 69 81 70 $Table = array( … … 138 127 function LoadValuesFromForm() 139 128 { 140 $this->DefinitionTextTypeToNumericType();141 129 $this->Values = $this->LoadValuesFromFormBlock(); 142 130 } … … 144 132 function LoadValuesFromFormBlock($Context = '') 145 133 { 146 global $FormTypes;147 148 134 $Values = array(); 149 135 foreach($this->Definition['Items'] as $Index => $Item)
Note:
See TracChangeset
for help on using the changeset viewer.