<?php
namespace Modules\Admin\Config\ImportedDocuments\EntitiesMatch; class View_Utils_FormFilters extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $fieldsValues = $this->values['listingParams']->getFilters(); $form=\Engine\Form\Filters::create(); $form->setColumns(3); $fld = new \App\Form\Input\Select_DocumentExternalSystem($this->lang['index']['filters']['idSystem'], 'filters[idSystem]', $fieldsValues['idSystem']); $fld->showDefaultOption(true); $form->addElement($fld); $fld = new \Engine\Form\Input\Select($this->lang['index']['filters']['entityType'], 'filters[entityType]', $fieldsValues['entityType']); $fld->setPossibleValues([ 'user' => $this->lang['formFields']['entityType_']['user'], 'office' => $this->lang['formFields']['entityType_']['office'], 'customer' => $this->lang['formFields']['entityType_']['customer'], 'corporate' => $this->lang['formFields']['entityType_']['corporate'], 'supplier' => $this->lang['formFields']['entityType_']['supplier'], 'city' => $this->lang['formFields']['entityType_']['city'], 'docType' => $this->lang['formFields']['entityType_']['docType'], 'agencyBankAccount' => $this->lang['formFields']['entityType_']['agencyBankAccount'], ]); $fld->showDefaultOption(true); $fld->setDefaultOptionText('-'); $form->addElement($fld); $fld = new \Engine\Form\Input\Text($this->lang['index']['filters']['idEntityExtSys'], 'filters[idEntityExtSys]', $fieldsValues['idEntityExtSys']); $form->addElement($fld); $form->setJsCallback('MVC.listing.installedHandlers["listing"].reloadAndResetListing'); $form->loadMissingDefaultValues($this->values['listingParams']->getDefaultFilters()); return $form; } } 