/** * Initializes form. * @return void */ protected function init() { parent::init(); foreach ($this->form->getControls() as $control) { if ($control instanceof \Nette\Forms\Controls\Button) { $control->getControlPrototype()->class = 'button small success radius'; } } $this->wrappers['controls']['container'] = ''; $this->wrappers['label']['container'] = ''; $this->wrappers['control']['container'] = ''; $this->wrappers['pair']['container'] = 'div class=row "'; }
/** * Initializes form. */ protected function init() { parent::init(); $label =& $this->wrappers['label']; $c =& $this->wrappers['control']; foreach ($this->form->getControls() as $name => $control) { if ($control instanceof \Nette\Forms\Controls\TextArea || $control instanceof \Nette\Forms\Controls\SelectBox) { $control->setAttribute('class', $c['.textarea-class'] . ' ' . $control->getControlPrototype()->class); } elseif ($control instanceof \Nette\Forms\Controls\SubmitButton) { if ($name === 'reset') { $control->getControlPrototype()->class('btn btn-danger button red float-l'); } } $control->getLabelPrototype()->class($label['.class'], TRUE); } }