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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-15 / +5 lines)
Lines 124-130 Link Here
124
                                <a class="btn btn-default" id="additems" href="#"><i class="fa fa-plus"></i> Add item(s)</a>[% IF ( table_loop ) %]
124
                                <a class="btn btn-default" id="additems" href="#"><i class="fa fa-plus"></i> Add item(s)</a>[% IF ( table_loop ) %]
125
                                <a class="btn btn-default" id="savedesc" href="#" data-batch_id="[% batch_id | html %]"><i class="fa fa-save"></i> Save description</a>
125
                                <a class="btn btn-default" id="savedesc" href="#" data-batch_id="[% batch_id | html %]"><i class="fa fa-save"></i> Save description</a>
126
                                <a class="btn btn-default" id="removeitems" href="#"><i class="fa fa-trash-can"></i> Remove selected items</a>
126
                                <a class="btn btn-default" id="removeitems" href="#"><i class="fa fa-trash-can"></i> Remove selected items</a>
127
                                <a class="btn btn-default" id="deletebatch" href="#"><i class="fa fa-minus-square"></i> Delete batch</a>
127
128
                                <a class="btn btn-default submit-form-link" id="deletebatch" href="#" data-op="cud-delete" data-label_element="batch" data-element_id="[% batch_id | html %]" data-action="/cgi-bin/koha/labels/label-manage.pl" data-method="post" data-confirmation-msg="[% tx("Are you sure you want to delete batch {batch_number}?", { batch_number = batch_id }) %]"><i class="fa fa-minus-square"></i> Delete batch</a>
129
128
                                <a class="btn btn-default" id="deduplicate" href="#"><i class="fa fa-minus"></i> Remove duplicates</a>
130
                                <a class="btn btn-default" id="deduplicate" href="#"><i class="fa fa-minus"></i> Remove duplicates</a>
129
                                <a class="btn btn-default" id="exportitems" href="#"><i class="fa-solid fa-share-from-square"></i> Export selected items</a>
131
                                <a class="btn btn-default" id="exportitems" href="#"><i class="fa-solid fa-share-from-square"></i> Export selected items</a>
130
                                <a class="btn btn-default" id="exportbatch" href="#"><i class="fa-solid fa-share-from-square"></i> Export full batch</a>[% END %]
132
                                <a class="btn btn-default" id="exportbatch" href="#"><i class="fa-solid fa-share-from-square"></i> Export full batch</a>[% END %]
Lines 206-222 Link Here
206
[% MACRO jsinclude BLOCK %]
208
[% MACRO jsinclude BLOCK %]
207
    [% INCLUDE 'greybox.inc' %]
209
    [% INCLUDE 'greybox.inc' %]
208
    [% INCLUDE 'datatables.inc' %]
210
    [% INCLUDE 'datatables.inc' %]
211
    [% Asset.js("js/form-submit.js") | $raw %]
209
    <script>
212
    <script>
210
        function DeleteConfirm() {
211
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id | html %]");
212
            var answer = confirm(msg);
213
            if (answer) {
214
                window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=batch&amp;element_id=[% batch_id | html %]";
215
            }
216
            else {
217
                return; // abort delete
218
            }
219
        }
220
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
213
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
221
            $(".focus:last").select();
214
            $(".focus:last").select();
222
        }
215
        }
Lines 343-352 Link Here
343
                Remove();
336
                Remove();
344
                return false;
337
                return false;
345
            });
338
            });
346
            $("#deletebatch").click(function(){
339
347
                DeleteConfirm();
348
                return false;
349
            });
350
            $("#deduplicate").click(function(){
340
            $("#deduplicate").click(function(){
351
                DeDuplicate();
341
                DeDuplicate();
352
                return false;
342
                return false;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-2 / +3 lines)
Lines 95-101 Link Here
95
                                                [% IF ( text_field.select_field ) %]
95
                                                [% IF ( text_field.select_field ) %]
96
                                                    <td class="actions">
96
                                                    <td class="actions">
97
                                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit_form&amp;element_id=[% text_field.field_value |url %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
97
                                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit_form&amp;element_id=[% text_field.field_value |url %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
98
                                                        <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element | html %]&amp;element_id=[% text_field.field_value |url %]"><i class="fa fa-trash-can"></i> Delete</a>
98
99
                                                        <a class="btn btn-default btn-xs submit-form-link" href="#" data-label_element="[% label_element | html %]" data-element_id="[% text_field.field_value | html %]" data-action="label-manage.pl" data-method="post" data-op="cud-delete" data-confirmation-msg="[% t('Are you sure you want to delete this?') | html %]"><i class="fa fa-trash-can"></i> Delete</a>
99
                                                    </td>
100
                                                    </td>
100
                                                    [% IF label_element == 'batch' %] <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]" /></td>[% END %]
101
                                                    [% IF label_element == 'batch' %] <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]" /></td>[% END %]
101
                                                [% ELSIF ( text_field.field_value ) %]
102
                                                [% ELSIF ( text_field.field_value ) %]
Lines 134-139 Link Here
134
[% MACRO jsinclude BLOCK %]
135
[% MACRO jsinclude BLOCK %]
135
    [% INCLUDE 'greybox.inc' %]
136
    [% INCLUDE 'greybox.inc' %]
136
    [% INCLUDE 'datatables.inc' %]
137
    [% INCLUDE 'datatables.inc' %]
138
    [% Asset.js("js/form-submit.js") | $raw %]
137
    <script>
139
    <script>
138
        function Xport() {
140
        function Xport() {
139
            batches= new Array;
141
            batches= new Array;
140
- 

Return to bug 37187