<?php
 namespace Modules\Admin\Config\InvoiceCashings\DocsList; 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); $nameFld=new \Engine\Form\Input\Text($this->lang['index']['filters']['text'], 'filters[text]', $fieldsValues['text']); $nameFld->setTooltip($this->lang['index']['filters']['textTooltip']); $form->addElement($nameFld); $activeFld=new \Engine\Form\Input\Select($this->lang['index']['filters']['active'], 'filters[active]', $fieldsValues['active']); $activeFld->setPossibleValues( [ '2'=>'-', '1'=>$this->lang['index']['filters']['active_1'], '0'=>$this->lang['index']['filters']['active_0'] ]); $form->addElement($activeFld); $form->setJsCallback('MVC.listing.installedHandlers["listing"].reloadAndResetListing'); $form->loadMissingDefaultValues($this->values['listingParams']->getDefaultFilters()); return $form; } } 