/** * Set internal fields */ protected function setFields() { if (!is_null($this->FieldTime)) { return; } $this->FieldTime = new FormularInputHidden($this->name, __('Time'), $this->value); $this->FieldDay = new FormularInput($this->getFieldDayName(), __('Date'), $this->value); $this->FieldDay->addCSSclass('pick-a-date'); $this->FieldDay->setParser(FormularValueParser::$PARSER_DATE); $this->FieldDaytime = new FormularInput($this->getFieldDaytimeName(), __('Time of day'), $this->value); $this->FieldDaytime->setParser(FormularValueParser::$PARSER_DAYTIME); }
/** * Add fields for robert bock and herbert steffny */ protected function addFieldsForBockAndSteffny() { $BestResult = new FormularInput('best-result-km', __('Best result')); $BestResult->setLayout(FormularFieldset::$LAYOUT_FIELD_W50); $BestResult->addCSSclass('hide-on-model-change'); $BestResult->addCSSclass('only-robert-bock'); $BestResult->addCSSclass('only-herbert-steffny'); $BestResult->addCSSclass('only-david-cameron'); $BestResult->setUnit(FormularUnit::$KM); $BestResultTime = new FormularInput('best-result-time', __('in')); $BestResultTime->setLayout(FormularFieldset::$LAYOUT_FIELD_W50); $BestResultTime->addCSSclass('hide-on-model-change'); $BestResultTime->addCSSclass('only-robert-bock'); $BestResultTime->addCSSclass('only-herbert-steffny'); $BestResultTime->addCSSclass('only-david-cameron'); $SecondBestResult = new FormularInput('second-best-result-km', __('Second best result')); $SecondBestResult->setLayout(FormularFieldset::$LAYOUT_FIELD_W50); $SecondBestResult->addCSSclass('hide-on-model-change'); $SecondBestResult->addCSSclass('only-robert-bock'); $SecondBestResult->setUnit(FormularUnit::$KM); $SecondBestResultTime = new FormularInput('second-best-result-time', __('in')); $SecondBestResultTime->setLayout(FormularFieldset::$LAYOUT_FIELD_W50); $SecondBestResultTime->addCSSclass('hide-on-model-change'); $SecondBestResultTime->addCSSclass('only-robert-bock'); $this->FieldsetInput->addField($BestResult); $this->FieldsetInput->addField($BestResultTime); $this->FieldsetInput->addField($SecondBestResult); $this->FieldsetInput->addField($SecondBestResultTime); }