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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-12 / +23 lines)
Lines 118-132 Link Here
118
            <!-- Modal to print patron cards -->
118
            <!-- Modal to print patron cards -->
119
            <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
119
            <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
120
                <div class="modal-dialog">
120
                <div class="modal-dialog">
121
                <div class="modal-content">
121
                    <div class="modal-content">
122
                <div class="modal-header">
122
                        <div class="modal-header">
123
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">&times;</button>
123
                            <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">&times;</button>
124
                    <h3 id="patronExportModal_label">Print patron cards</h3>
124
                            <h3 id="patronExportModal_label">Print patron cards</h3>
125
                </div>
125
                        </div>
126
                <div class="modal-body">
126
                        <div class="modal-body">
127
                    <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
127
                            <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
128
                </div>
128
                        </div>
129
                </div>
129
                    </div>
130
                </div>
130
                </div>
131
            </div>
131
            </div>
132
132
Lines 203-213 Link Here
203
203
204
            patronExportModal.on("submit", "#exportingf", function(e){
204
            patronExportModal.on("submit", "#exportingf", function(e){
205
                e.preventDefault();
205
                e.preventDefault();
206
                modal_body = patronExportModalBody;
206
                var modal_body = patronExportModalBody;
207
                modal_body.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
207
                modal_body.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
208
                target_url = $(this).attr("action");
208
                target_url = $(this).attr("action");
209
                params =  $( this ).serialize();
209
                params =  $( this ).serialize();
210
                $("#patronExportModal .modal-body").load( target_url + "?" + params + " #export_patron_list");
210
                $.ajax({
211
                    url: target_url,
212
                    type: "POST",
213
                    data: params,
214
                    success: function(response) {
215
                        // Extract and load the #export_patron_list part of the response into the modal body
216
                        var html = $(response).find("#export_patron_list").html();
217
                        modal_body.html(html);
218
                    },
219
                    error: function() {
220
                        modal_body.html("<div class='error'>An error occurred while processing the request.</div>");
221
                    }
222
                });
211
            });
223
            });
212
224
213
            patronExportModal.on("click",".closebtn,.gb-close",function(e){
225
            patronExportModal.on("click",".closebtn,.gb-close",function(e){
214
- 

Return to bug 37205