Hide Group email preferences from user
From UnionCloud Support
Revision as of 15:26, 12 July 2017 by Liammcdaid (talk | contribs) (Created page with "If all your student groups use an external tool for emailing members you can hide the checkboxes by using the following code. <syntaxhighlight lang="javascript" line='line'>...")
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.