From 6c35c89054a635b998892ace20f8b5ed7d6acdf3 Mon Sep 17 00:00:00 2001
From: Michael Lee
Date: Mon, 25 Jun 2007 04:55:29 +0000
Subject: [PATCH] * fix Delete request * Step number is dynamically generated
* add template for delete confirmation - Legacy-Id: 623
---
ietf/mailinglists/views.py | 7 ++-
ietf/templates/mailinglists/nwg_wizard.html | 2 +-
.../nwg_wizard_addedit_step3.html | 2 +-
.../mailinglists/nwg_wizard_delete_step2.html | 44 +++++++++++++++++++
4 files changed, 51 insertions(+), 4 deletions(-)
create mode 100644 ietf/templates/mailinglists/nwg_wizard_delete_step2.html
diff --git a/ietf/mailinglists/views.py b/ietf/mailinglists/views.py
index e3aec7181..72b463be4 100644
--- a/ietf/mailinglists/views.py
+++ b/ietf/mailinglists/views.py
@@ -74,13 +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':
+ 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)
def failed_hash(self, step):
raise NotImplementedError("step %d hash failed" % step)
diff --git a/ietf/templates/mailinglists/nwg_wizard.html b/ietf/templates/mailinglists/nwg_wizard.html
index 1983e1095..2b81b8c1a 100644
--- a/ietf/templates/mailinglists/nwg_wizard.html
+++ b/ietf/templates/mailinglists/nwg_wizard.html
@@ -3,7 +3,7 @@
{% block nwgcontent %}
View Current list
-
Step 3
+Step {{ step|add:"1" }}