Another fix in week view for negative hours.
[timetracker.git] / WEB-INF / lib / form / Hidden.class.php
index 57ed9aa..6e59bc8 100644 (file)
 // +----------------------------------------------------------------------+
 
 import('form.FormElement');
-       
+
 class Hidden extends FormElement {
-    var $class = 'Hidden';
 
-       function __construct($name,$value="")
-       {
-               $this->name = $name;
-               $this->value = $value;
-       }
+  function __construct($name) {
+    $this->class = 'Hidden';
+    $this->name = $name;
+  }
+
+  function getHtml() {
+    if ($this->id == '') $this->id = $this->name;
 
-       function toStringControl()      {
-           
-           if ($this->id=="") $this->id = $this->name;
-           
-               $html = "\n\t<input";
-               $html .= " type=\"hidden\" name=\"$this->name\" id=\"$this->id\"";
-               
-               $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;
+  }
 }