Fixing session search form in admin/index.php

skala
Julio Montoya 14 years ago
parent bc281f4d3f
commit 85cb3e7c4a
  1. 2
      main/admin/index.php
  2. 5
      main/admin/session_list.php

@ -172,7 +172,7 @@ if (api_get_setting('use_session_mode') == 'true') {
$blocks['sessions']['icon'] = Display::return_icon('session.png', get_lang('Sessions'), array(), ICON_SIZE_SMALL, false);
$blocks['sessions']['label'] = api_ucfirst(get_lang('Sessions'));
$search_form = ' <form method="POST" action="session_list.php">
$search_form = ' <form method="GET" action="session_list.php">
<input class="span3" type="text" name="keyword" value="">
<button class="search" type="submit">'.get_lang('Search').'</button>
</form>';

@ -32,6 +32,11 @@ Display::display_header($tool_name);
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions';
if (isset($_REQUEST['keyword'])) {
//Begin with see the searchOper param
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=name&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=bw';
}
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('NumberOfCourses'), get_lang('SessionCategoryName'),

Loading…
Cancel
Save