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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt (-6 / +3 lines)
Lines 1-5 Link Here
1
[% USE AuthorisedValues %]
1
[% USE AuthorisedValues %]
2
[% USE raw %]
2
[% USE raw %]
3
[% USE Asset %]
3
[% PROCESS 'i18n.inc' %]
4
[% PROCESS 'i18n.inc' %]
4
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
Lines 187-193 Link Here
187
                                    </td>
188
                                    </td>
188
                                <td class="actions">
189
                                <td class="actions">
189
                                    <a class="btn btn-default btn-xs" href="?op=add_form&amp;field_id=[% field.id | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
190
                                    <a class="btn btn-default btn-xs" href="?op=add_form&amp;field_id=[% field.id | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
190
                                    <a class="confirmdelete btn btn-default btn-xs" href="?op=delete&amp;field_id=[% field.id | uri %]&amp;tablename=[% tablename | uri %]"><i class="fa fa-trash-can"></i> Delete</a>
191
                                    <a class="submit-form-link btn btn-default btn-xs" href="#" data-action="additional-fields.pl" data-method="post" data-op="cud-delete" data-field_id="[% field.id | html %]" data-tablename="[% tablename | html %]" data-confirmation-msg="[% t('Are you sure you want to delete this field?') | html %]"><i class="fa fa-trash-can"></i> Delete</a>
191
                                </td>
192
                                </td>
192
                            </tr>
193
                            </tr>
193
                        [% END %]
194
                        [% END %]
Lines 287-292 Link Here
287
288
288
[% MACRO jsinclude BLOCK %]
289
[% MACRO jsinclude BLOCK %]
289
    [% INCLUDE "datatables.inc" %]
290
    [% INCLUDE "datatables.inc" %]
291
    [% Asset.js("js/form-submit.js") | $raw %]
290
    <script>
292
    <script>
291
        $(document).ready(function(){
293
        $(document).ready(function(){
292
            $('#selecttable').find(":submit").hide();
294
            $('#selecttable').find(":submit").hide();
Lines 303-312 Link Here
303
                "order": [[ 0, "asc" ]],
305
                "order": [[ 0, "asc" ]],
304
            }));
306
            }));
305
307
306
            $(".confirmdelete").click(function(){
307
                return confirm(_("Are you sure you want to delete this field?"));
308
            });
309
310
            $("#add_field").on('submit', function() {
308
            $("#add_field").on('submit', function() {
311
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
309
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
312
                    if ( $("#marcfield").val().length > 0
310
                    if ( $("#marcfield").val().length > 0
313
- 

Return to bug 38309