diff --git a/var/www/modules/terms/Flask_terms.py b/var/www/modules/terms/Flask_terms.py index d1a067da..e6bb9fbc 100644 --- a/var/www/modules/terms/Flask_terms.py +++ b/var/www/modules/terms/Flask_terms.py @@ -10,7 +10,7 @@ import redis import datetime import calendar import flask -from flask import Flask, render_template, jsonify, request, Blueprint +from flask import Flask, render_template, jsonify, request, Blueprint, url_for, redirect import re import Paste from pprint import pprint @@ -440,6 +440,18 @@ def terms_management_action(): to_return["term"] = term return jsonify(to_return) +@terms.route("/terms_management/delete_terms_tags", methods=['POST']) +def delete_terms_tags(): + term = request.form.get('term') + tags_to_delete = request.form.getlist('tags_to_delete') + + if term is not None and tags_to_delete is not None: + for tag in tags_to_delete: + r_serv_term.srem(TrackedTermsNotificationTagsPrefix_Name + term, tag) + return redirect(url_for('terms.terms_management')) + else: + return 'None args', 400 + @terms.route("/terms_management/delete_terms_email", methods=['GET']) def delete_terms_email(): term = request.args.get('term') diff --git a/var/www/modules/terms/templates/terms_management.html b/var/www/modules/terms/templates/terms_management.html index 6acc5735..29bbfad5 100644 --- a/var/www/modules/terms/templates/terms_management.html +++ b/var/www/modules/terms/templates/terms_management.html @@ -39,6 +39,9 @@ .mouse_pointer{ cursor: pointer; } + .lb-md { + font-size: 16px; + } @@ -77,6 +80,7 @@
+ {% set uniq_id = 0 %}
{{ trackSet_list_values[loop.index0][3] }} @@ -163,6 +208,47 @@ {{ tag }} {% endfor %} + {% if notificationTagsTermMapping[regex] %} + + + + {% set uniq_id = uniq_id + 1 %} + {% endif %}
{{ trackReg_list_values[loop.index0][3] }} @@ -195,6 +281,47 @@ {{ tag }} {% endfor %} + {% if notificationTagsTermMapping[term] %} + + + + {% set uniq_id = uniq_id + 1 %} + {% endif %}
{{ track_list_values[loop.index0][3] }}