forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.html
More file actions
72 lines (65 loc) · 2.15 KB
/
edit.html
File metadata and controls
72 lines (65 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load bootstrap3 %}
{% load ietf_filters %}
{% block title %}
{% if group %}
Edit {{ group.type.name }} {{ group.acronym }}
{% else %}
Start chartering new group
{% endif %}
{% endblock %}
{% block pagehead %}
{{ form.media.css }}
{% endblock %}
{% block content %}
{% origin %}
<h1>
{% if action == "edit" %}
Edit {{ group.type.name }} {{ group.acronym }}
{% elif action == "charter" %}
Start chartering new group
{% else %}
Create new group or BOF
{% endif %}
</h1>
{% if not request.user.is_authenticated %}
<p class="alert alert-info">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 "ietf.ietfauth.views.create_account" %}">created here</a>.</p>
{% else %}
<p></p>
{% endif %}
<form class="form-horizontal" method="post">
{% csrf_token %}
{% bootstrap_form form layout='horizontal' %}
{% buttons layout='horizontal' %}
{% if action == "edit" %}
<button class="btn btn-primary" type="submit">Submit</button>
<a class="btn btn-default pull-right" href="{{ group.about_url }}">Back</a>
{% elif action == "charter" %}
<button class="btn btn-primary" type="submit">Start chartering</button>
{% else %}
<button class="btn btn-primary" type="submit">Create group or BOF</button>
{% endif %}
{% endbuttons %}
</form>
{% endblock %}
{% block js %}
{{ form.media.js }}
<script>
$(document).ready(function () {
$("#id_acronym").closest(".form-group").each(function() {
// fixup styling a bit in case the confirm checkbox is shown
if ($(this).next().find("#id_confirm_acronym").length > 0) {
$(this).css("margin-bottom", 0);
$(this).find(".help-block").css("margin-bottom", 0);
if ($(this).hasClass("has-error"))
$(this).next().addClass("has-error");
}
});
});
</script>
{% endblock %}