<?php
namespace Modules\Bsp\Listing; 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(2); $bspPeriod = new \Engine\Form\Input\DateInterval($this->lang['index']['filters']['bspInterval'], 'filters[bspInterval]', $fieldsValues['bspInterval']); $form->addElement($bspPeriod); $office = new \App\Form\Input\Autocomplete_Office($this->lang['index']['filters']['idOffice'], 'filters[idOffice]', $fieldsValues['idOffice']); if (!\App\UserAccess\CurrentUserAccessFast::getInstance()->hasAccessToOption('Modules/Bsp/Listing-completeAccess')) { $office->setDisabled(); } $form->addElement($office); $form->showResetButton(true); $form->setJsCallback('MVC.listing.installedHandlers["listing"].reloadAndResetListing'); $form->loadMissingDefaultValues($this->values['listingParams']->getDefaultFilters()); return $form; } } 