From e51a4aaa5a6d8c119b45e21c2ad67c04bf44ca68 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 27 Jan 2023 06:56:42 -0500 Subject: [PATCH] Bug 27424: (QA follow-up) Add confirmation if (un)checking the default smtp server checkbox --- .../prog/en/modules/admin/smtp_servers.tt | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt index 810e72253c..c1cadeb7d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt @@ -310,6 +310,24 @@ + + @@ -441,6 +459,18 @@ $("#delete_confirm_modal_button").data('smtp-server-name', smtp_server_name); }); + $('#smtp_default').on( "click", function () { + $("#default_confirm_modal").show(); + }); + $('.default_confirm_modal_yes').on( "click", function () { + $("#smtp_default").prop('checked', true); + $("#default_confirm_modal").hide(); + }); + $('.default_confirm_modal_no').on( "click", function () { + $("#smtp_default").prop('checked', false); + $("#default_confirm_modal").hide(); + }); + $("#delete_confirm_modal_button").on( "click", function () { var smtp_server_id = $(this).data('smtp-server-id'); -- 2.30.2