~benste/mailmanweb/main_dev

« back to all changes in this revision

Viewing changes to src/mailmanweb/views.py

  • Committer: Terri Oda
  • Date: 2012-03-14 06:31:31 UTC
  • Revision ID: terri@zone12.com-20120314063131-vf80n3njs2tgg6wx
Made it so that the settings menu doesn't disappear when you change settings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
        the_list = List.objects.get_or_404(fqdn_listname=fqdn_listname)
341
341
    except MailmanApiError:
342
342
        return utils.render_api_error(request)
 
343
    #collect all Form sections for the links:
 
344
    temp = ListSettings('','')
 
345
    for section in temp.layout:
 
346
        try:
 
347
            form_sections.append((section[0],temp.section_descriptions[section[0]]))
 
348
        except KeyError, e:
 
349
            error=e
 
350
    del temp
343
351
    #Save a Form Processed by POST  
344
352
    if request.method == 'POST':
345
353
        form = ListSettings(visible_section,visible_option,data=request.POST)
354
362
            message = _("Validation Error - The list has not been updated.")
355
363
    
356
364
    else:
357
 
        #collect all Form sections for the links:
358
 
        temp = ListSettings('','')
359
 
        for section in temp.layout:
360
 
            try:
361
 
                form_sections.append((section[0],temp.section_descriptions[section[0]]))
362
 
            except KeyError, e:
363
 
                error=e
364
 
        del temp
365
365
        #Provide a form with existing values
366
366
        #create form and process layout into form.layout
367
367
        form = ListSettings(visible_section,visible_option,data=None)