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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-1 / +10 lines)
Lines 84-90 Link Here
84
                        [% UNLESS( singleBranchMode) %]
84
                        [% UNLESS( singleBranchMode) %]
85
                            <td class="branch">
85
                            <td class="branch">
86
                                <span class="tdlabel">Pick up location:</span>
86
                                <span class="tdlabel">Pick up location:</span>
87
                                [% HOLD.branch.branchname | html %]
87
                                [% IF Koha.Preference('OPACInTransitHoldPickupLocationChange') && HOLD.is_in_transit %]
88
                                    <form class="form-inline" action="/cgi-bin/koha/opac-modrequest.pl" method="post">
89
                                        <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
90
                                        <select name="new_pickup_location" class="new_pickup_location" onchange="this.form.submit()">
91
                                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { item => HOLD.itemnumber, patron => logged_in_user }, selected => HOLD.branchcode }) %]
92
                                        </select>
93
                                    </form>
94
                                [% ELSE %]
95
                                    [% HOLD.branch.branchname | html %]
96
                                [% END %]
88
                            </td>
97
                            </td>
89
                        [% END %]
98
                        [% END %]
90
                        [% IF ( showpriority ) %]
99
                        [% IF ( showpriority ) %]
(-)a/opac/opac-modrequest.pl (-1 / +13 lines)
Lines 41-46 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
41
41
42
my $reserve_id = $query->param('reserve_id');
42
my $reserve_id = $query->param('reserve_id');
43
my $cancellation_request = $query->param('cancellation_request');
43
my $cancellation_request = $query->param('cancellation_request');
44
my $new_pickup_location  = $query->param('new_pickup_location');
44
45
45
if ( $reserve_id && $borrowernumber ) {
46
if ( $reserve_id && $borrowernumber ) {
46
47
Lines 61-66 if ( $reserve_id && $borrowernumber ) { Link Here
61
        $hold->cancel
62
        $hold->cancel
62
          if $hold->is_cancelable_from_opac;
63
          if $hold->is_cancelable_from_opac;
63
    }
64
    }
65
66
    if ( $new_pickup_location ) {
67
68
        if ( C4::Context->preference('OPACInTransitHoldPickupLocationChange') ) {
69
            $hold->set_pickup_location({ library_id => $new_pickup_location });
70
        }
71
        else {
72
            # whatcha tryin to do?
73
            print $query->redirect('/cgi-bin/koha/errors/403.pl');
74
            exit;
75
        }
76
    }
64
}
77
}
65
78
66
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds");
79
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds");
67
- 

Return to bug 30500