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" }}

{{ previous_fields }} diff --git a/ietf/templates/mailinglists/nwg_wizard_addedit_step3.html b/ietf/templates/mailinglists/nwg_wizard_addedit_step3.html index f74d94a24..fd7f80035 100644 --- a/ietf/templates/mailinglists/nwg_wizard_addedit_step3.html +++ b/ietf/templates/mailinglists/nwg_wizard_addedit_step3.html @@ -1,7 +1,7 @@ {% extends "mailinglists/nwg_wizard_base.html" %} {% block nwgcontent %} -

Step 4

+

Step {{ step|add:"1" }}

Please verify the following information:

diff --git a/ietf/templates/mailinglists/nwg_wizard_delete_step2.html b/ietf/templates/mailinglists/nwg_wizard_delete_step2.html new file mode 100644 index 000000000..9c903fe54 --- /dev/null +++ b/ietf/templates/mailinglists/nwg_wizard_delete_step2.html @@ -0,0 +1,44 @@ +{% extends "mailinglists/nwg_wizard_base.html" %} + +{% block nwgcontent %} +

Step {{ step|add:"1" }}

+

Please verify the following information:

+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+

Request Submit Confirmation

+Please review the following information that you are about to submit.
+Once you click the 'Submit' button below, this request will be sent to +the selected Area Director for approval.
+
+
Request Type: +Deleting an existing entry +
Submitter's Name:{{ clean_forms.1.ds_name.data|escape }}
Submitter's Email Address:{{ clean_forms.1.ds_email.data|escape }}
Mailing List Name:{{ list_q.list_name|escape }}
URL or Email Address of Mailing List:
{{ list_url|escape }}
URL to Subscribe:
{% firstof list_q.subscribe_url "Not Applicable" %}
Other Info. to Subscribe:
{{ list_q.subscribe_other|escape }}
Administrator(s)' Email Address(es):
{{ list_q.admin|escape|linebreaks }}
Purpose: {{ list_q.purpose|escape }}
Area:
{{ list_q.area }}
Approving Area Director:
{{ approver|escape }}
Message to AD:
{{ clean_forms.1.msg_to_ad.data|escape }}
+ +
+
+{{ previous_fields }} + +
+{% endblock %}