Commit 37109e66794a3758b53078f0601109220e6eed75
1 parent
cdff229a
customers search empty notice
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/app/backend/controllers/CustomersController.php
| @@ -17,7 +17,7 @@ class CustomersController extends \Phalcon\Mvc\Controller | @@ -17,7 +17,7 @@ class CustomersController extends \Phalcon\Mvc\Controller | ||
| 17 | $page = !empty( $params['page'] ) ? $params['page'] : 1; | 17 | $page = !empty( $params['page'] ) ? $params['page'] : 1; |
| 18 | 18 | ||
| 19 | $search_name = $this->request->getPost('search_name', 'string', NULL); | 19 | $search_name = $this->request->getPost('search_name', 'string', NULL); |
| 20 | - $search_phone = $this->request->getPost('search_phone', 'int', NULL); | 20 | + $search_phone = $this->request->getPost('search_phone', 'string', NULL); |
| 21 | $this->session->set('search_name', $search_name); | 21 | $this->session->set('search_name', $search_name); |
| 22 | $this->session->set('search_phone', $search_phone); | 22 | $this->session->set('search_phone', $search_phone); |
| 23 | if (!empty($search_name) && !empty($search_phone)) { | 23 | if (!empty($search_name) && !empty($search_phone)) { |
| @@ -33,6 +33,7 @@ class CustomersController extends \Phalcon\Mvc\Controller | @@ -33,6 +33,7 @@ class CustomersController extends \Phalcon\Mvc\Controller | ||
| 33 | $total = 1; | 33 | $total = 1; |
| 34 | } | 34 | } |
| 35 | else { | 35 | else { |
| 36 | + $this->flash->notice("Заполните поле поиска"); | ||
| 36 | $data = $this->models->getCustomers()->getAllData($page); | 37 | $data = $this->models->getCustomers()->getAllData($page); |
| 37 | $total = $this->models->getCustomers()->countData(); | 38 | $total = $this->models->getCustomers()->countData(); |
| 38 | } | 39 | } |