Skip to content

Commit 04bc6bd

Browse files
committed
Refactoring - renamed a few things.
1 parent 4433465 commit 04bc6bd

14 files changed

Lines changed: 21 additions & 21 deletions

WEB-INF/lib/form/Checkbox.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function toStringControl() {
6161
if ($this->mChecked || (($this->value == $this->mOptions) && ($this->value != null)))
6262
$html .= " checked=\"true\"";
6363

64-
if (!$this->isEnable())
64+
if (!$this->isEnabled())
6565
$html .= " disabled=\"disabled\"";
6666

6767
$html .= " value=\"".htmlspecialchars($this->mOptions)."\"";

WEB-INF/lib/form/Combobox.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function toStringControl() {
8484
if ($this->style!="")
8585
$html .= " style=\"$this->style\"";
8686

87-
if (!$this->isEnable())
87+
if (!$this->isEnabled())
8888
$html .= " disabled";
8989

9090
$html .= ">\n";

WEB-INF/lib/form/DateField.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function getValueSafe() {
8383

8484
function toStringControl() {
8585

86-
if (!$this->isEnable()) {
86+
if (!$this->isEnabled()) {
8787
$html = htmlspecialchars($this->getValue()).
8888
"<input type=\"hidden\" name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\">\n";
8989
} else {

WEB-INF/lib/form/Form.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function addInput($arguments) {
142142
$el->setFormName($this->name);
143143
if (isset($arguments["id"])) $el->setId($arguments["id"]);
144144
if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
145-
if (isset($arguments["enable"])) $el->setEnable($arguments["enable"]);
145+
if (isset($arguments["enable"])) $el->setEnabled($arguments["enable"]);
146146

147147
if (isset($arguments["style"])) $el->setStyle($arguments["style"]);
148148
if (isset($arguments["size"])) $el->setSize($arguments["size"]);

WEB-INF/lib/form/FormElement.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class FormElement {
3838
var $on_click = ''; // What happens when the control is clicked.
3939
var $label = ''; // Optional label for control.
4040
var $style = ''; // Control style.
41-
41+
var $enabled = true; // Whether the control is enabled.
42+
4243
// TODO: refactoring ongoing down from here.
43-
var $mEnabled = true;
4444
var $cClassName = "FormElement";
4545
var $mI18n = null;
4646

@@ -76,8 +76,8 @@ function getMaxLength() { return $this->max_length; }
7676
function setStyle($value) { $this->style = $value; }
7777
function getStyle() { return $this->style; }
7878

79-
function setEnable($flag) { $this->mEnabled = $flag; }
80-
function isEnable() { return $this->mEnabled; }
79+
function setEnabled($flag) { $this->enabled = $flag; }
80+
function isEnabled() { return $this->enabled; }
8181

8282
function setOnChange($str) { $this->on_change = $str; }
8383
function setOnClick($str) { $this->on_click = $str; }

WEB-INF/lib/form/Submit.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function toStringControl() {
4444
$html = "\n\t<input";
4545
$html .= " type=\"submit\" name=\"$this->name\" id=\"$this->id\"";
4646

47-
if (!$this->isEnable()) {
47+
if (!$this->isEnabled()) {
4848
$html .= " disabled=\"true\"";
4949
}
5050

WEB-INF/lib/form/TextField.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function setAsPassword($name) { $this->mPassword = $name; }
4242
function getAsPassword() { return $this->mPassword; }
4343

4444
function toStringControl() {
45-
if (!$this->isEnable()) {
45+
if (!$this->isEnabled()) {
4646
$html = "<input name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n";
4747
} else {
4848

WEB-INF/templates/footer.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<br>
1313
<table cellspacing="0" cellpadding="4" width="100%" border="0">
1414
<tr>
15-
<td align="center">&nbsp;Anuko Time Tracker 1.10.38.3606 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
15+
<td align="center">&nbsp;Anuko Time Tracker 1.10.38.3607 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
1616
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
1717
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
1818
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>

cf_custom_fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
$fields = CustomFields::getFields();
5151
// At this time only one custom field is supported. Disable the Add button if we already have one or more custom fields.
5252
if (count($fields) > 0)
53-
$form->getElement('btn_add')->setEnable(false);
53+
$form->getElement('btn_add')->setEnabled(false);
5454
}
5555

5656
$smarty->assign('forms', array($form->getName()=>$form->toArray()));

mobile/time.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@
158158
}
159159
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
160160
// Make the start and finish fields read-only.
161-
$form->getElement('start')->setEnable(false);
162-
$form->getElement('finish')->setEnable(false);
161+
$form->getElement('start')->setEnabled(false);
162+
$form->getElement('finish')->setEnabled(false);
163163
}
164164
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
165165
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));

0 commit comments

Comments
 (0)