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

(-)a/circ/pendingreserves.pl (-1 / +2 lines)
Lines 56-62 my @messages; Link Here
56
if ( $op eq 'cancel_reserve' and $reserve_id ) {
56
if ( $op eq 'cancel_reserve' and $reserve_id ) {
57
    my $hold = Koha::Holds->find( $reserve_id );
57
    my $hold = Koha::Holds->find( $reserve_id );
58
    if ( $hold ) {
58
    if ( $hold ) {
59
        $hold->cancel;
59
        my $cancellation_reason = $input->param('cancellation-reasion');
60
        $hold->cancel({ cancellation_reason => $cancellation_reason });
60
        push @messages, { type => 'message', code => 'hold_cancelled' };
61
        push @messages, { type => 'message', code => 'hold_cancelled' };
61
    }
62
    }
62
} elsif ( $op =~ m|^mark_as_lost| ) {
63
} elsif ( $op =~ m|^mark_as_lost| ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-3 / +16 lines)
Lines 149-158 Link Here
149
            <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
149
            <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
150
                <input type="hidden" name="op" value="cancel_reserve" />
150
                <input type="hidden" name="op" value="cancel_reserve" />
151
                <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
151
                <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
152
153
                [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
154
                [% IF hold_cancellation %]
155
                    <div class="form-group">
156
                        <label for="cancellation-reason">Cancellation reason</label>
157
                        <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
158
                            <option value="">No reason given</option>
159
                            [% FOREACH reason IN hold_cancellation %]
160
                                <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
161
                            [% END %]
162
                        </select>
163
                    </div>
164
                [% END %]
165
152
                [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
166
                [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
153
                    <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
167
                    <input class="btn btn-default" type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
154
                [% ELSE %]
168
                [% ELSE %]
155
                    <input type="submit" value="Cancel hold" />
169
                    <input class="btn btn-default" type="submit" value="Cancel hold" />
156
                [% END %]
170
                [% END %]
157
            </form>
171
            </form>
158
172
159
- 

Return to bug 25534