Last change
on this file was 93, checked in by chronos, 11 years ago |
- Fixed: System variable as parameter to constructors of descendents of Module class.
- Removed: End PHP mark "?>" from all files.
|
File size:
688 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class TypeEnumeration extends TypeBase
|
---|
4 | {
|
---|
5 | function OnView($Item)
|
---|
6 | {
|
---|
7 | $Type = GetTypeDefinition($Item['Type']);
|
---|
8 | $Output = $Type['Parameters'][$Item['Value']];
|
---|
9 | return($Output);
|
---|
10 | }
|
---|
11 |
|
---|
12 | function OnEdit($Item)
|
---|
13 | {
|
---|
14 | $Type = GetTypeDefinition($Item['Type']);
|
---|
15 | $Output = '<select name="'.$Item['Name'].'">';
|
---|
16 | foreach($Type['Parameters'] as $Index => $StateName)
|
---|
17 | {
|
---|
18 | if($Item['Value'] == $Index) $Selected = ' selected="1"'; else $Selected = '';
|
---|
19 | $Output .= '<option value="'.$Index.'"'.$Selected.'>'.$StateName.'</option>';
|
---|
20 | }
|
---|
21 | $Output .= '</select>';
|
---|
22 | return($Output);
|
---|
23 | }
|
---|
24 |
|
---|
25 | function OnLoad($Item)
|
---|
26 | {
|
---|
27 | return($_POST[$Item['Name']]);
|
---|
28 | }
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.