X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FSubmit.class.php;h=5f8da37e5846e02e881057beb55d110e2d58da5b;hb=ed41335d63e71a11d30e92f4367106e9398adf9d;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..5f8da37e 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -27,37 +27,25 @@ // +----------------------------------------------------------------------+ import('form.FormElement'); - + class Submit extends FormElement { - var $cClassName = "Submit"; - function Submit($name,$value="") - { - $this->mName = $name; - $this->mValue = $value; - } + function __construct($name) { + $this->class = 'Submit'; + $this->name = $name; + } + + function getHtml() { + if (empty($this->id)) + $this->id = $this->name; + + // Output HTML. + $html = "\n\tname\" id=\"$this->id\""; + $html .= " value=\"$this->value\""; + if ($this->on_click) $html .= " onclick=\"".$this->on_click."\""; + if (!$this->isEnabled()) $html .= " disabled"; + $html .= ">"; - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->mId=="") $this->mId = $this->mName; - - $html = "\n\tmName\" id=\"$this->mId\""; - - if (!$this->isEnable()) { - $html .= " disabled=\"true\""; - } - - $html .= " value=\"$this->mValue\""; - - if ($this->mOnClick) { - $html .= " onclick=\"".$this->mOnClick."\""; - } - - $html .= ">"; - - return $html; - } + return $html; + } } -?> \ No newline at end of file