Lines 877-883
Link Here
|
877 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
877 |
<label for="sql_params_[% sql_param.labelid | html %]">[% sql_param.entry | html %]:</label> |
878 |
[% IF (sql_param.select_multiple) %] |
878 |
[% IF (sql_param.select_multiple) %] |
879 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" multiple> |
879 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]" multiple> |
880 |
<option value="null" hidden></option> |
880 |
<option value="%" hidden></option> |
881 |
[% ELSE %] |
881 |
[% ELSE %] |
882 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]"> |
882 |
<select name="[%- sql_param.input.name | html -%]" tabindex="1" id="[%- sql_param.input.id | html -%]"> |
883 |
[% END %] |
883 |
[% END %] |
Lines 1584-1591
Link Here
|
1584 |
|
1584 |
|
1585 |
$('#report_param_form').on('submit', function(e) { |
1585 |
$('#report_param_form').on('submit', function(e) { |
1586 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1586 |
$('#report_param_form').find('select[multiple]').each( function (i) { |
1587 |
var $selected = $('option:first', this).val(); |
1587 |
if( $(this).find('option:selected').length === 0 ) { |
1588 |
$(this).val($selected); |
1588 |
$(this).val(['%']); |
|
|
1589 |
} |
1590 |
else if( $(this).find('option:selected').length > 1 ) { |
1591 |
var $selected = $('option:first', this).val(); |
1592 |
$(this).val($selected); |
1593 |
} |
1589 |
}); |
1594 |
}); |
1590 |
}); |
1595 |
}); |
1591 |
} |
1596 |
} |
1592 |
- |
|
|