function generateAfterCloseTag($code) { parent::generateAfterCloseTag($code); if (!($lang = $this->getAttribute('lang'))) { $lang = 'en'; } $year_class = $this->getAttribute('year_class'); $month_class = $this->getAttribute('year_class'); $day_class = $this->getAttribute('year_class'); $show_default = $this->getBoolAttribute('show_default'); $min_year = $this->getAttribute('min_year'); $max_year = $this->getAttribute('max_year'); $widget = new lmbDate3SelectWidget($lang, $year_class, $month_class, $day_class, $show_default); if ($min_year) { $widget->setMinYear(intval($min_year)); } if ($max_year) { $widget->setMaxYear(intval($max_year)); } $code->writeHTML($widget->loadFiles() . $widget->makeFields($this->getAttribute('id'))); }
function generateAfterCloseTag($code) { parent::generateAfterCloseTag($code); if (!($lang = $this->getAttribute('lang'))) { $lang = 'en'; } if (!$this->hasAttribute('stripped')) { $stripped = true; } else { $stripped = $this->getBoolAttribute('stripped'); } $widget = new lmbCalendarWidget($lang, $stripped); if ($format = $this->getAttribute('format')) { $widget->setOption('ifFormat', $format); $widget->setOption('daFormat', $format); } else { $widget->setOption('ifFormat', '%Y-%m-%d'); $widget->setOption('daFormat', '%Y-%m-%d'); } $code->writeHTML($widget->loadFiles() . $widget->makeButton($this->getAttribute('id'), array(), array('src' => $this->getAttribute('src')))); }