/** * Forward layout to internal fields */ protected function setLayoutsToFields() { $this->FieldDay->setLayout($this->internalLayout); $this->FieldDaytime->setLayout($this->internalLayout); foreach ($this->internalLayoutClasses as $Class) { $this->FieldDay->addLayoutClass($Class); $this->FieldDaytime->addLayoutClass($Class); } }
/** * Add field: notes */ private function addFieldNotes() { $Field = new FormularInput('notes', __('Notes')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100_IN_W33); $Field->setSize(FormularInput::$SIZE_FULL_INLINE); $this->Fieldset->addField($Field); $this->Fieldset->addField(new FormularInputHidden('opt[notes]', '', 'like')); }
/** * Get input for distance * @param string $distance * @return FormularInput */ protected function getDistanceInputCode($distance) { $FieldDistance = new FormularInput('splits[km][]', '', $distance); $FieldDistance->setUnit(FormularUnit::$KM); $FieldDistance->setLayout(FormularFieldset::$LAYOUT_FIELD_INLINE); return $FieldDistance->getCode(); }
/** * 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); }
} } } } } FormularInput::setStandardSize(FormularInput::$SIZE_MIDDLE); $Field = new FormularInput('new_username', __('Username')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100); $Field->setUnit(FormularUnit::$USER); $Field->display(); $Field = new FormularInput('name', __('Name')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100); $Field->setUnit(FormularUnit::$USER); $Field->display(); $Field = new FormularInput('email', __('Email')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100); $Field->setUnit(FormularUnit::$MAIL); $Field->display(); $Field = new FormularInputPassword('password', __('Password')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100); $Field->setUnit(FormularUnit::$PASS); $Field->display(); $Field = new FormularInputPassword('password_again', __('Password again')); $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W100); $Field->setUnit(FormularUnit::$PASS); $Field->display(); } ?> <?php if (isset($_POST['new_username'])) {
/** * Get input for distance * @param string $distance * @return FormularInput */ protected function getDistanceInputCode($distance) { $FieldDistance = new FormularInput('splits[km][]', '', $distance); $FieldDistance->setUnit(Configuration::General()->distanceUnitSystem()->distanceUnit()); $FieldDistance->setLayout(FormularFieldset::$LAYOUT_FIELD_INLINE); $FieldDistance->setParser(FormularValueParser::$PARSER_DISTANCE); $FieldDistance->hideLabel(); return $FieldDistance->getCode(); }