103 lines
3.1 KiB
HTML
103 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
{% if group %}
|
|
Edit {{ group.type.name }} {{ group.acronym }}
|
|
{% else %}
|
|
Start chartering new group
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block morecss %}
|
|
form.edit td { padding-bottom: .5em; }
|
|
form.edit #id_name,
|
|
form.edit #id_list_email,
|
|
form.edit #id_list_subscribe,
|
|
form.edit #id_list_archive,
|
|
form.edit #id_urls,
|
|
form.edit #id_comments { width: 400px; }
|
|
form.edit input[type=checkbox] { vertical-align: middle; }
|
|
form.edit #id_urls { height: 4em; }
|
|
{% endblock %}
|
|
|
|
{% block pagehead %}
|
|
<link rel="stylesheet" type="text/css" href="/css/token-input.css"></link>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% load ietf_filters %}
|
|
<h1>
|
|
{% if action == "edit" %}
|
|
Edit {{ group.type.name }} {{ group.acronym }}
|
|
{% else %}
|
|
{% if action == "charter" %}
|
|
Start chartering new group
|
|
{% else %}
|
|
Create new group or BoF
|
|
{% endif %}
|
|
{% endif %}
|
|
</h1>
|
|
|
|
<p>Note that persons with authorization to manage information, e.g.
|
|
chairs and delegates, need a Datatracker account to actually do
|
|
so. New accounts can be <a href="{% url "create_account" %}">created here</a>.</p>
|
|
|
|
<form class="edit" action="" method="post">{% csrf_token %}
|
|
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
|
|
<table>
|
|
{% for field in form.visible_fields %}
|
|
<tr>
|
|
<th>{{ field.label_tag }} {% if field.field.required %}*{% endif %}</th>
|
|
<td>{{ field }}
|
|
{% if field.name == "ad" and request.user|has_role:"Area Director" %}
|
|
<label><input type="checkbox" name="ad" value="{{ request.user.person.pk }}" /> Assign to me</label>
|
|
{% endif %}
|
|
{% if field.help_text %}<div class="help">{{ field.help_text }}</div>{% endif %}
|
|
{{ field.errors }}
|
|
</td>
|
|
</tr>
|
|
{% if field.name == "acronym" and form.confirm_msg %}
|
|
<tr>
|
|
<td></td>
|
|
<td><input name="confirmed" type="checkbox"{% if form.autoenable_confirm %} checked="checked"{% endif %}/>
|
|
{{ form.confirm_msg }}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<tr>
|
|
<td></td>
|
|
<td class="actions">
|
|
{% if action == "edit" %}
|
|
<a class="button" href="{% url "group_charter" group_type=group.type_id acronym=group.acronym %}">Cancel</a>
|
|
<input class="button" type="submit" value="Save"/>
|
|
{% else %}
|
|
{% if action == "charter" %}
|
|
<input type="submit" value="Start chartering"/>
|
|
{% else %}
|
|
<input type="submit" value="Create group or bof"/>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block content_end %}
|
|
<script type="text/javascript" src="/js/lib/jquery.tokeninput.js"></script>
|
|
<script type="text/javascript" src="/js/lib/json2.js"></script>
|
|
<script type="text/javascript" src="/js/tokenized-field.js"></script>
|
|
<script>
|
|
jQuery(function () {
|
|
if (jQuery('input[name="confirmed"]').length > 0) {
|
|
jQuery('input[name="acronym"]').change(function() {
|
|
// make sure we don't accidentally confirm another acronym
|
|
jQuery('input[name="confirmed"]').closest("tr").remove();
|
|
jQuery('input[name="acronym"]').siblings(".errorlist").remove();
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|