nwg_list_submit bug fix
- Legacy-Id: 624
This commit is contained in:
parent
6c35c89054
commit
34a621fe5d
|
@ -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)
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue