diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 8687e5b..374dfd4 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -219,6 +219,24 @@ for address in user_emails) +class ListAnonymousSubscribe(forms.Form): + """Form fields to join an existing list as an anonymous user. + """ + + email = forms.CharField( + label=_('Your email address'), + validators=[validate_email], + error_messages={ + 'required': _('Please enter an email address.'), + 'invalid': _('Please enter a valid email address.')}) + + display_name = forms.CharField( + label=_('Your name (optional)'), required=False) + + def __init__(self, *args, **kwargs): + super(ListAnonymousSubscribe, self).__init__(*args, **kwargs) + + class ListSettingsForm(forms.Form): """ Base class for list settings forms. diff --git a/src/postorius/templates/postorius/lists/summary.html b/src/postorius/templates/postorius/lists/summary.html index 6dc2a77..f964d0f 100644 --- a/src/postorius/templates/postorius/lists/summary.html +++ b/src/postorius/templates/postorius/lists/summary.html @@ -70,8 +70,23 @@ {% endif %} {% else %} -
{% trans 'If you want to subscribe to this list, you have to log in first.' %}
+{% trans 'If you want to subscribe to this list and you have an account, please log in first.' %}
++ {% blocktrans %} + However you can also subscribe without creating an account. + If you wish to to so, please use the form below. + {% endblocktrans%} +
+ +