<?php
 namespace Modules\Admin\Config\ImportedOrders\Services; class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $form = \Engine\Form\General::create(); $fieldset = \Engine\Form\Container\Fieldset::create($this->lang['insert']['fieldsets']['main']); $form->addContainer($fieldset); $systemsObj = new \App\EntityList\ImportedOrdersSystems(); $systemsObj->setColumn('name'); $systems = $systemsObj->exportRecords(); $systemsList = []; foreach($systems as $system) { $systemsList[$system['id']] = $system['name']; } natcasesort($systemsList); $fldSystem = \Engine\Form\Input\Select::create($this->lang['insert']['formFields']['system'], 'system', $this->values['system']); $fldSystem->setPossibleValues($systemsList); $fldSystem->setMandatory(); $fieldset->addElement($fldSystem); $fldServiceCode = \Engine\Form\Input\Text::create($this->lang['insert']['formFields']['serviceCode'], 'serviceCode', $this->values['serviceCode']); $fldServiceCode->setTooltip($this->lang['insert']['legends']['serviceCode']); $fldServiceCode->setMandatory(); $fieldset->addElement($fldServiceCode); $fldIdService = new \App\Form\Input\Select_Service($this->lang['insert']['formFields']['idService'], 'idService', $this->values['idService']); $fldIdService->setMandatory(); $form->addElement($fldIdService); $form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1)); return $form; } } 