I was excited to see the new "Selected categories" option in the "Allow opt-out" settings, and very pleased to see that it was almost done right (the categories shown are only those that the user is included in by role). However, if the user is included in no categories, the "Mass contact settings" fieldset and description markup is shown with no additional form items. (No options to choose.) This seems out of place. The fieldset should be removed entirely.
The issue is exacerbated on the registration form. Since an anonymous user is -- by definition -- has no additional role, he cannot be included in a category and cannot select any categories for opt-out. Again, the fieldset should not be displayed.
Alternatively, a different description could be displayed when no matching categories exist.
At the moment I'm using String Overrides module to change
- the fieldset legend to "Subscription preferences"
- the description to "You may opt-out of receiving messages in certain categories; those categories, if any apply to you, appear below. Your automated notifications preferences (for new products, site news, etc.) will not be affected. This also does not affect account-related messages sent to you by the system." [I'm using the Notifications module as well.]
- individual opt-outs to "Opt-out of %category messages"
I'm also only allowing users to opt-out in their account settings, so as not to display the empty fieldset.
Comments
Comment #1
oadaeh commentedI fixed this for the 5.x version here: http://drupal.org/cvs?commit=433674 and the 6.x version here: http://drupal.org/cvs?commit=433672.