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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-32 / +1 lines)
Lines 138-175 Link Here
138
                                        </form>
138
                                        </form>
139
                                    [% ELSE %]
139
                                    [% ELSE %]
140
                                        [% IF AutoResumeSuspendedHolds %]
140
                                        [% IF AutoResumeSuspendedHolds %]
141
                                            <a class="btn btn-link js-show" href="#suspendModal[% HOLD.reserve_id | html %]" role="button" data-toggle="modal"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</a>
141
                                            <a class="btn btn-link suspend_hold js-show" href="#" role="button" data-title="[% HOLD.biblio.title | html %] [% FOREACH subtitle IN HOLD.biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %][% subtitle | html %][% END %]" data-reserve_id="[% HOLD.reserve_id | html %]"><i class="fa fa-pause" aria-hidden="true"></i> Suspend</a>
142
                                            [% # hold suspend modal form %]
143
                                            <div id="suspendModal[% HOLD.reserve_id | html %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% HOLD.reserve_id | html %]Label" aria-hidden="true">
144
                                                <div class="modal-dialog">
145
                                                    <div class="modal-content">
146
                                                        <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
147
                                                            <div class="modal-header">
148
                                                                [% IF HOLD.suspend %]
149
                                                                    <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Resume your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
150
                                                                [% ELSE %]
151
                                                                    <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Suspend your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
152
                                                                [% END %]
153
                                                                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
154
                                                                    <span aria-hidden="true">x</span>
155
                                                                </button>
156
                                                            </div>
157
                                                            <div class="modal-body">
158
                                                                <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
159
                                                                <label for="suspend_until_[% HOLD.reserve_id | html %]">Suspend until:</label>
160
                                                                <input type="text" name="suspend_until" id="suspend_until_[% HOLD.reserve_id | html %]" class="suspend-until flatpickr futuredate" size="10" />
161
                                                                [% INCLUDE 'date-format.inc' %]
162
                                                                <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% HOLD.reserve_id | html %]').value='';return false;">Clear date to suspend indefinitely</a></p>
163
                                                                <button class="btn btn-primary btn-sm js-hide" type="submit" name="submit">Suspend</button>
164
                                                            </div>
165
                                                            <div class="modal-footer">
166
                                                                <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
167
                                                                <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
168
                                                            </div>
169
                                                        </form>
170
                                                    </div> <!-- /.modal-content -->
171
                                                </div> <!-- /.modal-dialog -->
172
                                            </div>  <!-- /#suspendModal[% HOLD.reserve_id | html %] -->
173
                                        [% ELSE %]
142
                                        [% ELSE %]
174
                                            <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
143
                                            <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
175
                                                <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
144
                                                <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-1 / +57 lines)
Lines 874-879 Link Here
874
    </div> <!-- /.container-fluid -->
874
    </div> <!-- /.container-fluid -->
875
</div> <!-- /#main -->
875
</div> <!-- /#main -->
876
876
877
[% # hold suspend modal form %]
878
<div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
879
    <div class="modal-dialog">
880
        <div class="modal-content">
881
            <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
882
                <div class="modal-header">
883
                    [% IF HOLD.suspend %]
884
                        <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
885
                    [% ELSE %]
886
                        <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
887
                    [% END %]
888
                    <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
889
                        <span aria-hidden="true">x</span>
890
                    </button>
891
                </div>
892
                <div class="modal-body">
893
                    <h6 id="suspendHoldTitle"></h6>
894
                    <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
895
                    <label for="suspend_untilDate">Suspend until:</label>
896
                    <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
897
                    [% INCLUDE 'date-format.inc' %]
898
                    <p><a href="#" id="suspend-modal-clear-date">Clear date to suspend indefinitely</a></p>
899
                </div>
900
                <div class="modal-footer">
901
                    <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
902
                    <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
903
                </div>
904
            </form>
905
        </div> <!-- /.modal-content -->
906
    </div> <!-- /.modal-dialog -->
907
</div>  <!-- /#suspendModal -->
908
877
[% IF ( OverDriveCirculation ) %]
909
[% IF ( OverDriveCirculation ) %]
878
    [% INCLUDE 'overdrive-checkout.inc' %]
910
    [% INCLUDE 'overdrive-checkout.inc' %]
879
    [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
911
    [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
Lines 950-955 Link Here
950
                })($(this))
982
                })($(this))
951
            });
983
            });
952
984
985
            /* We initiate this flatpickr instance here so that we can use the variable later */
986
            var suspend_until_date = $("#suspend_untilDate").flatpickr({
987
                minDate: "today"
988
            });
989
990
            $(".suspend_hold").on("click", function(e){
991
                e.preventDefault();
992
                var title = $(this).data("title");
993
                var reserve_id = $(this).data("reserve_id");
994
                $("#suspendHoldReserveId").val( reserve_id );
995
                $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
996
                $("#suspendHoldModal").modal("show");
997
            });
998
999
            $("#suspend-modal-clear-date").on( "click", function(e) {
1000
                e.preventDefault();
1001
                suspend_until_date.clear();
1002
            });
1003
1004
            $("#suspendHoldModal").on("hidden.bs.modal", function(){
1005
                $("#suspendHoldTitle").html("");
1006
                $("#suspendHoldReserveId").val("");
1007
                suspend_until_date.clear();
1008
            });
1009
953
            $("#suspend_all_submit").on("click", function(e){
1010
            $("#suspend_all_submit").on("click", function(e){
954
                e.preventDefault();
1011
                e.preventDefault();
955
                var title = _("Are you sure you want to suspend all holds?");
1012
                var title = _("Are you sure you want to suspend all holds?");
956
- 

Return to bug 29212