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 865-870 Link Here
865
    </div> <!-- /.container-fluid -->
865
    </div> <!-- /.container-fluid -->
866
</div> <!-- /#main -->
866
</div> <!-- /#main -->
867
867
868
[% # hold suspend modal form %]
869
<div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
870
    <div class="modal-dialog">
871
        <div class="modal-content">
872
            <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
873
                <div class="modal-header">
874
                    [% IF HOLD.suspend %]
875
                        <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
876
                    [% ELSE %]
877
                        <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
878
                    [% END %]
879
                    <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
880
                        <span aria-hidden="true">x</span>
881
                    </button>
882
                </div>
883
                <div class="modal-body">
884
                    <h6 id="suspendHoldTitle"></h6>
885
                    <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
886
                    <label for="suspend_untilDate">Suspend until:</label>
887
                    <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
888
                    [% INCLUDE 'date-format.inc' %]
889
                    <p><a href="#" id="suspend-modal-clear-date">Clear date to suspend indefinitely</a></p>
890
                </div>
891
                <div class="modal-footer">
892
                    <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
893
                    <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
894
                </div>
895
            </form>
896
        </div> <!-- /.modal-content -->
897
    </div> <!-- /.modal-dialog -->
898
</div>  <!-- /#suspendModal -->
899
868
[% IF ( OverDriveCirculation ) %]
900
[% IF ( OverDriveCirculation ) %]
869
    [% INCLUDE 'overdrive-checkout.inc' %]
901
    [% INCLUDE 'overdrive-checkout.inc' %]
870
    [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
902
    [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
Lines 941-946 Link Here
941
                })($(this))
973
                })($(this))
942
            });
974
            });
943
975
976
            /* We initiate this flatpickr instance here so that we can use the variable later */
977
            var suspend_until_date = $("#suspend_untilDate").flatpickr({
978
                minDate: "today"
979
            });
980
981
            $(".suspend_hold").on("click", function(e){
982
                e.preventDefault();
983
                var title = $(this).data("title");
984
                var reserve_id = $(this).data("reserve_id");
985
                $("#suspendHoldReserveId").val( reserve_id );
986
                $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
987
                $("#suspendHoldModal").modal("show");
988
            });
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(){
996
                $("#suspendHoldTitle").html("");
997
                $("#suspendHoldReserveId").val("");
998
                suspend_until_date.clear();
999
            });
1000
944
            $("#suspend_all_submit").on("click", function(e){
1001
            $("#suspend_all_submit").on("click", function(e){
945
                e.preventDefault();
1002
                e.preventDefault();
946
                var title = _("Are you sure you want to suspend all holds?");
1003
                var title = _("Are you sure you want to suspend all holds?");
947
- 

Return to bug 29212