diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 658a178..39f940e 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -95,20 +95,9 @@ "description"]] -class NewOwnerForm(forms.Form): - - """Add a list owner.""" - owner_email = forms.EmailField( - label=_('Email Address'), - error_messages={ - 'required': _('Please enter an email adddress.'), - 'invalid': _('Please enter a valid email adddress.')}) - - -class NewModeratorForm(forms.Form): - - """Add a list moderator.""" - moderator_email = forms.EmailField( +class MemberForm(forms.Form): + """Assing a role to the member""" + email = forms.EmailField( label=_('Email Address'), error_messages={ 'required': _('Please enter an email adddress.'), @@ -853,18 +842,18 @@ choices=((address, address) for address in user_emails)) -class HeldMessagesModerationForm(forms.Form): +class MultipleChoiceForm(forms.Form): - class HeldMessageMultipleChoiceField(forms.MultipleChoiceField): + class MultipleChoiceField(forms.MultipleChoiceField): def validate(self, value): pass - choices = HeldMessageMultipleChoiceField( + choices = MultipleChoiceField( widget=forms.CheckboxSelectMultiple, ) def clean_choices(self): if len(self.cleaned_data['choices']) < 1: - raise forms.ValidationError(_('Please select at least one message to perform an action')) + raise forms.ValidationError(_('Make at least one selection')) return self.cleaned_data['choices'] diff --git a/src/postorius/templates/postorius/base.html b/src/postorius/templates/postorius/base.html index 5ce979f..7cee8f8 100644 --- a/src/postorius/templates/postorius/base.html +++ b/src/postorius/templates/postorius/base.html @@ -1,4 +1,3 @@ -{% load url from future %} {% load i18n %} {% load staticfiles %} diff --git a/src/postorius/templates/postorius/lists/confirm_remove_role.html b/src/postorius/templates/postorius/lists/confirm_remove_role.html index 4d7cfae..816fcb5 100644 --- a/src/postorius/templates/postorius/lists/confirm_remove_role.html +++ b/src/postorius/templates/postorius/lists/confirm_remove_role.html @@ -15,7 +15,7 @@
diff --git a/src/postorius/templates/postorius/lists/members.html b/src/postorius/templates/postorius/lists/members.html index 6ab9b7f..ed0d4d3 100644 --- a/src/postorius/templates/postorius/lists/members.html +++ b/src/postorius/templates/postorius/lists/members.html @@ -4,99 +4,89 @@ {% load nav_helpers %} {% block subtitle %} -{% trans 'Members' %} | {{ list.fqdn_listname}} +{{ page_title }} | {{ list.fqdn_listname}} {% endblock %} {% block main %} {% list_nav 'list_members' 'List Members' %}{% trans 'Address' %} | -- |
---|---|
{{ member }} | -{% trans 'Delete' %} | -
{% trans 'Address' %} | -- |
---|---|
{{ member }} | -{% trans 'Delete' %} | -
{% trans 'Address' %} | -{% trans 'Role' %} | -- |
---|---|---|
{{ member.email }} | -{% trans member.role %} | -{% trans 'Unsubscribe' %} | -
+ {% endif %} + | {% trans 'Address' %} | ++ {% if not member_form %} + + {% endif %} + | +||
---|---|---|---|---|
+ | {{ member.email }} | +{% trans 'Unsubscribe' %} | + {% else %} +{{ member }} | +{% trans 'Delete' %} | + {% endif %} +
{{ empty_error }}
+ {% endif %}