Changeset 19 for types/Boolean.php
- Timestamp:
- Oct 22, 2008, 9:12:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
types/Boolean.php
r11 r19 1 1 <?php 2 2 3 function TypeBooleanOnView($Item) 3 class TypeBoolean 4 4 { 5 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = ''; 6 return('<input type="checkbox" name="'.$Item['Name'].'" disabled="1"'.$Checked.'>'); 5 function OnView($Item) 6 { 7 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = ''; 8 return('<input type="checkbox" name="'.$Item['Name'].'" disabled="1"'.$Checked.'>'); 9 } 10 11 function OnEdit($Item) 12 { 13 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = ''; 14 return('<input type="checkbox" name="'.$Item['Name'].'"'.$Checked.'>'); 15 } 16 17 function OnLoad($Item) 18 { 19 if(array_key_exists($Item['Name'], $_POST)) return(1); else return(0); 20 } 7 21 } 8 22 9 function TypeBooleanOnEdit($Item) 10 { 11 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = ''; 12 return('<input type="checkbox" name="'.$Item['Name'].'"'.$Checked.'>'); 13 } 14 15 function TypeBooleanOnLoad($Item) 16 { 17 if(array_key_exists($Item['Name'], $_POST)) return(1); else return(0); 18 } 23 $TypeDefinitionList['Boolean'] = new TypeBoolean; 19 24 20 25 ?>
Note:
See TracChangeset
for help on using the changeset viewer.