From 7bbd5de3e31c6612cb02f57c9f2e003ecb96d402 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 Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/smtp_servers.tt | 29 +++++++++++++++++++ 1 file changed, 29 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..c48d1bdc00 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,17 @@ $("#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 () { + $("#default_confirm_modal").hide(); + }); + $('.default_confirm_modal_no').on( "click", function () { + $("#smtp_default").prop('checked', !$("#smtp_default").prop('checked') ); + $("#default_confirm_modal").hide(); + }); + $("#delete_confirm_modal_button").on( "click", function () { var smtp_server_id = $(this).data('smtp-server-id'); -- 2.39.5