Hide Group email preferences from user

From UnionCloud Support
Jump to: navigation, search

If all your student groups use an external tool for emailing members you can hide the checkboxes by using the following code.

1     // Hide the checkboxes allowing users to update their email preferences for groups they are members of
2 	$(function() {
3 		if (window.location.pathname == '/user_groups/my_subscriptions') {
4 			$('#myaccount-information .tableHeaderRow div.col-12:contains("Receive Emails")').remove();
5 			$('input[name=is_subscribed]').parent().parent().remove();
6 		}
7 	});

Note You should still allow users to give their email preferences, but if this is already provided by the external tool this option removes the confusion.