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

(-)a/circ/renew.pl (+5 lines)
Lines 48-53 $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae Link Here
48
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
48
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
49
my $override_limit = $cgi->param('override_limit');
49
my $override_limit = $cgi->param('override_limit');
50
my $override_holds = $cgi->param('override_holds');
50
my $override_holds = $cgi->param('override_holds');
51
my $hard_due_date  = $cgi->param('hard_due_date');
51
52
52
my ( $item, $issue, $borrower );
53
my ( $item, $issue, $borrower );
53
my $error = q{};
54
my $error = q{};
Lines 99-104 if ($barcode) { Link Here
99
                    if ( $cgi->param('renewonholdduedate') ) {
100
                    if ( $cgi->param('renewonholdduedate') ) {
100
                        $date_due = dt_from_string( scalar $cgi->param('renewonholdduedate'));
101
                        $date_due = dt_from_string( scalar $cgi->param('renewonholdduedate'));
101
                    }
102
                    }
103
                    if ( C4::Context->preference('SpecifyDueDate') && $hard_due_date ) {
104
                        $date_due = dt_from_string( $hard_due_date );
105
                    }
102
                    $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode, $date_due );
106
                    $date_due = AddRenewal( undef, $item->itemnumber(), $branchcode, $date_due );
103
                    $template->param( date_due => $date_due );
107
                    $template->param( date_due => $date_due );
104
                }
108
                }
Lines 125-130 if ($barcode) { Link Here
125
    );
129
    );
126
}
130
}
127
131
132
$template->param( hard_due_date => ($hard_due_date ? output_pref({ str => $hard_due_date, dateformat => 'iso' }) : undef) );
128
# Checking if there is a Fast Cataloging Framework
133
# Checking if there is a Fast Cataloging Framework
129
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
134
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
130
135
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-1 / +20 lines)
Lines 144-149 Link Here
144
                            [% END %]
144
                            [% END %]
145
145
146
                                <form method="get" action="/cgi-bin/koha/circ/renew.pl">
146
                                <form method="get" action="/cgi-bin/koha/circ/renew.pl">
147
                                    <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" />
147
                                    <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
148
                                    <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
148
                                </form>
149
                                </form>
149
                    </div>
150
                    </div>
Lines 168-173 Link Here
168
                    <fieldset>
169
                    <fieldset>
169
                        <legend>Renew</legend>
170
                        <legend>Renew</legend>
170
171
172
                        [% IF Koha.Preference('SpecifyDueDate') %]
173
                            <label for="hard_due_date">Hard due date [% INCLUDE 'date-format.inc' %]:</label>
174
                            <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" />
175
                            <br/>
176
                        [% END %]
177
171
                        <label for="barcode">Enter item barcode: </label>
178
                        <label for="barcode">Enter item barcode: </label>
172
179
173
                        <input name="barcode" id="barcode" size="14" class="focus" type="text" />
180
                        <input name="barcode" id="barcode" size="14" class="focus" type="text" />
Lines 215-220 Link Here
215
            }).on('change', function(e) {
222
            }).on('change', function(e) {
216
                if ( ! is_valid_date( $(this).val() ) ) {$(this).val('');}
223
                if ( ! is_valid_date( $(this).val() ) ) {$(this).val('');}
217
            });
224
            });
225
226
            [% IF Koha.Preference('SpecifyDueDate') %]
227
                $("#hard_due_date").datetimepicker({
228
                    onClose: function(dateText, inst) {
229
                        validate_date(dateText, inst);
230
                    },
231
                    hour: 23,
232
                    minute: 59
233
                }).on("change", function(e, value) {
234
                    if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
235
                });
236
            [% END %]
237
218
        });
238
        });
219
    </script>
239
    </script>
220
[% END %]
240
[% END %]
221
- 

Return to bug 16112