Supply form0 to the templates, and use that in ListReqAuthorized.html

to display the right approval text (or a fallback if it's something
else for some reason)
 - Legacy-Id: 494
This commit is contained in:
Bill Fenner 2007-06-18 16:39:47 +00:00
parent 801f3e74f2
commit 0aa1161f2a
2 changed files with 30 additions and 0 deletions

View file

@ -201,6 +201,8 @@ class ListReqWizard(wizard.Wizard):
return templates
def render_template(self, *args, **kwargs):
self.extra_context['mlist_known'] = self.mlist_known
if self.step > 0:
self.extra_context['form0'] = self.clean_forms[0]
if self.step > self.main_step:
self.extra_context['main_form'] = self.clean_forms[self.main_step]
self.extra_context['requestor_is_approver'] = self.requestor_is_approver

View file

@ -0,0 +1,28 @@
{% extends "mailinglists/list_wizard_base.html" %}
{% block mlform %}
<tr><td>
{% if form.authorized.errors %}
<ul class="errorlist">
{% for error in form.authorized.errors %}
<li>{{ error|escape }}</li>
{% endfor %}
</ul>
{% endif %}
{{ form.authorized }}
<b>
{% ifequal form0.domain_name.data "iab.org" %}
I am a member of the IAB or am otherwise authorized to create or
close a mailing list at iab.org, or to move an existing list to
this domain.
{% else %}
{% ifequal form0.domain_name.data "irtf.org" %}
I am an active participant in the IRTF, or am otherwise authorized
to create or close a mailing list at irtf.org, or to move an existing
list to this domain.
{% else %}
I am authorized to perform this action.
{% endifequal %}
{% endifequal %}
</b></td></tr>
{% endblock %}