Skip to content

Commit

Permalink
fix for MDL-5958 from Elijah (HSU)
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Feb 28, 2007
1 parent 9836d9c commit 8663848
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions mod/data/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,9 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re
* a search string and prints a preference box in view.php *
* *
* This preference box prints a searchable advanced search template if *
* a) A template is defined *
* b) The advanced search checkbox is checked. *
* *
* a) A template is defined *
* b) The advanced search checkbox is checked. *
* *
* input @param object $data *
* @param int $perpage *
* @param string $search *
Expand Down Expand Up @@ -967,15 +967,15 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
echo '<option value="DESC">'.get_string('descending','data').'</option>';
}
echo '</select>';

if ($advanced) {
$checked = ' checked="checked" ';
}
else {
$checked = '';
}
print '
<script type="text/javascript">
//<![CDATA[
<!-- Start
Expand Down Expand Up @@ -1005,20 +1005,19 @@ function showHideAdvSearch(checked) {
// End -->
//]]>
</script>';

echo '&nbsp;<input type="checkbox" name="advanced" value="1" '.$checked.' onchange="showHideAdvSearch(this.checked);" />'.get_string('advancedsearch', 'data');
echo '&nbsp;<input type="submit" value="'.get_string('savesettings','data').'" />';

echo '<br />';
echo '<div class="dataadvancedsearch" id="data_adv_form" style="display: ;margin-left:auto;margin-right:auto';
echo '<div class="dataadvancedsearch" id="data_adv_form" style="display: ';

if ($advanced) {
echo 'inline';
}
else {
echo 'none';
}
echo ';" >';

echo ';margin-left:auto;margin-right:auto;" >';
echo '<table class="boxaligncenter">';

// print ASC or DESC
Expand Down

0 comments on commit 8663848

Please sign in to comment.