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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-13 / +6 lines)
Lines 442-452 Link Here
442
        <li><label for="branchcode">Library:</label>
442
        <li><label for="branchcode">Library:</label>
443
            <select name="branchcode" id="branchcode">
443
            <select name="branchcode" id="branchcode">
444
                <option value="">Any</option>
444
                <option value="">Any</option>
445
                [% IF branchfilter %]
445
                [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
446
                    [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
447
                [% ELSE %]
448
                    [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
449
                [% END %]
450
            </select>
446
            </select>
451
        </li>
447
        </li>
452
        <li><label for="budgetid">Fund:</label>
448
        <li><label for="budgetid">Fund:</label>
Lines 512-523 Link Here
512
508
513
<label for="branchcode">Viewing suggestions for library:</label>
509
<label for="branchcode">Viewing suggestions for library:</label>
514
<select name="branchcode" id="branchcode">
510
<select name="branchcode" id="branchcode">
515
    <option value="">Any</option>
511
    <option value="__ANY__">Any</option>
516
    [% IF branchfilter %]
512
    [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
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>
513
</select>
522
514
523
515
Lines 1035-1045 Link Here
1035
                [% END %]
1027
                [% END %]
1036
1028
1037
                $("#branchcode").on('change',function(){
1029
                $("#branchcode").on('change',function(){
1030
                [%# Modify the hidden input in the filters block from the library %]
1031
                [%# dropdown list at the top of suggestion list %]
1038
                    let branchcode = $(this).val();
1032
                    let branchcode = $(this).val();
1039
                    if( branchcode == '' ){ branchcode = "__ANY__" }
1040
                    $('input[name="branchcode"]').val( branchcode );
1033
                    $('input[name="branchcode"]').val( branchcode );
1041
                    $('form[name="suggestionfilter"]').submit();
1034
                    $('form[name="suggestionfilter"]').submit();
1042
                });
1035
                });
1036
1043
                $(".checkall").click(function(e){
1037
                $(".checkall").click(function(e){
1044
                    e.preventDefault();
1038
                    e.preventDefault();
1045
                    $(this).parents('form').checkCheckboxes();
1039
                    $(this).parents('form').checkCheckboxes();
1046
- 

Return to bug 25033