Lines 842-848
Link Here
|
842 |
[% END # /IF ( warn_authval_problem )%] |
842 |
[% END # /IF ( warn_authval_problem )%] |
843 |
|
843 |
|
844 |
[% IF ( enter_params ) %] |
844 |
[% IF ( enter_params ) %] |
845 |
<form action='/cgi-bin/koha/reports/guided_reports.pl'> |
845 |
<form action='/cgi-bin/koha/reports/guided_reports.pl' id='report_param_form'> |
846 |
<input type='hidden' name='reports' value="[% reports | html %]" /> |
846 |
<input type='hidden' name='reports' value="[% reports | html %]" /> |
847 |
[% IF ( auth_val_error ) %] |
847 |
[% IF ( auth_val_error ) %] |
848 |
<input type='hidden' name='phase' value='Edit SQL' /> |
848 |
<input type='hidden' name='phase' value='Edit SQL' /> |
Lines 883-892
Link Here
|
883 |
[% ELSE %] |
883 |
[% ELSE %] |
884 |
<li> |
884 |
<li> |
885 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
885 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
886 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]"> |
886 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" [%- sql_param.select_multiple | html -%]> |
887 |
[% IF (sql_param.include_all) %] |
887 |
[% IF (sql_param.include_all) %] |
888 |
<option value="%">All</option> |
888 |
<option value="%">All</option> |
889 |
[% END %] |
889 |
[% END %] |
|
|
890 |
[% IF (sql_param.select_multiple) %] |
891 |
<option value="null" hidden></option> |
892 |
[% END %] |
890 |
[% FOREACH value IN sql_param.input.values %] |
893 |
[% FOREACH value IN sql_param.input.values %] |
891 |
<option value="[%- value | html -%]">[%- sql_param.input.labels.$value | html -%]</option> |
894 |
<option value="[%- value | html -%]">[%- sql_param.input.labels.$value | html -%]</option> |
892 |
[% END %] |
895 |
[% END %] |
Lines 1535-1540
Link Here
|
1535 |
|
1538 |
|
1536 |
<script> |
1539 |
<script> |
1537 |
|
1540 |
|
|
|
1541 |
// if the report param form has multiselects overide default form submission |
1542 |
if( $('#report_param_form').find('select[multiple]').length ) { |
1543 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1544 |
$(this).on('change', function() { |
1545 |
var $selected = $(this).val().join('\n'); |
1546 |
$(this).find('option:first').val($selected); |
1547 |
}); |
1548 |
}); |
1549 |
|
1550 |
$('#report_param_form').on('submit', function(e) { |
1551 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1552 |
var $selected = $('option:first', this).val(); |
1553 |
$(this).val($selected); |
1554 |
}); |
1555 |
}); |
1556 |
} |
1557 |
|
1538 |
function hide_bar_element() { |
1558 |
function hide_bar_element() { |
1539 |
$('#chart-column-horizontal').hide() |
1559 |
$('#chart-column-horizontal').hide() |
1540 |
$('.chart-column-group').each(function( index ) { |
1560 |
$('.chart-column-group').each(function( index ) { |