name = ($p_name == null) ? $this->name : $p_name; $this->value = ($p_value == null) ? $this->value : $p_value; if ($this->readOnly == true) return $this->display(); $check = ( $this->selected == true || $this->selected == 't' ) ? "checked" : "unchecked"; $r = 'value\""; $r.=' class="css-checkbox" '; $r.=($this->javascript != '') ? 'onclick="' . $this->javascript . '"' : ''; $r.=" $check > "; return $r; } /**\brief print in html the readonly value of the widget */ public function display() { $check = ( $this->selected == true || $this->selected == 't' ) ? "Yes" : "no"; $r = $check; return $r; } /** * set selected to true (checked) if the value equal the parameter * @param $p_value value to compare */ public function set_check($p_value) { if ($this->value == $p_value) $this->selected = true; } static public function test_me() { } }