1 <?php
2 3 4 5 6 7 8
9
10 Yii::import('bootstrap.widgets.input.TbInputInline');
11
12 13 14 15
16 class TbInputSearch extends TbInputInline
17 {
18 19 20 21
22 protected function searchField()
23 {
24 if (isset($this->htmlOptions['class']))
25 $this->htmlOptions['class'] .= ' search-query';
26 else
27 $this->htmlOptions['class'] = 'search-query';
28
29 $this->htmlOptions['placeholder'] = $this->model->getAttributeLabel($this->attribute);
30 echo $this->getPrepend();
31 echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
32 echo $this->getAppend();
33 echo $this->getError().$this->getHint();
34 }
35 }
36