X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/85910e4038e5f54d82a29ceafc32b8e14e18628e..741660d57d2e740b472c10a9763d535a74cff09c:/WEB-INF/lib/form/Submit.class.php
diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php
index 35eb6df3..5f8da37e 100644
--- a/WEB-INF/lib/form/Submit.class.php
+++ b/WEB-INF/lib/form/Submit.class.php
@@ -27,34 +27,25 @@
// +----------------------------------------------------------------------+
import('form.FormElement');
-
+
class Submit extends FormElement {
- function __construct($name)
- {
+ function __construct($name) {
$this->class = 'Submit';
$this->name = $name;
}
function getHtml() {
-
- if ($this->id=="") $this->id = $this->name;
-
- $html = "\n\tname\" id=\"$this->id\"";
-
- if (!$this->isEnabled()) {
- $html .= " disabled=\"true\"";
- }
-
- $html .= " value=\"$this->value\"";
-
- if ($this->on_click) {
- $html .= " onclick=\"".$this->on_click."\"";
- }
-
- $html .= ">";
-
- return $html;
- }
+ 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 .= ">";
+
+ return $html;
+ }
}