Changeset 93 for trunk/www/Base/Form.php
- Timestamp:
- Aug 15, 2013, 11:17:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Base/Form.php
r78 r93 13 13 function __construct($System, $FormClass) 14 14 { 15 parent::__construct($System); 15 16 $this->Definition = $FormClass; 16 17 foreach($this->Definition['Items'] as $Index => $Item) … … 18 19 $this->Values[$Index] = ''; 19 20 } 20 $this->System = $System;21 $this->Database = $System->Database;22 $this->Config = $System->Config;23 21 } 24 22 … … 43 41 { 44 42 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 45 $Edit = ExecuteTypeEvent($ Item['Type'], 'OnView',43 $Edit = ExecuteTypeEvent($this->System, $Item['Type'], 'OnView', 46 44 array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); 47 45 array_push($Table['Rows'], array($Item['Caption'], $Edit)); … … 74 72 { 75 73 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; 76 $Edit = ExecuteTypeEvent($ Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));74 $Edit = ExecuteTypeEvent($this->System, $Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); 77 75 array_push($Table['Rows'], array($Item['Caption'].':', $Edit)); 78 76 } … … 82 80 '</fieldset>'; 83 81 foreach($this->Definition['Items'] as $Index => $Item) 84 if($Item['Type'] == 'Hidden') $Output .= ExecuteTypeEvent($ Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));82 if($Item['Type'] == 'Hidden') $Output .= ExecuteTypeEvent($this->System, $Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type'])); 85 83 return($Output); 86 84 } … … 123 121 { 124 122 if(array_key_exists($Context.$Index, $_POST)) 125 $Values[$Index] = ExecuteTypeEvent($ Item['Type'], 'OnLoad',123 $Values[$Index] = ExecuteTypeEvent($this->System, $Item['Type'], 'OnLoad', 126 124 array('Name' => $Index, 'Type' => $Item['Type'])); 127 125 } … … 129 127 } 130 128 } 131 132 ?>
Note:
See TracChangeset
for help on using the changeset viewer.