36 parent::__construct($p_name, $p_value,
$p_id);
44 $this->range=
' class="'.$p_name.
'" ';
47 public function input($p_name=
null,$p_value=
null,
$id=
"")
49 $this->
name=($p_name==
null)?$this->
name:$p_name;
50 $this->
value=($p_value==
null)?$this->
value:$p_value;
52 $this->
id=($this->
id==
"")?$this->
name:$this->
id;
55 $r=
'<input type="CHECKBOX" id="'.$this->id.
'" name="'.$this->
name.
'"'.
' value="'.$this->value.
'"';
61 $r=
$r.
" $this->label";
71 $r=
'<input type="CHECKBOX" id="'.$this->name.
'" name="'.$this->
name.
'"';
88 $a->javascript=
'onclick="toggle_checkbox(\''.$p_form.
'\')
"';
98 static function javascript_set_range($p_name) {
99 $js=sprintf("(
function () {activate_checkbox_range(
'%s');})();
",$p_name);
100 return create_script($js);
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
display()
print in html the readonly value of the widget
__construct($p_name="", $p_value="", $p_id="")
set_check($p_value)
set selected to true (checked) if the value equal the parameter
static toggle_checkbox($p_name, $p_form)
input($p_name=null, $p_value=null, $id="")
show the html input of the widget