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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +3 lines)
Lines 333-341 Link Here
333
                        Hold must be record level
333
                        Hold must be record level
334
                    </span>
334
                    </span>
335
                [% ELSIF ( itemloo.available ) %]
335
                [% ELSIF ( itemloo.available ) %]
336
                    <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
336
                    <input type="radio" name="checkitem" data-pickup-locations="[% itemloo.pickup_locations_code | html %]" value="[% itemloo.itemnumber | html %]" />
337
                [% ELSIF ( itemloo.override ) %]
337
                [% ELSIF ( itemloo.override ) %]
338
                    <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
338
                    <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" data-pickup-locations="[% itemloo.pickup_locations_code | html %]" />
339
                    <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
339
                    <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
340
                [% ELSE %]
340
                [% ELSE %]
341
                    <span class="error">
341
                    <span class="error">
Lines 700-705 Link Here
700
    [% INCLUDE 'calendar.inc' %]
700
    [% INCLUDE 'calendar.inc' %]
701
    [% INCLUDE 'columns_settings.inc' %]
701
    [% INCLUDE 'columns_settings.inc' %]
702
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
702
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
703
    [% Asset.js("js/request.js") | $raw %]
703
    <script>
704
    <script>
704
        var biblionumber = "[% biblionumber | $raw %]";
705
        var biblionumber = "[% biblionumber | $raw %]";
705
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
706
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
(-)a/koha-tmpl/intranet-tmpl/prog/js/request.js (+23 lines)
Line 0 Link Here
1
$(document).ready(function() {
2
    $('input[name="checkitem"]').click(function() {
3
        var pl = $(this).data('pickup-locations');
4
        var select = $('select[name="pickup"]');
5
        var options = $('option', select);
6
        if(pl == 'all') {
7
            options.removeClass('hide');
8
        } else {
9
            pl = pl.split(',');
10
            options.each(function() {
11
                var value = $(this).val();
12
                if($.inArray(value, pl) == -1) {
13
                    $(this).addClass('hide');
14
                    if(select.val() == value) {
15
                        select.val(pl[0]);
16
                    }
17
                } else {
18
                    $(this).removeClass('hide');
19
                }
20
            });
21
        }
22
    });
23
});
(-)a/reserve/request.pl (-1 / +2 lines)
Lines 493-500 foreach my $biblionumber (@biblionumbers) { Link Here
493
                    $num_available++;
493
                    $num_available++;
494
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
494
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
495
                        $item->{pickup_locations} = 'Any library';
495
                        $item->{pickup_locations} = 'Any library';
496
                        $item->{pickup_locations_code} = 'all';
496
                    } else {
497
                    } else {
497
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
498
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
499
                        $item->{pickup_locations_code} = join (',', map { $_->{branchcode} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
498
                    }
500
                    }
499
501
500
                    push( @available_itemtypes, $item->{itype} );
502
                    push( @available_itemtypes, $item->{itype} );
501
- 

Return to bug 22284