From 4e3c7582c9429566faa591217c8a22c8c29c59a3 Mon Sep 17 00:00:00 2001 From: Brian Scorcia Date: Wed, 2 Jun 2021 12:48:30 -0400 Subject: [PATCH] #291: Notifications can be enabled or disabled for Users under a project with a 'select all' button in the 'Users' section of the 'Project Details' template --- .../core/project/templates/project/project_detail.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coldfront/core/project/templates/project/project_detail.html b/coldfront/core/project/templates/project/project_detail.html index 89c4e12e7..0b7370b6b 100644 --- a/coldfront/core/project/templates/project/project_detail.html +++ b/coldfront/core/project/templates/project/project_detail.html @@ -97,7 +97,7 @@

Email Role Manager role grants user access to add/remove users, allocations, grants, and publications to the project. Status - Enable Notifications When disabled, user will not receive notifications for allocation requests and expirations or cloud usage (if applicable). + Enable Notifications When disabled, user will not receive notifications for allocation requests and expirations or cloud usage (if applicable). Actions @@ -440,6 +440,10 @@

Messages fr }] }); + $("#selectAll").click(function () { + $("input[id^='email_notifications_for_user_id_']").not(":disabled").prop('checked', $(this).prop('checked')).change(); + }); + $("[id^=email_notifications_for_user_id_]").change(function() { var checked = $(this).prop('checked'); var user_project_id = Number($(this).attr('id').split("_").pop()); @@ -462,4 +466,4 @@

Messages fr }); }); -{% endblock %} +{% endblock %} \ No newline at end of file