diff --git a/src/postorius/forms.py b/src/postorius/forms.py index a13d814..3853ed7 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -843,3 +843,20 @@ required=False, widget=forms.Select(), choices=((address, address) for address in user_emails)) + + +class HeldMessagesModerationForm(forms.Form): + + class HeldMessageMultipleChoiceField(forms.MultipleChoiceField): + + def validate(self, value): + pass + + choices = HeldMessageMultipleChoiceField( + 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')) + return self.cleaned_data['choices'] diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css index 04c2f9b..390fa13 100755 --- a/src/postorius/static/postorius/css/style.css +++ b/src/postorius/static/postorius/css/style.css @@ -1,6 +1,9 @@ html { overflow-y: scroll; } +.hidden { + display: none; +} body { color: #444; @@ -307,7 +310,3 @@ .well .archival-options-form li { display: block; } - -.hidden { - display: none; -} diff --git a/src/postorius/templates/postorius/lists/held_messages.html b/src/postorius/templates/postorius/lists/held_messages.html index cc359d4..924c052 100644 --- a/src/postorius/templates/postorius/lists/held_messages.html +++ b/src/postorius/templates/postorius/lists/held_messages.html @@ -1,68 +1,84 @@ {% extends postorius_base_template %} {% load url from future %} {% load i18n %} - -{% block subtitle %} -{% trans "Held Messages | " as page_title %}{{ page_title|add:list.fqdn_listname}} -{% endblock %} - {% load nav_helpers %} -{% block body_class %}list_summary{% endblock %} +{% block subtitle %} +{% trans 'Held Messages' %} | {{ list.fqdn_listname }} +{% endblock %} {% block main %} - {% list_nav 'list_held_messages' "Held Messages" %} + {% list_nav 'list_held_messages' 'Held Messages' %} + {% if list.held|length > 0 %} +