Bugzilla – Attachment 114434 Details for
Bug 27250
DELETE calls are stacked on the SMTP servers admin page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27250: Prevent DELETE to be called several times on SMTP servers admin page
Bug-27250-Prevent-DELETE-to-be-called-several-time.patch (text/plain), 1.54 KB, created by
Jonathan Druart
on 2020-12-16 12:41:16 UTC
(
hide
)
Description:
Bug 27250: Prevent DELETE to be called several times on SMTP servers admin page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-12-16 12:41:16 UTC
Size:
1.54 KB
patch
obsolete
>From 949d646b3bdcf15e9423caca818c5acf3bc7fdc2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Dec 2020 13:40:26 +0100 >Subject: [PATCH] Bug 27250: Prevent DELETE to be called several times on SMTP > servers admin page > >The on click event is not replaced but added. We must unbind it before >adding the second one > >To recreate: >Create at least 2 SMTP servers >Click "Delete" for server 1 >=> You get a successful message (OK) >Click "Delete" for server 2 >=> You get a successful message (OK) >=> You get also an alert message about server 1 (KO) > >The DELETE route is called twice (one per Delete button you clicked) >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >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 66975366db..5d95faff4e 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 >@@ -367,7 +367,7 @@ SMTP servers > _("You are about to delete the '%s' SMTP server.").format(smtp_server_name) > ); > >- $("#delete_confirm_modal_button").on( "click", function () { >+ $("#delete_confirm_modal_button").unbind("click").on( "click", function () { > $.ajax({ > method: "DELETE", > url: "/api/v1/config/smtp_servers/"+smtp_server_id >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27250
:
114434
|
114480
|
114484
|
114569