Lines 881-887
Link Here
|
881 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
881 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
882 |
[% IF (sql_param.select_multiple) %] |
882 |
[% IF (sql_param.select_multiple) %] |
883 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" multiple> |
883 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" multiple> |
884 |
<option value="%" hidden></option> |
884 |
<option value="[% sql_param.input.values.join("\n") | html %]" hidden selected></option> |
885 |
[% ELSE %] |
885 |
[% ELSE %] |
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 -%]"> |
887 |
[% END %] |
887 |
[% END %] |
Lines 1588-1597
Link Here
|
1588 |
|
1588 |
|
1589 |
$('#report_param_form').on('submit', function(e) { |
1589 |
$('#report_param_form').on('submit', function(e) { |
1590 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1590 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1591 |
if( $(this).find('option:selected').length === 0 ) { |
1591 |
if( $(this).find('option:selected').length > 1 ) { |
1592 |
$(this).val(['%']); |
|
|
1593 |
} |
1594 |
else if( $(this).find('option:selected').length > 1 ) { |
1595 |
var $selected = $('option:first', this).val(); |
1592 |
var $selected = $('option:first', this).val(); |
1596 |
$(this).val($selected); |
1593 |
$(this).val($selected); |
1597 |
} |
1594 |
} |
1598 |
- |
|
|