Fixing session search form in admin/index.php

skala
Julio Montoya 13 years ago
parent bc281f4d3f
commit 85cb3e7c4a
  1. 8
      main/admin/index.php
  2. 7
      main/admin/session_list.php

@ -172,10 +172,10 @@ 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">
<input class="span3" type="text" name="keyword" value="">
<button class="search" type="submit">'.get_lang('Search').'</button>
</form>';
$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>';
$blocks['sessions']['search_form'] = $search_form;
$items = array();
$items[] = array('url'=>'session_list.php', 'label' => get_lang('ListSession'));

@ -31,7 +31,12 @@ $tool_name = get_lang('SessionList');
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';
$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