From a0684a2b3d27e1f007f90cce932e2b4a003c78c2 Mon Sep 17 00:00:00 2001 From: Stan Pinte Date: Sun, 6 Mar 2005 17:33:44 +0000 Subject: [PATCH] Added disabled property to class widget --- include/class_widget.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/class_widget.php b/include/class_widget.php index 2b3715e2e..bb0e1755f 100644 --- a/include/class_widget.php +++ b/include/class_widget.php @@ -35,6 +35,7 @@ class widget { var $selected; var $table; var $label; + var $disabled; function widget($p_type="") { $this->type=$p_type; $this->readonly=false; @@ -45,6 +46,7 @@ class widget { $this->selected=""; $this->table=0; $this->label=""; + $this->disabled=false; } function SetReadOnly($p_read) { $this->readonly=$p_read; @@ -64,9 +66,10 @@ class widget { $this->label=($p_label == "")?$this->label:$p_label; //echo "this->value =".$this->value; // Input text type + $disabled = $this->disabled ? "DISABLED" : ""; if (strtoupper($this->type)=="TEXT") { if ( $this->readonly==false) { - $r="size\">";} else { + $r="size\" ".$disabled.">";} else { $r=$this->value; } if ($this->table==1) { @@ -131,7 +134,7 @@ class widget { $check=( $this->selected==true )?"checked":"unchecked"; $r=''; } if ($this->table==1) { $r=" $this->label $r "; @@ -151,7 +154,7 @@ class widget { $r='value\""; $r.=" $check"; - $r.='>'; + $r.=' '.$disabled.'>'; } if ($this->table==1) { $r=" $this->label $r "; @@ -167,7 +170,7 @@ class widget { $r='"; @@ -185,7 +188,7 @@ class widget { //file if (strtoupper($this->type)=="FILE") { if ( $this->readonly == false ) { - $r=''; + $r=''; } if ( $this->table==1) $r="$this->label$r";