diff --git a/myriad/manage.py b/myriad/manage.py index 48d63c3..7462419 100644 --- a/myriad/manage.py +++ b/myriad/manage.py @@ -271,4 +271,15 @@ def group_edit(gid): db.execute("UPDATE groups SET group_name=(?), group_description=(?), public=(?) WHERE id=(?)",(name, desc, privacy, gid)) db.commit() + return redirect(url_for("manage.groups")) + +@bp.route("/group_delete/") +@login_required +def group_delete(gid): + db = get_db() + + db.execute("DELETE FROM groups WHERE id=(?)",(gid,)) + db.execute("DELETE FROM group_members WHERE group_id=(?)",(gid,)) + db.commit() + return redirect(url_for("manage.groups")) \ No newline at end of file diff --git a/myriad/templates/manage/groups.html b/myriad/templates/manage/groups.html index c8c16c0..5b7c774 100644 --- a/myriad/templates/manage/groups.html +++ b/myriad/templates/manage/groups.html @@ -6,7 +6,7 @@ {% block content %} -
Create new group
+
Create new group

@@ -16,6 +16,8 @@
Edit Groups
+ Group privacy settings do not affect members contained within the groups
+ Deleting a group does not delete any members who are part of that group {% for group in groups %}
@@ -28,7 +30,7 @@
- Delete group - WARNING: this action is permanent and irreversible. this will not delete any members contained within the group. + Delete group - WARNING: this action is permanent and irreversible
{% endfor %}