From: anuko Date: Sun, 19 Feb 2017 23:55:42 +0000 (+0000) Subject: Refactoring - renamed a couple of variables. X-Git-Tag: timetracker_1.19-1~1556 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4a605a698d07ecdc11e11aa8921485ace261cdba;p=timetracker.git Refactoring - renamed a couple of variables. --- diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index 082765e8..4d8df251 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -73,8 +73,8 @@ class Combobox extends FormElement { $html = "\n\tname\" id=\"$this->id\""; - if ($this->mSize!="") - $html .= " size=\"$this->mSize\""; + if ($this->size!="") + $html .= " size=\"$this->size\""; if ($this->mMultiple) $html .= " multiple"; diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 7075c42b..cf1bb08f 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -395,8 +395,8 @@ class DateField extends TextField { $html .= "\n\tname\" id=\"$this->id\""; - if ($this->mSize!="") - $html .= " size=\"$this->mSize\""; + if ($this->size!="") + $html .= " size=\"$this->size\""; if ($this->mStyle!="") $html .= " style=\"$this->mStyle\""; diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index 209578dc..3cab655a 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -32,9 +32,9 @@ class FormElement { var $name; var $form_name = ''; var $value = ''; + var $size = ''; + var $max_length = ''; // TODO: refactoring ongoing down from here. - var $mSize = ""; - var $mMaxLength = ""; var $mTabindex = ""; var $mAccesskey = ""; var $mOnSelect = ""; @@ -66,22 +66,22 @@ class FormElement { function setValueSafe($value) { $this->value = $value;} function getValueSafe() { return $this->value; } - function setId($id) { $this->id = $id; } + function setId($id) { $this->id = $id; } function getId() { return $this->id; } - function setSize($value) { $this->mSize = $value; } - function getSize() { return $this->mSize; } + function setSize($value) { $this->size = $value; } + function getSize() { return $this->size; } function setLabel($label) { $this->mLabel = $label; } function getLabel() { return $this->mLabel; } - function setMaxLength($value) { $this->mMaxLength = $value; } - function getMaxLength() { return $this->mMaxLength; } + function setMaxLength($value) { $this->max_length = $value; } + function getMaxLength() { return $this->max_length; } - function setTabindex($value) { $this->mTabindex = $value; } + function setTabindex($value) { $this->mTabindex = $value; } function getTabindex() { return $this->mTabindex; } - function setAccesskey($value) { $this->mAccesskey = $value; } + function setAccesskey($value) { $this->mAccesskey = $value; } function getAccesskey() { return $this->mAccesskey; } function setStyle($value) { $this->mStyle = $value; } diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 6b3b5ee7..89eef4e5 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -62,11 +62,11 @@ class TextArea extends FormElement { if ($this->mRows!="") $html .= " rows=\"$this->mRows\""; - if ($this->mMaxLength!="") { + if ($this->max_length!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; $js_maxlen = $this->getExtraScript(); - $html .= " maxlength=\"$this->mMaxLength\""; + $html .= " maxlength=\"$this->max_length\""; } if ($this->mStyle!="") @@ -86,7 +86,7 @@ class TextArea extends FormElement { $s = "