diff --git a/src/mailmanweb/forms.py b/src/mailmanweb/forms.py index 7d48afb..63c06d6 100644 --- a/src/mailmanweb/forms.py +++ b/src/mailmanweb/forms.py @@ -761,6 +761,10 @@ "Digest": _("Digest-related options"), "Message Acceptance": _("Options related to when messages are accepted"), } + def clean_recipients(self): + data = self.cleaned_data['recipients'] + data = data.splitlines() + return data def __init__(self,visible_section,visible_option, *args, **kwargs): super(ListSettings, self).__init__(*args, **kwargs) #if settings:raise Exception(settings) #debug diff --git a/src/mailmanweb/views.py b/src/mailmanweb/views.py index e8a0ae0..505bb3f 100644 --- a/src/mailmanweb/views.py +++ b/src/mailmanweb/views.py @@ -340,6 +340,14 @@ the_list = List.objects.get_or_404(fqdn_listname=fqdn_listname) except MailmanApiError: return utils.render_api_error(request) + #collect all Form sections for the links: + temp = ListSettings('','') + for section in temp.layout: + try: + form_sections.append((section[0],temp.section_descriptions[section[0]])) + except KeyError, e: + error=e + del temp #Save a Form Processed by POST if request.method == 'POST': form = ListSettings(visible_section,visible_option,data=request.POST) @@ -354,14 +362,6 @@ message = _("Validation Error - The list has not been updated.") else: - #collect all Form sections for the links: - temp = ListSettings('','') - for section in temp.layout: - try: - form_sections.append((section[0],temp.section_descriptions[section[0]])) - except KeyError, e: - error=e - del temp #Provide a form with existing values #create form and process layout into form.layout form = ListSettings(visible_section,visible_option,data=None)