X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FDateField.class.php;h=3906db6c895e276d6c751a87b53edd4a3ab76791;hb=d2df33e87f20af74c9339c15d3a7fbacd9560ded;hp=b85632d585c74fe60bf32a24608fb350b9ce91b8;hpb=bd569da4f1d6ada00f5e48eac9716c068003748a;p=timetracker.git diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index b85632d5..3906db6c 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -35,7 +35,7 @@ class DateField extends TextField { var $lToday = "Today"; var $mDateObj; - var $cClassName = "DateField"; + var $class = 'DateField'; var $lCalendarButtons = array('today'=>'Today', 'close'=>'Close'); @@ -44,14 +44,13 @@ class DateField extends TextField { $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,10 +80,9 @@ class DateField extends TextField { } } - function toStringControl() { - if (!$this->isRenderable()) return ""; + function getHtml() { - if (!$this->isEnable()) { + if (!$this->isEnabled()) { $html = htmlspecialchars($this->getValue()). "name\" value=\"".htmlspecialchars($this->getValue())."\">\n"; } else {