Skip to content

Commit 0aa1161

Browse files
committed
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
1 parent 801f3e7 commit 0aa1161

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

ietf/mailinglists/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ def get_template(self):
201201
return templates
202202
def render_template(self, *args, **kwargs):
203203
self.extra_context['mlist_known'] = self.mlist_known
204+
if self.step > 0:
205+
self.extra_context['form0'] = self.clean_forms[0]
204206
if self.step > self.main_step:
205207
self.extra_context['main_form'] = self.clean_forms[self.main_step]
206208
self.extra_context['requestor_is_approver'] = self.requestor_is_approver
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% extends "mailinglists/list_wizard_base.html" %}
2+
3+
{% block mlform %}
4+
<tr><td>
5+
{% if form.authorized.errors %}
6+
<ul class="errorlist">
7+
{% for error in form.authorized.errors %}
8+
<li>{{ error|escape }}</li>
9+
{% endfor %}
10+
</ul>
11+
{% endif %}
12+
{{ form.authorized }}
13+
<b>
14+
{% ifequal form0.domain_name.data "iab.org" %}
15+
I am a member of the IAB or am otherwise authorized to create or
16+
close a mailing list at iab.org, or to move an existing list to
17+
this domain.
18+
{% else %}
19+
{% ifequal form0.domain_name.data "irtf.org" %}
20+
I am an active participant in the IRTF, or am otherwise authorized
21+
to create or close a mailing list at irtf.org, or to move an existing
22+
list to this domain.
23+
{% else %}
24+
I am authorized to perform this action.
25+
{% endifequal %}
26+
{% endifequal %}
27+
</b></td></tr>
28+
{% endblock %}

0 commit comments

Comments
 (0)