X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6e59f47d1baf9e3d420b4a368dcc005d54b6e599..6e2b1ec1880cebedef5a1ca380820ad0d40d06a2:/WEB-INF/lib/form/Hidden.class.php diff --git a/WEB-INF/lib/form/Hidden.class.php b/WEB-INF/lib/form/Hidden.class.php index 0105de15..6e59bc8e 100644 --- a/WEB-INF/lib/form/Hidden.class.php +++ b/WEB-INF/lib/form/Hidden.class.php @@ -27,27 +27,19 @@ // +----------------------------------------------------------------------+ import('form.FormElement'); - + class Hidden extends FormElement { - var $mValue; - var $cClassName = "Hidden"; - function __construct($name,$value="") - { - $this->name = $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->id=="") $this->id = $this->name; - - $html = "\n\tname\" id=\"$this->id\""; - - $html .= " value=\"".$this->getValue()."\""; - $html .= ">"; - - return $html; - } + $html = "\n\tid\" name=\"$this->name\""; + $html.= ' value="'.$this->getValue().'">'; + return $html; + } }