Legend:
- Unmodified
- Added
- Removed
-
forms.php
r9 r10 13 13 $Output = '<center><form action="'.$this->OnSubmit.'" method="post"><div align="center">'; 14 14 $Table = $this->ShowEditBlock(); 15 $Output .= $this->Definition['Title'].Table($Table). '<input type="submit" value="'.$this->Definition['SubmitBuffonText'].'"></div></form>';15 $Output .= $this->Definition['Title'].Table($Table).$this->ShowHiddenBlock().'<input type="submit" value="'.$this->Definition['SubmitBuffonText'].'"></div></form>'; 16 16 return($Output); 17 17 } … … 28 28 foreach($this->Definition['Items'] as $Item) 29 29 { 30 $ItemType = explode(':', $Item['Type']); 31 $Index = $Item['Name']; 32 $Type = $Types[$ItemType[0]]; 33 if(!array_key_exists($Index, $this->Values) and isset($Item['Value'])) $this->Values[$Index] = $Item['Value']; 34 if(is_callable($Type['CallbackEdit'])) $Edit = $Type['CallbackEdit']($Type, $Item); 35 else $Edit = $Type['CallbackEdit']; 36 array_push($Table['Rows'], array($Item['Caption'].':', $Edit)); 30 if($Item['Type'] != 'Hidden') 31 { 32 if(!array_key_exists($Index, $this->Values) and isset($Item['Value'])) $this->Values[$Index] = $Item['Value']; 33 $Edit = ExecuteTypeEvent($Item['Type'], 'OnEdit', $Item); 34 array_push($Table['Rows'], array($Item['Caption'].':', $Edit)); 35 } 37 36 } 38 37 return($Table); 38 } 39 40 function ShowHiddenBlock($Context = '') 41 { 42 global $Database, $Types; 43 44 $Output = ''; 45 if($Context != '') $Context = $Context.'-'; 46 foreach($this->Definition['Items'] as $Item) 47 { 48 if($Item['Type'] == 'Hidden') 49 { 50 if(!array_key_exists($Item['Name'], $this->Values) and isset($Item['Value'])) $this->Values[$Item['Name']] = $Item['Value']; 51 $Edit = ExecuteTypeEvent($Item['Type'], 'OnEdit', $Item); 52 $Output .= $Edit; 53 } 54 } 55 return($Output); 39 56 } 40 57 … … 58 75 foreach($this->Definition['Items'] as $Item) 59 76 { 60 $ItemType = explode(':', $Item['Type']); 61 $Index = $Item['Name']; 62 $Type = $Types[$ItemType[0]]; 63 if(!array_key_exists($Index, $this->Values) and isset($Item['Value'])) $this->Values[$Index] = $Item['Value']; 64 if(is_callable($Type['CallbackView'])) $Edit = $Type['CallbackView']($Type, $Item); 65 else $Edit = $Type['CallbackView']; 77 if(!array_key_exists($Item['Name'], $this->Values) and isset($Item['Value'])) $this->Values[$Item['Name']] = $Item['Value']; 78 $Edit = ExecuteTypeEvent($Item['Type'], 'OnView', $Item); 66 79 array_push($Table['Rows'], array($Item['Caption'].':', $Edit)); 67 80 }
Note:
See TracChangeset
for help on using the changeset viewer.