Source of file DocumentationSearchForm.php
Size: 1,036 Bytes - Last Modified: 2021-12-23T10:29:30+00:00
/var/www/docs.ssmods.com/process/src/code/forms/DocumentationSearchForm.php
12345678910111213141516171819202122232425262728293031323334353637 | <?php class DocumentationSearchForm extends Form { public function __construct($controller) { $fields = new FieldList( TextField::create('q', _t('DocumentationViewer.SEARCH', 'Search'), '') ->setAttribute('placeholder', _t('DocumentationViewer.SEARCH', 'Search')) ); $page = $controller->getPage(); if ($page) { $versions = HiddenField::create( 'Versions', _t('DocumentationViewer.VERSIONS', 'Versions'), $page->getEntity()->getVersion() ); $fields->push($versions); } $actions = new FieldList( new FormAction('results', _t('DocumentationViewer.SEARCH', 'Search')) ); parent::__construct($controller, 'DocumentationSearchForm', $fields, $actions); $this->disableSecurityToken(); $this->setFormMethod('GET'); $this->setFormAction($controller->Link('results')); $this->addExtraClass('search'); } } |