import('form.'.$ref_el["class"]);
$class_name = $ref_el["class"];
$el = new $class_name($ref_el["name"]);
- if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+ if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
$el->setValueSafe(@$_SESSION[$this->mSessionCell . "_" .$el->getName()]);
if ($this->mForm && !isset($this->mForm->elements[$ref_el["name"]])) {
$this->highlight = $highlight;
}
- function setLocalization($i18n) {
+ function localize($i18n) {
global $user;
- FormElement::setLocalization($i18n);
- $this->mMonthNames = $i18n->monthNames;
+ $this->mMonthNames = $i18n->monthNames;
$this->mWeekDayShortNames = $i18n->weekdayShortNames;
if (is_array($i18n->holidays)) {
foreach ($i18n->holidays as $fday) {
function setGroupIn($value) { $this->mGroupIn = $value; if ($this->mGroupIn<1) $this->mGroupIn = 1;}
function getGroupIn() { return $this->mGroupIn; }
- function setLocalization($i18n) {
- FormElement::setLocalization($i18n);
+ function localize($i18n) {
$this->lSelAll = $i18n->getKey('label.select_all');
$this->lSelNone = $i18n->getKey('label.select_none');
}
$this->mDateObj = new DateAndTime();
if (isset($GLOBALS["I18N"])) {
- $this->setLocalization($GLOBALS["I18N"]);
+ $this->localize($GLOBALS["I18N"]);
}
}
- function setLocalization($i18n) {
- global $user;
+ function localize($i18n) {
+ global $user;
- FormElement::setLocalization($i18n);
$this->mDateObj->setFormat($user->date_format);
$this->mMonthNames = $i18n->monthNames;
$this->name = $name;
}
- function setLocalization($i18n) {
- FormElement::setLocalization($i18n);
+ function localize($i18n) {
global $user;
$this->mDelimiter = $user->decimal_mark;
}
if ($el!=null) {
$el->setFormName($this->name);
if (isset($arguments["id"])) $el->setId($arguments["id"]);
- if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+ if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
if (isset($arguments["enable"])) $el->setEnabled($arguments["enable"]);
if (isset($arguments["style"])) $el->setStyle($arguments["style"]);
function addInputElement(&$el) {
if ($el && is_object($el)) {
- if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+ if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
$el->setFormName($this->name);
$this->elements[$el->name] = &$el;
function setValueSafe($value) { $this->value = $value;}
function getValueSafe() { return $this->value; }
+ function setId($id) { $this->id = $id; }
+ function getId() { return $this->id; }
+
+ function setSize($value) { $this->size = $value; }
+ function getSize() { return $this->size; }
+
+ function setLabel($label) { $this->label = $label; }
+ function getLabel() { return $this->label; }
+
+ function setMaxLength($value) { $this->max_length = $value; }
+ function getMaxLength() { return $this->max_length; }
+
+ function setStyle($value) { $this->style = $value; }
+ function getStyle() { return $this->style; }
+
+ 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; }
+
+ function localize($i18n) {} // Localization occurs in derived classes and is dependent on control type.
+ // For example, in calendar control we need to localize day and month names.
+
// TODO: refactoring ongoing down from here.
- function setId($id) { $this->id = $id; }
- function getId() { return $this->id; }
-
- function setSize($value) { $this->size = $value; }
- function getSize() { return $this->size; }
- function setLabel($label) { $this->label = $label; }
- function getLabel() { return $this->label; }
-
- function setMaxLength($value) { $this->max_length = $value; }
- function getMaxLength() { return $this->max_length; }
- function setStyle($value) { $this->style = $value; }
- function getStyle() { return $this->style; }
- 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; }
- function setLocalization($i18n) {
- }
+
+
function toStringControl() {
return "";
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.10.38.3611 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.10.38.3612 | 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>
global $assigned_projects;
$field = new FloatField('rate_'.$table->getValueAtName($row, 'id'));
$field->setFormName($table->getFormName());
- $field->setLocalization($GLOBALS['I18N']);
+ $field->localize($GLOBALS['I18N']);
$field->setSize(5);
$field->setFormat('.2');
foreach ($assigned_projects as $p) {
global $assigned_projects;
$field = new FloatField('rate_'.$table->getValueAtName($row,'id'));
$field->setFormName($table->getFormName());
- $field->setLocalization($GLOBALS['I18N']);
+ $field->localize($GLOBALS['I18N']);
$field->setSize(5);
$field->setFormat('.2');
foreach ($assigned_projects as $p) {
global $assigned_projects;
$field = new FloatField('rate_'.$table->getValueAtName($row, 'id'));
$field->setFormName($table->getFormName());
- $field->setLocalization($GLOBALS['I18N']);
+ $field->localize($GLOBALS['I18N']);
$field->setSize(5);
$field->setFormat('.2');
foreach ($assigned_projects as $p) {
global $assigned_projects;
$field = new FloatField('rate_'.$table->getValueAtName($row,'id'));
$field->setFormName($table->getFormName());
- $field->setLocalization($GLOBALS['I18N']);
+ $field->localize($GLOBALS['I18N']);
$field->setSize(5);
$field->setFormat('.2');
foreach ($assigned_projects as $p) {