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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt (-16 / +19 lines)
Lines 328-348 Link Here
328
    [% Asset.js("js/admin-menu.js") | $raw %]
328
    [% Asset.js("js/admin-menu.js") | $raw %]
329
    [% INCLUDE 'datatables.inc' %]
329
    [% INCLUDE 'datatables.inc' %]
330
    <script>
330
    <script>
331
        $(document).ready(function() {
331
        var identity_provider_domains_url = '/api/v1/auth/identity_providers/[%- identity_provider_id | html -%]/domains';
332
        [% SET categories = Categories.all() %]
333
        var categories = {
334
        [% FOREACH category IN categories %]
335
            "[% category.categorycode | html %]": "[% category.description | html %]",
336
        [% END %]
337
        };
338
        [% SET libraries = Branches.all() %]
339
        var libraries = {
340
        [% FOREACH library IN libraries %]
341
            "[% library.branchcode | html %]": "[% library.branchname | html %]",
342
        [% END %]
343
        };
332
344
333
            var identity_provider_domains_url = '/api/v1/auth/identity_providers/[%- identity_provider_id | html -%]/domains';
345
        const identity_provider_id = "[%- identity_provider_id | html -%]";
334
            [% SET categories = Categories.all() %]
346
    </script>
335
            var categories = {
347
336
            [% FOREACH category IN categories %]
348
    <script>
337
                "[% category.categorycode | html %]": "[% category.description | html %]",
349
        $(document).ready(function() {
338
            [% END %]
339
            };
340
            [% SET libraries = Branches.all() %]
341
            var libraries = {
342
            [% FOREACH library IN libraries %]
343
                "[% library.branchcode | html %]": "[% library.branchname | html %]",
344
            [% END %]
345
            };
346
            window.identity_provider_domains = $("#identity_provider_domains").kohaTable({
350
            window.identity_provider_domains = $("#identity_provider_domains").kohaTable({
347
                ajax: {
351
                ajax: {
348
                    "url": identity_provider_domains_url
352
                    "url": identity_provider_domains_url
Lines 449-455 Link Here
449
                    },
453
                    },
450
                    {
454
                    {
451
                        data: function( row, type, val, meta ) {
455
                        data: function( row, type, val, meta ) {
452
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&amp;identity_provider_id=[%- identity_provider_id | html -%]&amp;op=edit_form&amp;identity_provider_domain_id='+ encodeURIComponent(row.identity_provider_domain_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
456
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&amp;identity_provider_id=' + identity_provider_id + '&amp;op=edit_form&amp;identity_provider_domain_id='+ encodeURIComponent(row.identity_provider_domain_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
453
                            result += '<a class="btn btn-default btn-xs delete_identity_provider_domain" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.identity_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
457
                            result += '<a class="btn btn-default btn-xs delete_identity_provider_domain" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.identity_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
454
                            return result;
458
                            return result;
455
                        },
459
                        },
456
- 

Return to bug 41564