datatracker/ietf/templates/mailinglists/list_wizard_MailingListForm.html
Bill Fenner 89a8834177 Rename "initial" to "initial_members" so that it doesn't shadow
the form attribute "initial" (as in initial data)

Render the form field-by-field for MailingListForm, so that
we can render the mailing list name conditionally as a text input
box or as a hidden field with the value in the page.  We can also
insert the domain name here too.  (Note that this means that
hidden fields in this form other than domain name have to be
treated specially!)
 - Legacy-Id: 270
2007-06-08 19:54:59 +00:00

30 lines
775 B
HTML

{% extends "mailinglists/list_wizard_base.html" %}
{% block mlform %}
{% for field in form %}
{% if field.is_hidden %}
{# we assume that the only hidden form is the domain name #}
{# so don't render anything #}
{% else %}
<tr>
<th>{{ field.label_tag }}:</th>
<td>
{% if field.errors %}
<ul class="errorlist">{% for error in field.errors %}<li>{{ error|escape }}</li>{% endfor %}</ul>
{% endif %}
{% ifequal field.name "mlist_name" %}
{% if mlist_known %}{# if we know the mailing list name already #}
{{ form.initial.mlist_name }}@{{ form.initial.domain_name }}{{ field.as_hidden }}
{% else %}
{{ field }}@{{ form.initial.domain_name }}
{% endif %}
{{ form.domain_name.as_hidden }}
{% else %}
{{ field }}
{% endifequal %}
</td>
</tr>
{% endif %}
{% endfor %}
{% endblock %}