Skip to content

Commit

Permalink
Added all search elements to input-group
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Nov 10, 2016
1 parent 3c6a02a commit 1d9cb1f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/widgets/SearchForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,20 @@ public function run()
$this->getView()->registerCss("#{$formId} button {-webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);}");
$form = ActiveForm::begin(array_merge($this->defaultFormOptions, $this->formOptions));
print Html::beginTag('div', ['class' => 'row']);
print Html::beginTag('div', ['class' => 'col-xs-9']);
print Html::beginTag('div', ['class' => 'col-xs-12']);
print Html::beginTag('div', ['class' => 'input-group']);
if ($this->inputWidget) {
print $form->field($this->model, $this->attribute, ['template' => '{input}{error}'])->widget($this->inputWidget, $this->inputOptions);
print $form->field($this->model, $this->attribute, ['template' => '{input}'])->widget($this->inputWidget, $this->inputOptions);
} else {
print $form->field($this->model, $this->attribute, ['template' => '{input}{error}'])->input($this->inputType, array_merge([
print $form->field($this->model, $this->attribute, ['template' => '{input}'])->input($this->inputType, array_merge([
'placeholder' => $this->model->getAttributeLabel($this->attribute),
'class' => 'form-control',
], $this->inputOptions));
}
print Html::endTag('div');
print Html::beginTag('div', ['class' => 'col-xs-3']);
print Html::beginTag('span', ['class' => 'input-group-btn']);
print Html::submitButton(Yii::t('hipanel', 'Search'), ['class' => 'btn btn-flat ' . $this->buttonColor]);
print Html::endTag('span');
print Html::endTag('div');
print Html::endTag('div');
print Html::endTag('div');
ActiveForm::end();
Expand Down

0 comments on commit 1d9cb1f

Please sign in to comment.