Skip to content

Commit

Permalink
Merge pull request #86 from skeeks-cms/fixed-admin-user-search
Browse files Browse the repository at this point in the history
Fixed admin user search
  • Loading branch information
skeeks-semenov committed Mar 14, 2018
2 parents 456f46b + 70f4fde commit 98b04d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
CHANGELOG
==============

5.0.2.pre
5.0.3
----------------
* Fixed admin user search

5.0.2
----------------
* Copy elements and move sections
* "skeeks/yii2-form": "dev-master@dev"
Expand Down
4 changes: 3 additions & 1 deletion src/models/searchs/CmsUserSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ public function search($params)
if ($this->q) {
$query->andFilterWhere([
'or',
['like', $this->tableName() . '.name', $this->q],
['like', $this->tableName() . '.first_name', $this->q],
['like', $this->tableName() . '.last_name', $this->q],
['like', $this->tableName() . '.patronymic', $this->q],
['like', $this->tableName() . '.email', $this->q],
['like', $this->tableName() . '.phone', $this->q],
['like', $this->tableName() . '.username', $this->q],
Expand Down
4 changes: 3 additions & 1 deletion src/views/admin-user/_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
'size' => 1
]); ?>

<?= $form->field($searchModel, 'name') ?>
<?= $form->field($searchModel, 'first_name') ?>
<?= $form->field($searchModel, 'last_name') ?>
<?= $form->field($searchModel, 'patronymic') ?>
<?= $form->field($searchModel, 'username') ?>
<?= $form->field($searchModel, 'email') ?>
<?= $form->field($searchModel, 'phone') ?>
Expand Down

0 comments on commit 98b04d6

Please sign in to comment.