From 4bfd0a6f4a7a79c4bfeaeab17b9b898b10a3d6d2 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 20 Feb 2017 01:06:53 +0000 Subject: [PATCH] Refactoring - renaming things. --- WEB-INF/lib/form/DateField.class.php | 4 ++-- WEB-INF/lib/form/FormElement.class.php | 7 ++++--- WEB-INF/lib/form/Submit.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 0ed220d9..9035bffd 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -406,8 +406,8 @@ class DateField extends TextField { if ($this->on_change!="") $html .= " onchange=\"$this->on_change\""; - if ($this->mOnClick!="") - $html .= " onclick=\"$this->mOnClick\""; + if ($this->on_click!="") + $html .= " onclick=\"$this->on_click\""; if ($this->mOnFocus!="") $html .= " onfocus=\"$this->mOnFocus\""; diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index 7bd28ab5..f2d0c920 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -35,9 +35,10 @@ class FormElement { var $size = ''; // Control size. var $max_length = ''; // Max lenght of text in control. var $on_change = ''; // What happens when value of control changes. + var $on_click = ''; // What happens when the control is clicked. + // TODO: refactoring ongoing down from here. - var $mOnClick = ""; - var $mOnKeyPress = ""; + var $mOnKeyPress = ""; // This is only used in TextArea, consider moving out of the base class. var $mOnFocus = ""; var $mLabel = ""; var $mStyle = ""; @@ -85,7 +86,7 @@ class FormElement { function isEnable() { return $this->mEnabled; } function setOnChange($str) { $this->on_change = $str; } - function setOnClick($str) { $this->mOnClick = $str; } + function setOnClick($str) { $this->on_click = $str; } function setLocalization($i18n) { $this->mI18n = $i18n; diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index c4a2c0d6..ba3d698c 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -51,8 +51,8 @@ class Submit extends FormElement { $html .= " value=\"$this->value\""; - if ($this->mOnClick) { - $html .= " onclick=\"".$this->mOnClick."\""; + if ($this->on_click) { + $html .= " onclick=\"".$this->on_click."\""; } $html .= ">"; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1499b221..86d50496 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.10.38.3599 | Copyright © Anuko | +  Anuko Time Tracker 1.10.38.3600 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1