From eb7d288a66133bd3811cd4654f027bfaefee3c57 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 18 May 2026 14:08:53 -0400 Subject: [PATCH] Bug 42638: Cannot delete an identity provider domain This patch updates the identity provider domain page so that clicking the "Delete" button from the list of existing identity providers works correctly. There's a lot of unfinished copy and paste from the SMTP servers page, including a missing chuck of modal dialog HTML. To test, apply the patch and go to Administration -> Identity providers. - If necessary, add at least one identity provider. - Click the "Manage domains" button for an identity provider. - If necessary, add at least one identity provider domain. - Click the delete button corresponding to the domain you added. - A confirmation modal should appear. - Clicking "Close" should close the modal without triggering any action. - Clicking "Delete" should delete the domain. Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny Signed-off-by: Laura_Escamilla Signed-off-by: Lucas Gass (cherry picked from commit 6572a5aec0da9ccb239e70e1340d8e66836a562c) Signed-off-by: Jacob O'Mara --- .../admin/identity_provider_domains.tt | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt index f890eadcb7..23d77ab2b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt @@ -321,6 +321,27 @@ + + + [% END %] [% END %] @@ -450,7 +471,7 @@ { data: function( row, type, val, meta ) { var result = ' '+_("Edit")+''+"\n"; - result += ' '+_("Delete")+''; + result += ' '+_("Delete")+''; return result; }, searchable: false, @@ -473,6 +494,7 @@ ); $("#delete_confirm_modal_button").data('auth-provider-domain-id', identity_provider_domain_id); $("#delete_confirm_modal_button").data('auth-provider-domain', identity_provider_domain); + $("#delete_confirm_modal").modal('show'); }); $("#delete_confirm_modal_button").on( "click", function () { @@ -485,11 +507,11 @@ url: identity_provider_domains_url+"/"+identity_provider_domain_id }).success(function() { window.identity_provider_domains.api().ajax.reload(function (data) { - $("#smtp_action_result_dialog").hide(); - $("#smtp_delete_success").html(_("Server '%s' deleted successfully.").format(identity_provider_domain)).show(); + $("#identity_provider_domain_action_result_dialog").hide(); + $("#identity_provider_domain_delete_success").html(_("Domain '%s' deleted successfully.").format(identity_provider_domain)).show(); }); }).fail(function () { - $("#smtp_delete_error").html(_("Error deleting server '%s'. Check the logs for details.").format(identity_provider_domain)).show(); + $("#smtp_delete_error").html(_("Error deleting domain '%s'. Check the logs for details.").format(identity_provider_domain)).show(); }).done(function () { $("#delete_confirm_modal").modal('hide'); });