nwg_list_submit bug fix

- Legacy-Id: 624
This commit is contained in:
Michael Lee 2007-06-25 05:17:44 +00:00
parent 6c35c89054
commit 34a621fe5d
2 changed files with 5 additions and 3 deletions

View file

@ -74,14 +74,16 @@ class NonWgWizard(wizard.Wizard):
return templates
def render_template(self, *args, **kwargs):
self.extra_context['clean_forms'] = self.clean_forms
form0 = self.clean_forms[0]
add_edit = form0.clean_data['add_edit']
if self.step == 3:
form0 = self.clean_forms[0]
add_edit = form0.clean_data['add_edit']
if add_edit == 'add' or add_edit == 'edit':
# Can't get the choice mapping directly from the form
self.extra_context['area'] = formchoice(self.clean_forms[1], 'area')
self.extra_context['approver'] = formchoice(self.clean_forms[2], 'approver')
if self.step == 2 and add_edit == 'delete':
form0 = self.clean_forms[0]
add_edit = form0.clean_data['add_edit']
self.extra_context['list_q'] = NonWgMailingList.objects.get(pk=self.clean_forms[0].clean_data['list_id_delete'])
self.extra_context['approver'] = formchoice(self.clean_forms[1], 'approver')
return super(NonWgWizard, self).render_template(*args, **kwargs)

View file

@ -5,7 +5,7 @@ tr > th { text-align: left; vertical-align: top; }
{% endblock %}
{% block nwgcontent %}
<h2>Step 2</h2>
<h2>Step {{ step|add:"1" }}</h2>
<h4>Please provide the following information:</h4>
<form action="." method="POST">