2014-09-07 01:26:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class DocumentationSearchForm extends Form {
|
|
|
|
|
|
|
|
public function __construct($controller) {
|
|
|
|
$fields = new FieldList(
|
2014-09-15 11:47:45 +02:00
|
|
|
TextField::create('q', _t('DocumentationViewer.SEARCH', 'Search'), '')
|
|
|
|
->setAttribute('placeholder', _t('DocumentationViewer.SEARCH', 'Search'))
|
2014-09-07 01:26:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
$actions = new FieldList(
|
2014-09-15 11:47:45 +02:00
|
|
|
new FormAction('results', _t('DocumentationViewer.SEARCH', 'Search'))
|
2014-09-07 01:26:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
parent::__construct($controller, 'DocumentationSearchForm', $fields, $actions);
|
|
|
|
|
|
|
|
$this->disableSecurityToken();
|
|
|
|
$this->setFormMethod('GET');
|
2014-09-19 13:29:22 +02:00
|
|
|
$this->setFormAction($controller->Link('results'));
|
2014-09-15 11:47:45 +02:00
|
|
|
|
|
|
|
$this->addExtraClass('search');
|
|
|
|
}
|
|
|
|
}
|