* fix Delete request
* Step number is dynamically generated * add template for delete confirmation - Legacy-Id: 623
This commit is contained in:
parent
440c85a309
commit
6c35c89054
|
@ -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)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block nwgcontent %}
|
||||
<a href="/mailinglists/nonwg_lists/"><b>View Current list</b></a><br>
|
||||
</p><p>
|
||||
<h2>Step 3</h2>
|
||||
<h2>Step {{ step|add:"1" }}</h2>
|
||||
<form action="." method="POST">
|
||||
<input type="hidden" name="{{ step_field }}" value="{{ step }}" />
|
||||
{{ previous_fields }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "mailinglists/nwg_wizard_base.html" %}
|
||||
|
||||
{% block nwgcontent %}
|
||||
<h2>Step 4</h2>
|
||||
<h2>Step {{ step|add:"1" }}</h2>
|
||||
<h4>Please verify the following information:</h4>
|
||||
<form action="." method="POST">
|
||||
<table bgcolor="#88AED2" cellspacing="1" border="0">
|
||||
|
|
44
ietf/templates/mailinglists/nwg_wizard_delete_step2.html
Normal file
44
ietf/templates/mailinglists/nwg_wizard_delete_step2.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
{% extends "mailinglists/nwg_wizard_base.html" %}
|
||||
|
||||
{% block nwgcontent %}
|
||||
<h2>Step {{ step|add:"1" }}</h2>
|
||||
<h4>Please verify the following information:</h4>
|
||||
<form action="." method="POST">
|
||||
<table bgcolor="#88AED2" cellspacing="1" border="0">
|
||||
<tr valign="top"><td>
|
||||
<table bgcolor="#f3f8fd" cellpadding="3" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan=2>
|
||||
<h3>Request Submit Confirmation</h3>
|
||||
Please review the following information that you are about to submit.<br>
|
||||
Once you click the 'Submit' button below, this request will be sent to
|
||||
the selected Area Director for approval.<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top"><td>Request Type:</td><td>
|
||||
Deleting an existing entry
|
||||
</td></tr>
|
||||
<tr valign="top"><td>Submitter's Name:</td><td>{{ clean_forms.1.ds_name.data|escape }}</td></tr>
|
||||
<tr valign="top"><td>Submitter's Email Address:</td><td>{{ clean_forms.1.ds_email.data|escape }}</td></tr>
|
||||
<tr valign="top"><td>Mailing List Name:</td><td>{{ list_q.list_name|escape }}</td></tr>
|
||||
<tr valign="top"><td>URL or Email Address of Mailing List: </td><td><pre>{{ list_url|escape }}</pre></td></tr>
|
||||
<tr valign="top"><td>URL to Subscribe: </td><td><pre>{% firstof list_q.subscribe_url "Not Applicable" %}</pre></td></tr>
|
||||
<tr valign="top"><td>Other Info. to Subscribe: </td><td><pre>{{ list_q.subscribe_other|escape }}</pre></td></tr>
|
||||
<tr valign="top"><td>Administrator(s)' Email Address(es): </td><td><pre>{{ list_q.admin|escape|linebreaks }}</pre></td></tr>
|
||||
<tr valign="top"><td>Purpose: </td><td>{{ list_q.purpose|escape }}</td></tr>
|
||||
<tr valign="top"><td>Area: </td><td><pre>{{ list_q.area }}</pre></td></tr>
|
||||
<tr valign="top"><td>Approving Area Director: </td><td><pre>{{ approver|escape }}</pre></td></tr>
|
||||
<tr valign="top"><td>Message to AD: </td><td><pre>{{ clean_forms.1.msg_to_ad.data|escape }}</pre></td></tr>
|
||||
<tr valign="top">
|
||||
<td></td>
|
||||
<td>
|
||||
<input type="submit" value=" Submit ">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
{{ previous_fields }}
|
||||
<input type="hidden" name="{{ step_field }}" value="{{ step }}" />
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue