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

(-)a/catalogue/updateitem.pl (-9 / +5 lines)
Lines 40-57 my $withdrawn = $cgi->param('withdrawn'); Link Here
40
my $damaged                           = $cgi->param('damaged');
40
my $damaged                           = $cgi->param('damaged');
41
my $exclude_from_local_holds_priority = $cgi->param('exclude_from_local_holds_priority');
41
my $exclude_from_local_holds_priority = $cgi->param('exclude_from_local_holds_priority');
42
my $bookable                          = $cgi->param('bookable') // q{};
42
my $bookable                          = $cgi->param('bookable') // q{};
43
my $cancelhold                        = $cgi->param('cancelhold');
44
my $reverthold                        = $cgi->param('reverthold');
45
my $redirecturl                       = $cgi->param('redirecturl');
43
my $redirecturl                       = $cgi->param('redirecturl');
46
44
47
if ( defined $cancelhold ) {
45
if ( $op eq "cud-cancelhold" ) {
48
    LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => $cancelhold } );
46
    LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => 1 } );
49
} elsif ( defined $reverthold ) {
47
} elsif ( $op eq "cud-reverthold" ) {
50
    $cancelhold = 0;
48
    LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => undef } );
51
    LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => $cancelhold } );
52
} else {
53
    $cancelhold = undef;
54
}
49
}
50
55
if ( defined $redirecturl ) {
51
if ( defined $redirecturl ) {
56
    print $cgi->redirect( $redirecturl . $biblionumber );
52
    print $cgi->redirect( $redirecturl . $biblionumber );
57
}
53
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-12 / +30 lines)
Lines 105-121 Link Here
105
        <div class="dialog alert">
105
        <div class="dialog alert">
106
            The following item(s) have a waiting item-level hold and have been marked as lost.
106
            The following item(s) have a waiting item-level hold and have been marked as lost.
107
            <ul>
107
            <ul>
108
            [% FOREACH i IN waitinglostitems %]
108
                [% FOREACH i IN waitinglostitems %]
109
                <br>
109
                    <br />
110
                <li>Item (<i>[% i.barcode | html %]</i>)
110
                    <li
111
                <form action="../catalogue/updateitem.pl" method="post" class="inline">
111
                        >Item (<i>[% i.barcode | html %]</i>)
112
                    <input type="hidden" name="itemnumber" value="[% i.itemnumber | html %]">
112
                        <a
113
                    <input type="hidden" name="biblionumber" value="[% i.biblionumber | html %]">
113
                            class="btn btn-default btn-xs submit-form-link"
114
                    <input type="hidden" name="redirecturl" value="../cataloguing/additem.pl?biblionumber=">
114
                            href="#"
115
                    <button type="submit" name="reverthold" value="1" class="btn btn-default"><i class="fa fa-undo"></i> Revert waiting status</button>
115
                            data-itemnumber="[% i.itemnumber | html %]"
116
                    <button type="submit" name="cancelhold" value="1" class="btn btn-default"><i class="fa fa-times"></i> Cancel hold</button></li>
116
                            data-biblionumber="[% i.biblionumber | html %]"
117
                </form>
117
                            data-redirecturl="../cataloguing/additem.pl?biblionumber="
118
            [% END %]
118
                            data-method="post"
119
                            data-op="cud-reverthold"
120
                            data-action="../catalogue/updateitem.pl"
121
                        >
122
                            Revert waiting status
123
                        </a>
124
                        <a
125
                            class="btn btn-default btn-xs submit-form-link"
126
                            href="#"
127
                            data-itemnumber="[% i.itemnumber | html %]"
128
                            data-biblionumber="[% i.biblionumber | html %]"
129
                            data-redirecturl="../cataloguing/additem.pl?biblionumber="
130
                            data-method="post"
131
                            data-op="cud-cancelhold"
132
                            data-action="../catalogue/updateitem.pl"
133
                        >
134
                            Cancel hold
135
                        </a>
136
                    </li>
137
                [% END %]
119
            </ul>
138
            </ul>
120
        </div>
139
        </div>
121
    [% END %]
140
    [% END %]
122
- 

Return to bug 20844