|
Lines 849-855
Link Here
|
| 849 |
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=edit_formid=[% id | uri %]" class="btn btn-primary">Edit SQL</a> |
849 |
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=edit_formid=[% id | uri %]" class="btn btn-primary">Edit SQL</a> |
| 850 |
</fieldset> |
850 |
</fieldset> |
| 851 |
[% ELSE # IF ( auth_val_error ) %] |
851 |
[% ELSE # IF ( auth_val_error ) %] |
| 852 |
<form method="get" action='/cgi-bin/koha/reports/guided_reports.pl'> |
852 |
<form method="get" action='/cgi-bin/koha/reports/guided_reports.pl' id='report_param_form'> |
| 853 |
<input type='hidden' name='id' value="[% id | html %]" /> |
853 |
<input type='hidden' name='id' value="[% id | html %]" /> |
| 854 |
<h1>Enter parameters for report [% name | html %]:</h1> |
854 |
<h1>Enter parameters for report [% name | html %]:</h1> |
| 855 |
[% IF ( notes ) %] |
855 |
[% IF ( notes ) %] |
|
Lines 876-885
Link Here
|
| 876 |
[% ELSE %] |
876 |
[% ELSE %] |
| 877 |
<li> |
877 |
<li> |
| 878 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
878 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
| 879 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]"> |
879 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" [%- sql_param.select_multiple | html -%]> |
| 880 |
[% IF (sql_param.include_all) %] |
880 |
[% IF (sql_param.include_all) %] |
| 881 |
<option value="%">All</option> |
881 |
<option value="%">All</option> |
| 882 |
[% END %] |
882 |
[% END %] |
|
|
883 |
[% IF (sql_param.select_multiple) %] |
| 884 |
<option value="null" hidden></option> |
| 885 |
[% END %] |
| 883 |
[% FOREACH value IN sql_param.input.values %] |
886 |
[% FOREACH value IN sql_param.input.values %] |
| 884 |
<option value="[%- value | html -%]">[%- sql_param.input.labels.$value | html -%]</option> |
887 |
<option value="[%- value | html -%]">[%- sql_param.input.labels.$value | html -%]</option> |
| 885 |
[% END %] |
888 |
[% END %] |
|
Lines 1541-1546
Link Here
|
| 1541 |
|
1544 |
|
| 1542 |
<script> |
1545 |
<script> |
| 1543 |
|
1546 |
|
|
|
1547 |
// if the report param form has multiselects override default form submission |
| 1548 |
if( $('#report_param_form').find('select[multiple]').length ) { |
| 1549 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
| 1550 |
$(this).on('change', function() { |
| 1551 |
var $selected = $(this).val().join('\n'); |
| 1552 |
$(this).find('option:first').val($selected); |
| 1553 |
}); |
| 1554 |
}); |
| 1555 |
|
| 1556 |
$('#report_param_form').on('submit', function(e) { |
| 1557 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
| 1558 |
var $selected = $('option:first', this).val(); |
| 1559 |
$(this).val($selected); |
| 1560 |
}); |
| 1561 |
}); |
| 1562 |
} |
| 1563 |
|
| 1544 |
function hide_bar_element() { |
1564 |
function hide_bar_element() { |
| 1545 |
$('#chart-column-horizontal').hide() |
1565 |
$('#chart-column-horizontal').hide() |
| 1546 |
$('.chart-column-group').each(function( index ) { |
1566 |
$('.chart-column-group').each(function( index ) { |