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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-22 / +28 lines)
Lines 148-175 Link Here
148
                                            <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>
148
                                            <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>
149
                                            [% # hold suspend modal form %]
149
                                            [% # hold suspend modal form %]
150
                                            <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">
150
                                            <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">
151
                                                <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
151
                                                <div class="modal-dialog">
152
                                                    <div class="modal-header">
152
                                                    <div class="modal-content">
153
                                                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
153
                                                        <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
154
                                                        [% IF HOLD.suspend %]
154
                                                            <div class="modal-header">
155
                                                            <h3 id="suspendModal[% HOLD.reserve_id | html %]Label">Resume your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
155
                                                                [% IF HOLD.suspend %]
156
                                                        [% ELSE %]
156
                                                                    <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Resume your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
157
                                                            <h3 id="suspendModal[% HOLD.reserve_id | html %]Label">Suspend your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
157
                                                                [% ELSE %]
158
                                                        [% END %]
158
                                                                    <h3 class="modal-title" id="suspendModal[% HOLD.reserve_id | html %]Label">Suspend your hold on <em>[% HOLD.biblio.title | html %]</em></h3>
159
                                                    </div>
159
                                                                [% END %]
160
                                                    <div class="modal-body">
160
                                                                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
161
                                                        <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
161
                                                                    <span aria-hidden="true">x</span>
162
                                                        <label for="suspend_until_[% HOLD.reserve_id | html %]">Suspend until:</label>
162
                                                                </button>
163
                                                        <input type="text" name="suspend_until" id="suspend_until_[% HOLD.reserve_id | html %]" class="suspend-until" size="10" />
163
                                                            </div>
164
                                                        [% INCLUDE 'date-format.inc' %]
164
                                                            <div class="modal-body">
165
                                                        <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>
165
                                                                <input type="hidden" name="reserve_id" value="[% HOLD.reserve_id | html %]" />
166
                                                        <button class="btn btn-mini js-hide" type="submit" name="submit">Suspend</button>
166
                                                                <label for="suspend_until_[% HOLD.reserve_id | html %]">Suspend until:</label>
167
                                                    </div>
167
                                                                <input type="text" name="suspend_until" id="suspend_until_[% HOLD.reserve_id | html %]" class="suspend-until" size="10" />
168
                                                    <div class="modal-footer">
168
                                                                [% INCLUDE 'date-format.inc' %]
169
                                                        <button class="btn btn-primary" type="submit" name="submit">Suspend</button>
169
                                                                <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>
170
                                                        <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
170
                                                                <button class="btn btn-primary btn-sm js-hide" type="submit" name="submit">Suspend</button>
171
                                                    </div>
171
                                                            </div>
172
                                                </form>
172
                                                            <div class="modal-footer">
173
                                                                <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
174
                                                                <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
175
                                                            </div>
176
                                                        </form>
177
                                                    </div> <!-- /.modal-content -->
178
                                                </div> <!-- /.modal-dialog -->
173
                                            </div>  <!-- /#suspendModal[% HOLD.reserve_id | html %] -->
179
                                            </div>  <!-- /#suspendModal[% HOLD.reserve_id | html %] -->
174
                                        [% ELSE %]
180
                                        [% ELSE %]
175
                                            <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
181
                                            <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-1 / +15 lines)
Lines 967-973 Link Here
967
                });
967
                });
968
            [% END %]
968
            [% END %]
969
969
970
            $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
970
            $(".suspend-until").datepicker({
971
                beforeShow: function(input, inst) {
972
                    // https://stackoverflow.com/questions/662220/how-to-change-the-pop-up-position-of-the-jquery-datepicker-control#answer-10598178
973
                    var calendar = inst.dpDiv;
974
                    setTimeout(function() {
975
                        calendar.position({
976
                            my: 'left top',
977
                            at: 'left bottom',
978
                            collision: 'none',
979
                            of: input
980
                        });
981
                    }, 1);
982
                },
983
                minDate: 1
984
            });
971
985
972
            if ( $('#opac-user-clubs').length ) {
986
            if ( $('#opac-user-clubs').length ) {
973
                $('#opac-user-clubs-tab-link').on('click', function() {
987
                $('#opac-user-clubs-tab-link').on('click', function() {
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/global.js (-2 / +1 lines)
Lines 90-96 function confirmModal(message, title, yes_label, no_label, callback) { Link Here
90
                    <div class="modal-body"><p></p></div>\
90
                    <div class="modal-body"><p></p></div>\
91
                    <div class="modal-footer">\
91
                    <div class="modal-footer">\
92
                        <a href="#" id="bootstrap-confirm-box-modal-submit" class="btn btn-danger"><i class="fa fa-check" aria-hidden="true"></i></a>\
92
                        <a href="#" id="bootstrap-confirm-box-modal-submit" class="btn btn-danger"><i class="fa fa-check" aria-hidden="true"></i></a>\
93
                        <a href="#" id="bootstrap-confirm-box-modal-cancel" data-dismiss="modal" class="btn btn-default"><i class="fa fa-remove" aria-hidden="true"></i></a>\
93
                        <a href="#" id="bootstrap-confirm-box-modal-cancel" data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i></a>\
94
                    </div>\
94
                    </div>\
95
                </div>\
95
                </div>\
96
            </div>\
96
            </div>\
97
- 

Return to bug 26505