<?php
namespace Modules\Admin\Config\ImportedOrders\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(4); $fld = new \App\Form\Input\Select_OrdersExternalSystem($this->lang['index']['filters']['idSystem'], 'filters[idSystem]', $fieldsValues['idSystem']); $fld->showDefaultOption(true); $fld->setMandatory(true); $form->addElement($fld); $fld = new \Engine\Form\Input\Select($this->lang['index']['filters']['entityType'], 'filters[entityType]', $fieldsValues['entityType']); $fld->setMandatory(true); $fld->setPossibleValues([ '' => '-', 'user' => $this->lang['formFields']['entityType_']['user'], 'office' => $this->lang['formFields']['entityType_']['office'], 'customer' => $this->lang['formFields']['entityType_']['customer'], 'customer_type' => $this->lang['formFields']['entityType_']['customer_type'], 'customer_title' => $this->lang['formFields']['entityType_']['customer_title'], 'corporate' => $this->lang['formFields']['entityType_']['corporate'], 'supplier' => $this->lang['formFields']['entityType_']['supplier'], 'supplierProduct' => $this->lang['formFields']['entityType_']['supplierProduct'], 'city' => $this->lang['formFields']['entityType_']['city'], 'station' => $this->lang['formFields']['entityType_']['station'], 'offerFormOfPayment' => $this->lang['formFields']['entityType_']['offerFormOfPayment'], 'offerFormOfCashing' => $this->lang['formFields']['entityType_']['offerFormOfCashing'], 'serviceCancelReason' =>$this->lang['formFields']['entityType_']['serviceCancelReason'], 'miceProject' => $this->lang['formFields']['entityType_']['miceProject'], ]); $form->addElement($fld); $fld = new \Engine\Form\Input\Text($this->lang['index']['filters']['idEntityExtSys'], 'filters[idEntityExtSys]', $fieldsValues['idEntityExtSys']); $fld->setMandatory(true); $form->addElement($fld); $fld = new \App\Form\Input\Autocomplete_Corporate($this->lang['index']['filters']['idEntityTina']['corporate'], 'filters[idEntityTina][corporate]', $fieldsValues['idEntityTina']['corporate']); $form->addElement($fld); $fld = new \App\Form\Input\Autocomplete_Supplier($this->lang['index']['filters']['idEntityTina']['supplier'], 'filters[idEntityTina][supplier]', $fieldsValues['idEntityTina']['supplier']); $form->addElement($fld); $fld = new \App\Form\Input\Autocomplete_User($this->lang['index']['filters']['idEntityTina']['user'], 'filters[idEntityTina][user]', $fieldsValues['idEntityTina']['user']); $form->addElement($fld); $fld = new \App\Form\Input\Autocomplete_Office($this->lang['index']['filters']['idEntityTina']['office'], 'filters[idEntityTina][office]', $fieldsValues['idEntityTina']['office']); $form->addElement($fld); $form->setJsCallback('MVC.listing.installedHandlers["listing"].reloadAndResetListing'); $form->loadMissingDefaultValues($this->values['listingParams']->getDefaultFilters()); return $form; } } 