X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FDateField.class.php;h=ecfdaf92b67308db3b4558c465af48e2c61f835a;hb=cd5e077ecb497431decde4835138b877d63b261c;hp=d2331387dc5168f238c0e0cfde30a907b91e721e;hpb=5532fe6cfc2125063ff8040cfa80e20089ac64b0;p=timetracker.git diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index d2331387..ecfdaf92 100644 --- 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 $mDateObj; - var $cClassName = "DateField"; 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"])) { - $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; @@ -81,9 +79,9 @@ class DateField extends TextField { } } - function toStringControl() { + function getHtml() { - if (!$this->isEnable()) { + if (!$this->isEnabled()) { $html = htmlspecialchars($this->getValue()). "name\" value=\"".htmlspecialchars($this->getValue())."\">\n"; } else {