Change kit item selection from the Item Kit maintenance to only select kit items.

This commit is contained in:
Steve Ireland
2017-02-01 14:43:16 -05:00
parent 999e12279a
commit faadbe554a
3 changed files with 110 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ class Items extends Secure_Controller
$filters = array_merge($filters, $filledup);
$items = $this->Item->search($search, $filters, $limit, $offset, $sort, $order);
$total_rows = $this->Item->get_found_rows($search, $filters);
$data_rows = array();
@@ -120,6 +121,14 @@ class Items extends Secure_Controller
echo json_encode($suggestions);
}
public function suggest_kits()
{
$suggestions = $this->xss_clean($this->Item->get_kit_search_suggestions($this->input->post_get('term'),
array('search_custom' => FALSE, 'is_deleted' => FALSE), TRUE));
echo json_encode($suggestions);
}
/*
Gives search suggestions based on what is being searched for
*/