X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FSubmit.class.php;h=91123c5519a34c4a8708f664069f2e0be5b6a8e1;hb=cd5e077ecb497431decde4835138b877d63b261c;hp=d621850b73a28eab671d66a53be133c6d08c59c8;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index d621850b..91123c55 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -29,30 +29,29 @@ import('form.FormElement'); class Submit extends FormElement { - var $cClassName = "Submit"; - function Submit($name,$value="") - { - $this->mName = $name; - $this->mValue = $value; - } + function __construct($name, $value = '') + { + $this->class = 'Submit'; + $this->name = $name; + $this->value = $value; + } - function toStringControl() { - if (!$this->isRenderable()) return ""; + function getHtml() { - if ($this->mId=="") $this->mId = $this->mName; + if ($this->id=="") $this->id = $this->name; $html = "\n\tmName\" id=\"$this->mId\""; + $html .= " type=\"submit\" name=\"$this->name\" id=\"$this->id\""; - if (!$this->isEnable()) { + if (!$this->isEnabled()) { $html .= " disabled=\"true\""; } - $html .= " value=\"$this->mValue\""; + $html .= " value=\"$this->value\""; - if ($this->mOnClick) { - $html .= " onclick=\"".$this->mOnClick."\""; + if ($this->on_click) { + $html .= " onclick=\"".$this->on_click."\""; } $html .= ">"; @@ -60,4 +59,3 @@ class Submit extends FormElement { return $html; } } -?> \ No newline at end of file