diff --git a/src/app/backend/controllers/CustomersController.php b/src/app/backend/controllers/CustomersController.php index b26f247..5c75e5d 100644 --- a/src/app/backend/controllers/CustomersController.php +++ b/src/app/backend/controllers/CustomersController.php @@ -18,6 +18,7 @@ class CustomersController extends \Phalcon\Mvc\Controller $search_name = $this->request->getPost('search_name', 'string', NULL); $search_phone = $this->request->getPost('search_phone', 'string', NULL); + $search_submit = $this->request->getPost('search_submit', 'string', NULL); $this->session->set('search_name', $search_name); $this->session->set('search_phone', $search_phone); if (!empty($search_name) && isset($search_phone)) { @@ -32,7 +33,7 @@ class CustomersController extends \Phalcon\Mvc\Controller $data = $this->models->getCustomers()->getDataByPhone($search_phone); $total = 1; } - else { + elseif (isset($search_submit)) { $this->flash->notice("Параметры поиска не указаны"); $data = $this->models->getCustomers()->getAllData($page); $total = $this->models->getCustomers()->countData(); diff --git a/src/app/backend/views/customers/index.php b/src/app/backend/views/customers/index.php index 1f2689b..2e3fed8 100644 --- a/src/app/backend/views/customers/index.php +++ b/src/app/backend/views/customers/index.php @@ -15,7 +15,7 @@