From 1a081f87c4aa856035ec090139cc444b01e4541b Mon Sep 17 00:00:00 2001 From: Son NK Date: Sat, 25 Apr 2020 15:28:25 +0200 Subject: [PATCH] Remove "set-note" post form --- app/dashboard/templates/dashboard/index.html | 40 +++++++++----------- app/dashboard/views/index.py | 12 ------ 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index 340cb50e..09fde197 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -248,29 +248,23 @@ {% endif %} -
-
- -
- -
- -
- - - - - Save - -
+
+
+
- + +
+ + Save + +
+
@@ -459,7 +453,7 @@ }); if (res.ok) { - toastr.success(`Saved`); + toastr.success(`Note Saved`); } else { toastr.error("Sorry for the inconvenience! Could you refresh the page & retry please?", "Unknown Error"); // reset to the original value diff --git a/app/dashboard/views/index.py b/app/dashboard/views/index.py index 433e934e..fce041a4 100644 --- a/app/dashboard/views/index.py +++ b/app/dashboard/views/index.py @@ -87,18 +87,6 @@ def index(): LOG.error("alias %s has been added before to DeletedAlias", email) db.session.rollback() - elif request.form.get("form-name") == "set-note": - alias_id = request.form.get("alias-id") - alias: Alias = Alias.get(alias_id) - note = request.form.get("note") - - alias.note = note - db.session.commit() - - flash(f"Update note for alias {alias.email}", "success") - return redirect( - url_for("dashboard.index", highlight_alias_id=alias.id, query=query) - ) elif request.form.get("form-name") == "set-mailbox": alias_id = request.form.get("alias-id")