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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc (+8 lines)
Lines 126-131 Link Here
126
126
127
        $(document).ready(function(){
127
        $(document).ready(function(){
128
            $(".flatpickr").flatpickr();
128
            $(".flatpickr").flatpickr();
129
130
            $(".clear-flatpickr").on("click", function(e){
131
                e.preventDefault();
132
                var element = $(this).data("fp");
133
                if( element ){
134
                    document.querySelector("#" + element )._flatpickr.clear();
135
                }
136
            });
129
        });
137
        });
130
138
131
</script>
139
</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (+1 lines)
Lines 175-180 Link Here
175
                        [% IF AutoResumeSuspendedHolds %]
175
                        [% IF AutoResumeSuspendedHolds %]
176
                            <label for="suspend_until"> until </label>
176
                            <label for="suspend_until"> until </label>
177
                            <input type="text" name="suspend_until" id="suspend_until" class="flatpickr futuredate" size="10" />
177
                            <input type="text" name="suspend_until" id="suspend_until" class="flatpickr futuredate" size="10" />
178
                            <p><a href="#" class="clear-flatpickr" data-fp="suspend_until">Clear date to suspend indefinitely</a></p>
178
                        [% END %]
179
                        [% END %]
179
                    </form>
180
                    </form>
180
                </div>
181
                </div>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-7 / +1 lines)
Lines 886-892 Link Here
886
                    <label for="suspend_untilDate">Suspend until:</label>
886
                    <label for="suspend_untilDate">Suspend until:</label>
887
                    <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
887
                    <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
888
                    [% INCLUDE 'date-format.inc' %]
888
                    [% INCLUDE 'date-format.inc' %]
889
                    <p><a href="#" id="suspend-modal-clear-date">Clear date to suspend indefinitely</a></p>
889
                    <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
890
                </div>
890
                </div>
891
                <div class="modal-footer">
891
                <div class="modal-footer">
892
                    <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
892
                    <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
Lines 987-997 Link Here
987
                $("#suspendHoldModal").modal("show");
987
                $("#suspendHoldModal").modal("show");
988
            });
988
            });
989
989
990
            $("#suspend-modal-clear-date").on( "click", function(e) {
991
                e.preventDefault();
992
                suspend_until_date.clear();
993
            });
994
995
            $("#suspendHoldModal").on("hidden.bs.modal", function(){
990
            $("#suspendHoldModal").on("hidden.bs.modal", function(){
996
                $("#suspendHoldTitle").html("");
991
                $("#suspendHoldTitle").html("");
997
                $("#suspendHoldReserveId").val("");
992
                $("#suspendHoldReserveId").val("");
998
- 

Return to bug 29212