projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed a comment.
[timetracker.git]
/
WEB-INF
/
lib
/
form
/
DateField.class.php
diff --git
a/WEB-INF/lib/form/DateField.class.php
b/WEB-INF/lib/form/DateField.class.php
index
7075c42
..
ecfdaf9
100644
(file)
--- a/
WEB-INF/lib/form/DateField.class.php
+++ b/
WEB-INF/lib/form/DateField.class.php
@@
-33,25
+33,23
@@
class DateField extends TextField {
var $mWeekStartDay = 0;
var $mDateFormat = "d/m/Y";
var $lToday = "Today";
var $mWeekStartDay = 0;
var $mDateFormat = "d/m/Y";
var $lToday = "Today";
-
var $mDateObj;
var $mDateObj;
- var $cClassName = "DateField";
var $lCalendarButtons = array('today'=>'Today', 'close'=>'Close');
function __construct($name) {
var $lCalendarButtons = array('today'=>'Today', 'close'=>'Close');
function __construct($name) {
- $this->name = $name;
- $this->mDateObj = new DateAndTime();
+ $this->class = 'DateField';
+ $this->name = $name;
+ $this->mDateObj = new DateAndTime();
if (isset($GLOBALS["I18N"])) {
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->mDateObj->setFormat($user->date_format);
$this->mMonthNames = $i18n->monthNames;
@@
-81,10
+79,9
@@
class DateField extends TextField {
}
}
}
}
- function toStringControl() {
- if (!$this->isRenderable()) return "";
+ function getHtml() {
- if (!$this->isEnable()) {
+ if (!$this->isEnable
d
()) {
$html = htmlspecialchars($this->getValue()).
"<input type=\"hidden\" name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\">\n";
} else {
$html = htmlspecialchars($this->getValue()).
"<input type=\"hidden\" name=\"$this->name\" value=\"".htmlspecialchars($this->getValue())."\">\n";
} else {
@@
-395,22
+392,19
@@
class DateField extends TextField {
$html .= "\n\t<input type=\"text\"";
$html .= " name=\"$this->name\" id=\"$this->id\"";
$html .= "\n\t<input type=\"text\"";
$html .= " name=\"$this->name\" id=\"$this->id\"";
- if ($this->
mS
ize!="")
- $html .= " size=\"$this->
mS
ize\"";
+ if ($this->
s
ize!="")
+ $html .= " size=\"$this->
s
ize\"";
- if ($this->
mS
tyle!="")
- $html .= " style=\"$this->
mS
tyle\"";
+ if ($this->
s
tyle!="")
+ $html .= " style=\"$this->
s
tyle\"";
$html .= " maxlength=\"50\"";
$html .= " maxlength=\"50\"";
- if ($this->mOnChange!="")
- $html .= " onchange=\"$this->mOnChange\"";
-
- if ($this->mOnClick!="")
- $html .= " onclick=\"$this->mOnClick\"";
+ if ($this->on_change!="")
+ $html .= " onchange=\"$this->on_change\"";
- if ($this->
mOnFocus
!="")
- $html .= " on
focus=\"$this->mOnFocus
\"";
+ if ($this->
on_click
!="")
+ $html .= " on
click=\"$this->on_click
\"";
$html .= " value=\"".htmlspecialchars($this->getValue())."\"";
$html .= ">";
$html .= " value=\"".htmlspecialchars($this->getValue())."\"";
$html .= ">";