X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FSubmit.class.php;h=5f8da37e5846e02e881057beb55d110e2d58da5b;hb=8681f64fc230550a79d8417dd98672bbb9e92c93;hp=ba3d698c89b341d8e65f5da07dc3df80bf9cf299;hpb=4bfd0a6f4a7a79c4bfeaeab17b9b898b10a3d6d2;p=timetracker.git
diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php
index ba3d698c..5f8da37e 100644
--- a/WEB-INF/lib/form/Submit.class.php
+++ b/WEB-INF/lib/form/Submit.class.php
@@ -27,36 +27,25 @@
// +----------------------------------------------------------------------+
import('form.FormElement');
-
+
class Submit extends FormElement {
- var $cClassName = "Submit";
- function __construct($name,$value="")
- {
- $this->name = $name;
- $this->value = $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->id=="") $this->id = $this->name;
-
- $html = "\n\tname\" id=\"$this->id\"";
-
- if (!$this->isEnable()) {
- $html .= " disabled=\"true\"";
- }
-
- $html .= " value=\"$this->value\"";
-
- if ($this->on_click) {
- $html .= " onclick=\"".$this->on_click."\"";
- }
-
- $html .= ">";
-
- return $html;
- }
+ return $html;
+ }
}