View | Details | Raw Unified | Return to bug 25033
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-10 / +17 lines)
Lines 510-515 Link Here
510
510
511
<h1>Suggestions management</h1>
511
<h1>Suggestions management</h1>
512
512
513
<label for="branchcode">Viewing suggestions for library:</label>
514
<select name="branchcode" id="branchcode">
515
    <option value="">Any</option>
516
    [% IF branchfilter %]
517
        [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
518
    [% ELSE %]
519
        [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
520
    [% END %]
521
</select>
522
513
523
514
[% FOR m IN messages %]
524
[% FOR m IN messages %]
515
    <div class="dialog [% m.type | html %]">
525
    <div class="dialog [% m.type | html %]">
Lines 769-774 Link Here
769
            <aside>
779
            <aside>
770
780
771
<form name="suggestionfilter" action="suggestion.pl" method="get">
781
<form name="suggestionfilter" action="suggestion.pl" method="get">
782
    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
772
<fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
783
<fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
773
                <select name="displayby" id="displayby" style="width:auto;">
784
                <select name="displayby" id="displayby" style="width:auto;">
774
                    [% IF ( displayby == "STATUS" ) %]
785
                    [% IF ( displayby == "STATUS" ) %]
Lines 921-935 Link Here
921
                        [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %]
932
                        [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %]
922
                        [% END %]
933
                        [% END %]
923
                    </select></li>
934
                    </select></li>
924
                    <li><label for="branchcode">Library:</label>
925
                    <select name="branchcode" id="branchcode">
926
                        <option value="__ANY__">Any</option>
927
                        [% IF branchfilter %]
928
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
929
                        [% ELSE %]
930
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
931
                        [% END %]
932
                    </select></li>
933
                    <li>
935
                    <li>
934
                        <input type="submit" value="Go" />
936
                        <input type="submit" value="Go" />
935
                    </li>
937
                    </li>
Lines 1032-1037 Link Here
1032
                    [% END %]
1034
                    [% END %]
1033
                [% END %]
1035
                [% END %]
1034
1036
1037
                $("#branchcode").on('change',function(){
1038
                    let branchcode = $(this).val();
1039
                    if( branchcode == '' ){ branchcode = "__ANY__" }
1040
                    $('input[name="branchcode"]').val( branchcode );
1041
                    $('form[name="suggestionfilter"]').submit();
1042
                });
1035
                $(".checkall").click(function(e){
1043
                $(".checkall").click(function(e){
1036
                    e.preventDefault();
1044
                    e.preventDefault();
1037
                    $(this).parents('form').checkCheckboxes();
1045
                    $(this).parents('form').checkCheckboxes();
1038
- 

Return to bug 25033