Adjusted time.php to honor note on separate row option.
[timetracker.git] / WEB-INF / lib / form / Hidden.class.php
index 660870b..6e59bc8 100644 (file)
 // +----------------------------------------------------------------------+
 
 import('form.FormElement');
-       
+
 class Hidden extends FormElement {
-    var $mValue;
-    var $cClassName    = "Hidden";
 
-       function Hidden($name,$value="")
-       {
-               $this->mName                    = $name;
-               $this->mValue                   = $value;
-       }
+  function __construct($name) {
+    $this->class = 'Hidden';
+    $this->name = $name;
+  }
+
+  function getHtml() {
+    if ($this->id == '') $this->id = $this->name;
 
-       function toStringControl()      {
-           
-           if ($this->mId=="") $this->mId = $this->mName;
-           
-               $html = "\n\t<input";
-               $html .= " type=\"hidden\" name=\"$this->mName\" id=\"$this->mId\"";
-               
-               $html .= " value=\"".$this->getValue()."\"";
-               $html .= ">";
-               
-               return $html;
-       }
+    $html = "\n\t<input type=\"hidden\" id=\"$this->id\" name=\"$this->name\"";
+    $html.= ' value="'.$this->getValue().'">';
+    return $html;
+  }
 }
-?>
\ No newline at end of file