/** * Display row for config form * @return FormularField */ public function getFormField() { $Field = new FormularInput($this->Key, $this->formLabel(), $this->valueAsString()); $Field->setSize(FormularInput::$SIZE_FULL_INLINE); $Field->addAttribute('maxlength', PluginConfigurationValue::MAXLENGTH); return $Field; }
/** * 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')); }
/** * Init fieldset for input data */ protected function initFieldsetForInputData() { $this->FieldsetInput = new FormularFieldset(__('Input')); foreach ($this->InfoLines as $InfoMessage) { $this->FieldsetInput->addInfo($InfoMessage); } $FieldModel = new FormularSelectBox('model', __('Model')); $FieldModel->addOption('jack-daniels', 'Jack Daniels (VDOT)'); $FieldModel->addOption('robert-bock', 'Robert Bock (CPP)'); $FieldModel->addOption('herbert-steffny', 'Herbert Steffny'); $FieldModel->addOption('david-cameron', 'David Cameron'); $FieldModel->addAttribute('onchange', '$(\'#prognosis-calculator .only-\'+$(this).val()).closest(\'div\').show();$(\'#prognosis-calculator .hide-on-model-change:not(.only-\'+$(this).val()+\')\').closest(\'div\').hide();'); $FieldModel->setLayout(FormularFieldset::$LAYOUT_FIELD_W50_AS_W100); $FieldDistances = new FormularInput('distances', __('Distances')); $FieldDistances->setLayout(FormularFieldset::$LAYOUT_FIELD_W50_AS_W100); $FieldDistances->setSize(FormularInput::$SIZE_FULL_INLINE); $this->FieldsetInput->addField($FieldModel); $this->FieldsetInput->addField($FieldDistances); $this->addFieldsForJackDaniels(); $this->addFieldsForBockAndSteffny(); }
/** * Display row for config form * @return FormularField */ public function getFormField() { $Field = new FormularInput($this->Key, $this->formLabel(), $this->valueAsString()); $Field->setSize(FormularInput::$SIZE_SMALL); return $Field; }