From 0aa1161f2a90ac21d347ceac94e0ae63a98fafd9 Mon Sep 17 00:00:00 2001 From: Bill Fenner Date: Mon, 18 Jun 2007 16:39:47 +0000 Subject: [PATCH] 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 --- ietf/mailinglists/views.py | 2 ++ .../list_wizard_ListReqAuthorized.html | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 ietf/templates/mailinglists/list_wizard_ListReqAuthorized.html diff --git a/ietf/mailinglists/views.py b/ietf/mailinglists/views.py index 86901aef2..cba6267bb 100644 --- a/ietf/mailinglists/views.py +++ b/ietf/mailinglists/views.py @@ -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 diff --git a/ietf/templates/mailinglists/list_wizard_ListReqAuthorized.html b/ietf/templates/mailinglists/list_wizard_ListReqAuthorized.html new file mode 100644 index 000000000..3dac23c6b --- /dev/null +++ b/ietf/templates/mailinglists/list_wizard_ListReqAuthorized.html @@ -0,0 +1,28 @@ +{% extends "mailinglists/list_wizard_base.html" %} + +{% block mlform %} + +{% if form.authorized.errors %} + +{% endif %} +{{ form.authorized }} + +{% 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 %} + +{% endblock %}