Emanuel Danci has proposed merging
lp:~danci-emanuel/postorius/UI_dlists_support into lp:postorius.
Requested reviews:
Mailman Coders (mailman-coders)
For more details, see:
https://code.launchpad.net/~danci-emanuel/postorius/UI_dlists_support/+merge/114170
--
https://code.launchpad.net/~danci-emanuel/postorius/UI_dlists_support/+merge/114170
Your team Mailman Coders is requested to review the proposed merge of
lp:~danci-emanuel/postorius/UI_dlists_support into lp:postorius.
=== modified file 'src/postorius/forms.py'
--- src/postorius/forms.py 2012-03-23 23:22:16 +0000
+++ src/postorius/forms.py 2012-07-10 11:49:33 +0000
@@ -96,6 +96,19 @@
'required': _("Please enter the list owner's email address."),
},
required = True)
+
+ dlists_enabled = forms.ChoiceField(
+ widget = forms.RadioSelect(),
+ label = _("Enable Dynamic sublists feature for this list?"),
+ error_messages = {
+ 'required': _("Please choose an option."),
+ },
+ required = True,
+ choices = (
+ (True, _("Enable.")),
+ (False, _("Do not enable."))
+ ))
+
advertised = forms.ChoiceField(
widget = forms.RadioSelect(),
label = _('Advertise this list?'),
@@ -142,7 +155,8 @@
"mail_host",
"list_owner",
"description",
- "advertised"],]
+ "advertised",
+ "dlists_enabled"],]
class ListSubscribe(FieldsetForm):
"""Form fields to join an existing list.
@@ -302,6 +316,13 @@
widget = forms.RadioSelect,
label = _('Advertise the existance of this list?'),
)
+
+ dlists_enabled = forms.TypedChoiceField(
+ coerce=lambda x: x =='True',
+ choices=((True, _('Enabled')), (False, _('Disabled'))),
+ widget = forms.RadioSelect,
+ label = _("Status of the Dynamic sublists feature"),
+ )
filter_content = forms.TypedChoiceField(
coerce=lambda x: x =='True',
choices=((True, _('Yes')), (False, _('No'))),
@@ -780,7 +801,8 @@
# just a really temporary layout to see that it works. -- Anna
layout = [
["List Identity", "display_name", "mail_host", "description",
- "advertised"],
+ "advertised",
+ "dlists_enabled"],
#"info", "list_name", "host_name", "list_id", "fqdn_listname",
#"http_etag", "volume", "web_host"
["Automatic Responses", "autorespond_owner",
=== modified file 'src/postorius/views.py'
--- src/postorius/views.py 2012-05-25 22:37:22 +0000
+++ src/postorius/views.py 2012-07-10 11:49:33 +0000
@@ -45,7 +45,6 @@
logger = logging.getLogger(__name__)
-
@login_required
@user_passes_test(lambda u: u.is_superuser)
def site_settings(request):
@@ -123,6 +122,7 @@
list_settings["description"] = form.cleaned_data['description']
list_settings["owner_address"] = \
form.cleaned_data['list_owner']
+ list_settings["dlists_enabled"] = form.cleaned_data['dlists_enabled']
list_settings["advertised"] = form.cleaned_data['advertised']
list_settings.save()
messages.success(request, _("List created"))
_______________________________________________
Mailman-coders mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-coders