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 699-704 Link Here
699
    [% INCLUDE 'calendar.inc' %]
699
    [% INCLUDE 'calendar.inc' %]
700
    [% INCLUDE 'columns_settings.inc' %]
700
    [% INCLUDE 'columns_settings.inc' %]
701
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
701
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
702
    [% Asset.js("js/request.js") | $raw %]
702
    <script>
703
    <script>
703
        var biblionumber = "[% biblionumber | $raw %]";
704
        var biblionumber = "[% biblionumber | $raw %]";
704
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
705
        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 505-512 foreach my $biblionumber (@biblionumbers) { Link Here
505
                    $num_available++;
505
                    $num_available++;
506
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
506
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
507
                        $item->{pickup_locations} = 'Any library';
507
                        $item->{pickup_locations} = 'Any library';
508
                        $item->{pickup_locations_code} = 'all';
508
                    } else {
509
                    } else {
509
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
510
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
511
                        $item->{pickup_locations_code} = join (',', map { $_->{branchcode} } Koha::Items->find($itemnumber)->pickup_locations({ patron => $patron }));
510
                    }
512
                    }
511
513
512
                    push( @available_itemtypes, $item->{itype} );
514
                    push( @available_itemtypes, $item->{itype} );
513
- 

Return to bug 22284