From 7d35baddd407f12c59681ba0c39cc699c4ef7409 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Fri, 24 Apr 2020 09:47:25 +0200 Subject: [PATCH] do not ask for confirmation when enable/disable alias --- app/dashboard/templates/dashboard/index.html | 21 +------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index dd8b36b4..8c1f215b 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -379,26 +379,7 @@ }); $(".custom-switch-input").change(function (e) { - var message = ""; - let alias = $(this).parent().find(".alias").val(); - - if (e.target.checked) { - message = `After this, you will start receiving email sent to ${alias}, please confirm.`; - } else { - message = `After this, you will stop receiving email sent to ${alias}, please confirm.`; - } - - notie.confirm({ - text: message, - cancelCallback: () => { - // reset to the original value - var oldValue = !$(this).prop("checked"); - $(this).prop("checked", oldValue); - }, - submitCallback: () => { - $(this).closest("form").submit(); - } - }); + $(this).closest("form").submit(); }) {% endblock %}