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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc (-1 / +1 lines)
Lines 62-68 Link Here
62
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
62
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
63
                    <li>
63
                    <li>
64
                        <label for="rexpiration">Expiration:</label>
64
                        <label for="rexpiration">Expiration:</label>
65
                        <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr futuredate" type="text" />
65
                        <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" />
66
                    </li>
66
                    </li>
67
                </ol>
67
                </ol>
68
            <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>
68
            <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-2 / +11 lines)
Lines 78-96 Link Here
78
                var endPicker = document.querySelector("#"+thisInput.dataset.date_to)._flatpickr;
78
                var endPicker = document.querySelector("#"+thisInput.dataset.date_to)._flatpickr;
79
                endPicker.set('minDate', selectedDates[0]);
79
                endPicker.set('minDate', selectedDates[0]);
80
            }
80
            }
81
82
            let = on_close_focus = $(thisInput).data('flatpickr-on-close-focus');
83
            if ( on_close_focus ) {
84
                $(on_close_focus).focus();
85
            }
81
        },
86
        },
82
    });
87
    });
83
    $(document).ready(function(){
88
    $(document).ready(function(){
84
        $(".flatpickr").each(function(){
89
        $(".flatpickr").each(function(){
85
            let options = {};
90
            let options = {};
86
91
87
            if( $(this).hasClass("futuredate") ) {
92
            if( $(this).data("flatpickr-futuredate") === true ) {
88
                options['minDate'] = new Date().fp_incr(1);
93
                options['minDate'] = new Date().fp_incr(1);
89
                options['allowInvalidPreload'] = true;
94
                options['allowInvalidPreload'] = true;
90
            }
95
            }
91
            if( $(this).hasClass("pastdate") ) {
96
            if( $(this).data("flatpickr-pastdate") === true ) {
92
                options['maxDate'] = new Date().fp_incr(-1);
97
                options['maxDate'] = new Date().fp_incr(-1);
93
            }
98
            }
99
            if ( $(this).data('flatpickr-enable-time') === true ) {
100
                options['enableTime'] = true;
101
            }
102
94
            $(this).flatpickr(options);
103
            $(this).flatpickr(options);
95
        });
104
        });
96
    });
105
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-2 / +2 lines)
Lines 114-120 Link Here
114
                [% END %]
114
                [% END %]
115
            </td>
115
            </td>
116
            <td>
116
            <td>
117
                <input type="text" class="flatpickr futuredate" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
117
                <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
118
            </td>
118
            </td>
119
            <td>
119
            <td>
120
                [%- IF ( hold.found ) -%]
120
                [%- IF ( hold.found ) -%]
Lines 211-217 Link Here
211
211
212
                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
212
                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
213
                            <label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
213
                            <label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
214
                            <input type="text" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" size="10" value="[% hold.suspend_until | $KohaDates %]" class="suspend_until_datepicker" />
214
                            <input type="text" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" size="10" value="[% hold.suspend_until | $KohaDates %]" class="flatpickr" data-flatpickr-futuredate="true" />
215
                        [%- ELSE -%]
215
                        [%- ELSE -%]
216
                            <input type="hidden" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" value=""/>
216
                            <input type="hidden" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" value=""/>
217
                        [%- END -%]
217
                        [%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 875-881 Link Here
875
875
876
                                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
876
                                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
877
                                        <label for="suspend_until">until</label>
877
                                        <label for="suspend_until">until</label>
878
                                        <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr futuredate"/>
878
                                        <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true" />
879
                                        <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
879
                                        <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
880
                                         [% END %]
880
                                         [% END %]
881
                                    </form>
881
                                    </form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-9 / +5 lines)
Lines 112-118 Link Here
112
          <fieldset class="rows">
112
          <fieldset class="rows">
113
              <legend>Due date: </legend>
113
              <legend>Due date: </legend>
114
              <label for="duedatespec">Hard due date [% INCLUDE 'date-format.inc' %]:</label>
114
              <label for="duedatespec">Hard due date [% INCLUDE 'date-format.inc' %]:</label>
115
              <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
115
              [% IF Koha.Preference('SpecifyDueDate') %]
116
                  <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-enable-time="true" />
117
              [% ELSE %]
118
                  <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
119
              [% END %]
116
          </fieldset>
120
          </fieldset>
117
      [% END %]
121
      [% END %]
118
      <input type="hidden" name="op" value="show" />
122
      <input type="hidden" name="op" value="show" />
Lines 357-370 Link Here
357
                ],
361
                ],
358
                "bPaginate": false
362
                "bPaginate": false
359
            }));
363
            }));
360
361
            [% IF Koha.Preference('SpecifyDueDate') %]
362
               $("#duedatespec").flatpickr({
363
                    enableTime: true,
364
                    dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
365
                    defaultDate: new Date().setHours(23, 59, 0, 0) /* Today a 11:59PM */
366
                });
367
            [% END %]
368
        });
364
        });
369
365
370
    </script>
366
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-18 / +7 lines)
Lines 147-153 Link Here
147
                                    <input type="hidden" name="override_limit" value="1" />
147
                                    <input type="hidden" name="override_limit" value="1" />
148
                                    <input type="hidden" name="override_holds" value="1" />
148
                                    <input type="hidden" name="override_holds" value="1" />
149
                                    <div>
149
                                    <div>
150
                                        <label for="renewonholdduedate">Renewal due date:</label> <input type="text" size="20" id="renewonholdduedate" name="renewonholdduedate" value="" />
150
                                        <label for="renewonholdduedate">Renewal due date:</label>
151
                                        <input type="text" size="20" id="renewonholdduedate" name="renewonholdduedate" value="" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-enable-time="true" />
151
                                    </div>
152
                                    </div>
152
                                    <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
153
                                    <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
153
                                </form>
154
                                </form>
Lines 170-176 Link Here
170
                            [% END %]
171
                            [% END %]
171
172
172
                                <form method="get" action="/cgi-bin/koha/circ/renew.pl">
173
                                <form method="get" action="/cgi-bin/koha/circ/renew.pl">
173
                                    <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" />
174
                                    [% IF Koha.Preference('SpecifyDueDate') %]
175
                                        <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" class="flatpickr flatpickr-enable-time" />
176
                                    [% ELSE %]
177
                                        <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" />
178
                                    [% END %]
174
                                    <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
179
                                    <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
175
                                </form>
180
                                </form>
176
                    </div>
181
                    </div>
Lines 251-272 Link Here
251
            });
256
            });
252
        </script>
257
        </script>
253
    [% END %]
258
    [% END %]
254
    <script>
255
        $( document ).ready(function() {
256
            var renewonholdduedate = $("#renewonholdduedate").flatpickr({
257
                enableTime: true,
258
                dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
259
                minDate: new Date().fp_incr(1)
260
            });
261
262
            [% IF Koha.Preference('SpecifyDueDate') %]
263
                var hard_due_date = $("#hard_due_date").flatpickr({
264
                    enableTime: true,
265
                    dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
266
                });
267
            [% END %]
268
        });
269
    </script>
270
[% END %]
259
[% END %]
271
260
272
[% INCLUDE 'intranet-bottom.inc' %]
261
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-10 / +1 lines)
Lines 808-814 Link Here
808
                                        <div class="date-select" id="return_date_override_fields">
808
                                        <div class="date-select" id="return_date_override_fields">
809
                                            <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
809
                                            <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
810
810
811
                                            <input type="text" size="20" class="pastdate" id="return_date_override" name="return_date_override" value="[% return_date_override | html %]" />
811
                                            <input type="text" size="20" id="return_date_override" name="return_date_override" value="[% return_date_override | html %]" class="flatpickr" data-flatpickr-pastdate="true" data-flatpickr-enable-time="true" data-flatpickr-on-close-focus="#barcode" />
812
812
813
                                            <div class="circ-setting">
813
                                            <div class="circ-setting">
814
                                                [% IF ( return_date_override_remember ) %]
814
                                                [% IF ( return_date_override_remember ) %]
Lines 1038-1052 Link Here
1038
                    "dom": 'B<"clearfix">t',
1038
                    "dom": 'B<"clearfix">t',
1039
                    }, columns_settings);
1039
                    }, columns_settings);
1040
1040
1041
            $("#return_date_override").flatpickr({
1042
                enableTime: true,
1043
                dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
1044
                maxDate: "today",
1045
                onClose: function() {
1046
                    $("#barcode").focus();
1047
                }
1048
            });
1049
1050
            $("#exemptcheck").change(function () {
1041
            $("#exemptcheck").change(function () {
1051
                if (this.checked == true) {
1042
                if (this.checked == true) {
1052
                    $("#barcode").addClass("input-warning");
1043
                    $("#barcode").addClass("input-warning");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-6 / +1 lines)
Lines 248-254 Link Here
248
                                        </li>
248
                                        </li>
249
                                        <li class="ill_checkout_due_date">
249
                                        <li class="ill_checkout_due_date">
250
                                            <label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
250
                                            <label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
251
                                            <input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]"> [% INCLUDE 'date-format.inc' %]
251
                                            <input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> [% INCLUDE 'date-format.inc' %]
252
                                            <div class="hint">If you do not specify a due date, it will be set according to circulation rules</p>
252
                                            <div class="hint">If you do not specify a due date, it will be set according to circulation rules</p>
253
                                        </li>
253
                                        </li>
254
                                    </ol>
254
                                    </ol>
Lines 840-850 Link Here
840
        // Set column settings
840
        // Set column settings
841
        var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
841
        var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
842
842
843
        $("#ill_checkout_duedate_input").flatpickr({
844
            enableTime: true,
845
            dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
846
        });
847
848
        [% IF services_json.length > 0 %]
843
        [% IF services_json.length > 0 %]
849
        var services = [% services_json | $raw %];
844
        var services = [% services_json | $raw %];
850
        [% ELSE %]
845
        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 / +1 lines)
Lines 812-818 Link Here
812
812
813
                                                [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
813
                                                [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
814
                                                    <label for="suspend_until">until</label>
814
                                                    <label for="suspend_until">until</label>
815
                                                    <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr futuredate"/>
815
                                                    <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true"/>
816
                                                    <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
816
                                                    <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
817
                                                [% END %]
817
                                                [% END %]
818
                                            </fieldset>
818
                                            </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt (-1 / +1 lines)
Lines 68-74 Link Here
68
    [% END %]
68
    [% END %]
69
    </select>
69
    </select>
70
</li>
70
</li>
71
    <li><label for="to">Not checked out since: </label> <input size="10" id="to" class="flatpickr pastdate" name="Filter" value="" type="text" />
71
    <li><label for="to">Not checked out since: </label> <input size="10" id="to" class="flatpickr" data-flatpickr-pastdate="true" name="Filter" value="" type="text" />
72
</li>
72
</li>
73
		</ol>
73
		</ol>
74
	</fieldset>
74
	</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-8 / +1 lines)
Lines 518-524 Link Here
518
                            [% IF ( reserve_in_future ) %]
518
                            [% IF ( reserve_in_future ) %]
519
                                <li>
519
                                <li>
520
                                    <label for="from">Hold starts on date:</label>
520
                                    <label for="from">Hold starts on date:</label>
521
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr futuredate" />
521
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
522
                                </li>
522
                                </li>
523
                            [% END %]
523
                            [% END %]
524
524
Lines 1209-1221 Link Here
1209
                });
1209
                });
1210
            [% END %]
1210
            [% END %]
1211
1211
1212
            [% IF AutoResumeSuspendedHolds %]
1213
                $(".suspend_until_datepicker").flatpickr({
1214
                    minDate: new Date().fp_incr(1) /* Require that "until date" be in the future */
1215
                });
1216
            [% END %]
1217
1218
1219
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1212
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1220
                'bPaginate': false,
1213
                'bPaginate': false,
1221
                "sDom": '<"top pager"ilf>t',
1214
                "sDom": '<"top pager"ilf>t',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt (-2 / +1 lines)
Lines 46-52 Link Here
46
<input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" /></li>
46
<input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" /></li>
47
    <li>
47
    <li>
48
        <label for="startdate">Date: </label>
48
        <label for="startdate">Date: </label>
49
        <input type="text" size="10" id="startdate" name="startdate" class="flatpickr futuredate" value="" />
49
        <input type="text" size="10" id="startdate" name="startdate" class="flatpickr" data-flatpickr-futuredate="true" value="" />
50
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
50
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
51
    </li>
51
    </li>
52
<li><label for="report">Report:</label>
52
<li><label for="report">Report:</label>
53
- 

Return to bug 29394