X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FHidden.class.php;h=6e59bc8e1a43b1e218a90890672e95827bc5e151;hb=75a1eedb8977b8f2db459128bab9aaf367e3b58b;hp=660870b4712c76fd140404bc759de0cf9fc6e24e;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/form/Hidden.class.php b/WEB-INF/lib/form/Hidden.class.php index 660870b4..6e59bc8e 100644 --- a/WEB-INF/lib/form/Hidden.class.php +++ b/WEB-INF/lib/form/Hidden.class.php @@ -27,28 +27,19 @@ // +----------------------------------------------------------------------+ 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\tmName\" id=\"$this->mId\""; - - $html .= " value=\"".$this->getValue()."\""; - $html .= ">"; - - return $html; - } + $html = "\n\tid\" name=\"$this->name\""; + $html.= ' value="'.$this->getValue().'">'; + return $html; + } } -?> \ No newline at end of file