X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FDateField.class.php;h=ecfdaf92b67308db3b4558c465af48e2c61f835a;hb=f037a5416ac13e73d775f3c997afe8dfc4917339;hp=87f9ee8212aaff3858c4842fe00f4bf80049f7be;hpb=526ed56a0144e0602140dd7c65fe237f42a49e44;p=timetracker.git diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 87f9ee82..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,10 +79,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 { @@ -398,8 +395,8 @@ class DateField extends TextField { if ($this->size!="") $html .= " size=\"$this->size\""; - if ($this->mStyle!="") - $html .= " style=\"$this->mStyle\""; + if ($this->style!="") + $html .= " style=\"$this->style\""; $html .= " maxlength=\"50\"";