if ($this->mChecked || (($this->value == $this->mOptions) && ($this->value != null)))
$html .= " checked=\"true\"";
- if (!$this->isEnable())
+ if (!$this->isEnabled())
$html .= " disabled=\"disabled\"";
$html .= " value=\"".htmlspecialchars($this->mOptions)."\"";
if ($this->style!="")
$html .= " style=\"$this->style\"";
- if (!$this->isEnable())
+ if (!$this->isEnabled())
$html .= " disabled";
$html .= ">\n";
function toStringControl() {
- if (!$this->isEnable()) {
+ if (!$this->isEnabled()) {
$html = htmlspecialchars($this->getValue()).
"<input type=\"hidden\" name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\">\n";
} else {
$el->setFormName($this->name);
if (isset($arguments["id"])) $el->setId($arguments["id"]);
if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
- if (isset($arguments["enable"])) $el->setEnable($arguments["enable"]);
+ if (isset($arguments["enable"])) $el->setEnabled($arguments["enable"]);
if (isset($arguments["style"])) $el->setStyle($arguments["style"]);
if (isset($arguments["size"])) $el->setSize($arguments["size"]);
var $on_click = ''; // What happens when the control is clicked.
var $label = ''; // Optional label for control.
var $style = ''; // Control style.
-
+ var $enabled = true; // Whether the control is enabled.
+
// TODO: refactoring ongoing down from here.
- var $mEnabled = true;
var $cClassName = "FormElement";
var $mI18n = null;
function setStyle($value) { $this->style = $value; }
function getStyle() { return $this->style; }
- function setEnable($flag) { $this->mEnabled = $flag; }
- function isEnable() { return $this->mEnabled; }
+ function setEnabled($flag) { $this->enabled = $flag; }
+ function isEnabled() { return $this->enabled; }
function setOnChange($str) { $this->on_change = $str; }
function setOnClick($str) { $this->on_click = $str; }
$html = "\n\t<input";
$html .= " type=\"submit\" name=\"$this->name\" id=\"$this->id\"";
- if (!$this->isEnable()) {
+ if (!$this->isEnabled()) {
$html .= " disabled=\"true\"";
}
function getAsPassword() { return $this->mPassword; }
function toStringControl() {
- if (!$this->isEnable()) {
+ if (!$this->isEnabled()) {
$html = "<input name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n";
} else {
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.10.38.3606 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.10.38.3607 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
$fields = CustomFields::getFields();
// At this time only one custom field is supported. Disable the Add button if we already have one or more custom fields.
if (count($fields) > 0)
- $form->getElement('btn_add')->setEnable(false);
+ $form->getElement('btn_add')->setEnabled(false);
}
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
}
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
- $form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('start')->setEnabled(false);
+ $form->getElement('finish')->setEnabled(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
}
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
- $form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('start')->setEnabled(false);
+ $form->getElement('finish')->setEnabled(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
// Disable the Delete button when no favorite report is selected.
if (!$bean->getAttribute('favorite_report') || ($bean->getAttribute('favorite_report') == -1))
- $form->getElement('btn_delete')->setEnable(false);
+ $form->getElement('btn_delete')->setEnabled(false);
if ($request->isPost()) {
if((!$bean->getAttribute('btn_generate') && ($request->getParameter('fav_report_changed')))) {
}
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
- $form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('start')->setEnabled(false);
+ $form->getElement('finish')->setEnabled(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
}
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
- $form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('start')->setEnabled(false);
+ $form->getElement('finish')->setEnabled(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));