source: trunk/types/Boolean.php

Last change on this file was 29, checked in by george, 16 years ago
  • Upraveno: Hledání položek v seznamu dle zadaného filtru.
File size: 617 bytes
Line 
1<?php
2
3class TypeBoolean extends TypeBase
4{
5 var $DatabaseCompareOperators = array('Rovno' => '=', 'Nerovno' => '!=');
6
7 function OnView($Item)
8 {
9 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = '';
10 return('<input type="checkbox" name="'.$Item['Name'].'" disabled="1"'.$Checked.'>');
11 }
12
13 function OnEdit($Item)
14 {
15 if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = '';
16 return('<input type="checkbox" name="'.$Item['Name'].'"'.$Checked.'>');
17 }
18
19 function OnLoad($Item)
20 {
21 if(array_key_exists($Item['Name'], $_POST)) return(1); else return(0);
22 }
23}
24
25?>
Note: See TracBrowser for help on using the repository browser.