projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed a comment.
[timetracker.git]
/
WEB-INF
/
lib
/
form
/
TextField.class.php
diff --git
a/WEB-INF/lib/form/TextField.class.php
b/WEB-INF/lib/form/TextField.class.php
index
fdd022a
..
4904e24
100644
(file)
--- a/
WEB-INF/lib/form/TextField.class.php
+++ b/
WEB-INF/lib/form/TextField.class.php
@@
-27,45
+27,37
@@
// +----------------------------------------------------------------------+
import('form.FormElement');
// +----------------------------------------------------------------------+
import('form.FormElement');
-
+
class TextField extends FormElement {
class TextField extends FormElement {
- var $mValue;
- var $mPassword = false;
- var $cClassName = "TextField";
- function TextField($name,$value="")
- {
- $this->mName = $name;
- $this->mValue = $value;
- }
-
- function setAsPassword($name) { $this->mPassword = $name; }
- function getAsPassword() { return $this->mPassword; }
+ function __construct($name)
+ {
+ $this->class = 'TextField';
+ $this->name = $name;
+ }
- function toStringControl() {
- if (!$this->isRenderable()) return "";
-
- if (!$this->isEnable()) {
- $html = "<input name=\"$this->mName\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n";
+ // TODO: refactoring ongoing down from here.
+ function getHtml() {
+ if (!$this->isEnabled()) {
+ $html = "<input name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n";
} else {
} else {
- if ($this->
mId=="") $this->mId = $this->mN
ame;
+ if ($this->
id=="") $this->id = $this->n
ame;
- $html = "\n\t<input";
- $html .= ( $this->mPassword ? " type=\"password\"" : " type=\"text\"");
- $html .= " name=\"$this->mName\" id=\"$this->mId\"";
+ $html = "\n\t<input type=\"text\"";
+ $html .= " name=\"$this->name\" id=\"$this->id\"";
- if ($this->
mS
ize!="")
- $html .= " size=\"$this->
mS
ize\"";
+ if ($this->
s
ize!="")
+ $html .= " size=\"$this->
s
ize\"";
- if ($this->
mS
tyle!="")
- $html .= " style=\"$this->
mS
tyle\"";
+ if ($this->
s
tyle!="")
+ $html .= " style=\"$this->
s
tyle\"";
- if ($this->m
MaxL
ength!="")
- $html .= " maxlength=\"$this->m
MaxL
ength\"";
+ if ($this->m
ax_l
ength!="")
+ $html .= " maxlength=\"$this->m
ax_l
ength\"";
- if ($this->
mOnC
hange!="")
- $html .= " onchange=\"$this->
mOnC
hange\"";
+ if ($this->
on_c
hange!="")
+ $html .= " onchange=\"$this->
on_c
hange\"";
$html .= " value=\"".htmlspecialchars($this->getValue())."\"";
$html .= ">";
$html .= " value=\"".htmlspecialchars($this->getValue())."\"";
$html .= ">";