noalyss  Version-6.7.2
Public Member Functions | Static Public Member Functions
ICheckBox Class Reference
Inheritance diagram for ICheckBox:
HtmlInput

Public Member Functions

 display ()
 print in html the readonly value of the widget
 input ($p_name=null, $p_value=null)
 show the html input of the widget
 set_check ($p_value)
 set selected to true (checked) if the value equal the parameter

Static Public Member Functions

static test_me ()
static toggle_checkbox ($p_name, $p_form)

Detailed Description

Definition at line 26 of file class_icheckbox.php.


Member Function Documentation

print in html the readonly value of the widget

Definition at line 48 of file class_icheckbox.php.

References $check, $r, name, and selected.

Referenced by input().

    {
        $check=( $this->selected==true )?"checked":"unchecked";
        $r='<input type="CHECKBOX" id="'.$this->name.'" name="'.$this->name.'"';
        $r.="  $check";
        $r.=' disabled>';

        return $r;

    }
ICheckBox::input ( p_name = null,
p_value = null 
)

show the html input of the widget

Definition at line 29 of file class_icheckbox.php.

References $check, $r, display(), javascript, name, readOnly, selected, and value.

    {
        $this->name=($p_name==null)?$this->name:$p_name;
        $this->value=($p_value==null)?$this->value:$p_value;
        if ( $this->readOnly==true) return $this->display();
                 $this->id=($this->id=="")?$this->name:$this->id;

        $check=( $this->selected==true )?"checked":"unchecked";
        $r='<input type="CHECKBOX" id="'.$this->id.'" name="'.$this->name.'"'.' value="'.$this->value.'"';
        $r.="  $check";
        $r.=' '.$this->disabled."  ".$this->javascript.'>';

        $r=$r." $this->label";

        return $r;


    }
ICheckBox::set_check ( p_value)

set selected to true (checked) if the value equal the parameter

Parameters:
$p_valuevalue to compare

Definition at line 62 of file class_icheckbox.php.

References selected, and value.

        {
        if ($this->value==$p_value)$this->selected=true;
        }
static ICheckBox::test_me ( ) [static]

Definition at line 71 of file class_icheckbox.php.

    {
    }
static ICheckBox::toggle_checkbox ( p_name,
p_form 
) [static]

Definition at line 66 of file class_icheckbox.php.

References $a.

                                                     {
            $a=new ICheckBox($p_name);
            $a->javascript='onclick="toggle_checkbox(\''.$p_form.'\')"';
            return $a->input();
        }

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations