protected function initForm() { parent::initForm(); $saveELt = tao_helpers_form_FormFactory::getElement('Save', 'Free'); $saveELt->setValue('<button class="form-submitter btn-success small" type="button"><span class="icon-save"></span>' . __('Save') . '</button>'); $this->form->setActions(array(), 'top'); $this->form->setActions(array($saveELt), 'bottom'); }
/** * Initialize the form * * @access protected * @author Bertrand Chevrier, <*****@*****.**> * @return mixed */ protected function initForm() { parent::initForm(); $this->form->setName('translate_' . $this->form->getName()); $actions = tao_helpers_form_FormFactory::getCommonActions('top'); $this->form->setActions($actions, 'top'); $this->form->setActions($actions, 'bottom'); }
protected function initForm() { parent::initForm(); $bottom = $this->form->getActions('bottom'); $top = $this->form->getActions('top'); $edit = \tao_helpers_form_FormFactory::getElement('edit', 'Free'); $value = ''; if ($edit) { $value .= '<button type="button" id="edit-media" data-classuri="' . $this->getClazz()->getUri() . '" data-uri="' . $this->getInstance()->getUri() . '" class="edit-instance btn-success small"><span class="icon-upload"></span> ' . __('Upload new media') . '</button>'; } $edit->setValue($value); $top[] = $edit; $bottom[] = $edit; $this->form->setActions($bottom, 'bottom'); $this->form->setActions($top, 'top'); }
protected function initForm() { parent::initForm(); }
protected function initForm() { parent::initForm(); $this->form->setActions(array(), 'top'); }