forms.py 1.4 KB

12345678910111213141516171819202122232425
  1. from django import forms
  2. from django.utils.translation import ugettext_lazy as _
  3. from misago.timezones import tzlist
  4. from misago.forms import Form
  5. class UserForumOptionsForm(Form):
  6. newsletters = forms.BooleanField(required=False)
  7. timezone = forms.ChoiceField(choices=tzlist())
  8. hide_activity = forms.ChoiceField(choices=(
  9. (0, _("Show my presence to everyone")),
  10. (1, _("Show my presence to people I follow")),
  11. (2, _("Show my presence to nobody")),
  12. ))
  13. layout = (
  14. (
  15. _("Forum Options"),
  16. (
  17. ('hide_activity', {'label': _("Your Visibility"), 'help_text': _("If you want to, you can limit other members ability to track your presence on forums.")}),
  18. ('timezone', {'label': _("Your Current Timezone"), 'help_text': _("If dates and hours displayed by forums are inaccurate, you can fix it by adjusting timezone setting.")}),
  19. ('newsletters', {'label': _("Newsletters"), 'help_text': _("On occasion board administrator may want to send e-mail message to multiple members."), 'inline': _("Yes, I want to subscribe forum newsletter")}),
  20. )
  21. ),
  22. )