The title should say all.
I think it might be a usabilty enhancement if the user didn't has to check the newsletter he wants to subscribe, because there is just one choice. It is obvious that he wants to subscribe the single newsletter available, because otherwise he wouldn't go to the subscription page.

Comments

hydra’s picture

StatusFileSize
new1.49 KB

The patch should do the described feature.
I'm not sure whether it is useful to provide this feature in the subscription block as well.

hydra’s picture

Status: Active » Needs review

statusupdate....

Status: Needs review » Needs work

The last submitted patch, hide_checkbox-1427244-1.patch, failed testing.

berdir’s picture

Title: Hde newsletter category selection checkbox on subscription page if only one is avalible » Hide newsletter category selection checkbox on subscription page if only one is avalible

Interesting idea, but needs work...

- Comments should start with an upper case character.
- Instead of altering the form later on, we should generate it correctly in the first place
- Also needs to work for anonymous users, for which we display a mail address form field instead of displaying the mail address.
- Yes, the multi-checkout block should probably behave in the same way. Maybe we could create an re-use a common function for those two forms.
- As you can see there are quite a lot of tests that currently fail now because they either try to set the newsletter checkbox explicitly or the "Trying to get property of non-object" because it's an anonymous user and there is no global $user.

A possibly simpler approach for now might also be to automatically enable the checkbox by default if it's just a single one or maybe simply respect the default on/off settings properly in all cases...

jcnventura’s picture

Title: Hide newsletter category selection checkbox on subscription page if only one is avalible » Enable single newsletter by default on subscription page
Issue summary: View changes
Status: Needs work » Reviewed & tested by the community
StatusFileSize
new692 bytes

Hi Berdir,

As suggested by you in #4, here is a much simpler solution to automatically enable the checkbox by default in the case of a single newsletter.

I've set it to RTBC, because this is a no-brainer change that is obviously correct, as can be seen by the patch.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: single_newsletter_default_enabled-1427244-5.patch, failed testing.

jcnventura’s picture

Test is broken.. It only uses one random newsletter, and of course by design this patch makes it so that it is always enabled. So the test actually worked, somewhat.