From 4e906ff841598bbf2d862def41a30caf5367a192 Mon Sep 17 00:00:00 2001
From: Terrtia
Date: Thu, 8 Nov 2018 10:41:37 +0100
Subject: [PATCH] fix: [term_management] delete emails
---
var/www/modules/terms/Flask_terms.py | 2 +-
.../terms/templates/terms_management.html | 26 +++++++++++--------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/var/www/modules/terms/Flask_terms.py b/var/www/modules/terms/Flask_terms.py
index e6bb9fbc..86d67af8 100644
--- a/var/www/modules/terms/Flask_terms.py
+++ b/var/www/modules/terms/Flask_terms.py
@@ -459,7 +459,7 @@ def delete_terms_email():
if term is not None and email is not None:
r_serv_term.srem(TrackedTermsNotificationEmailsPrefix_Name + term, email)
- return 'sucess'
+ return redirect(url_for('terms.terms_management'))
else:
return 'None args', 400
diff --git a/var/www/modules/terms/templates/terms_management.html b/var/www/modules/terms/templates/terms_management.html
index 29bbfad5..b84b7042 100644
--- a/var/www/modules/terms/templates/terms_management.html
+++ b/var/www/modules/terms/templates/terms_management.html
@@ -190,7 +190,11 @@
{% for email in notificationEMailTermMapping[set] %}
-
+
+
+
+
+
{{ email }}
{% endfor %}
@@ -263,7 +267,11 @@
|
{% for email in notificationEMailTermMapping[regex] %}
-
+
+
+
+
+
{{ email }}
{% endfor %}
@@ -336,7 +344,11 @@
|
{% for email in notificationEMailTermMapping[term] %}
-
+
+
+
+
+
{{ email }}
{% endfor %}
@@ -576,12 +588,4 @@ function perform_operation(){
});
}
}
-
-function delete_email(term, email){
- $.get("{{ url_for('terms.delete_terms_email') }}", { term: term, email: email }, function(data, status){
- if(status == "success") {
- window.location.reload(false);
- }
- });
-}
|