root / templates / edumanage / servers_edit.html @ 25028c1d
History | View | Annotate | Download (5.3 kB)
1 |
{% extends "edumanage/welcome.html"%} |
---|---|
2 |
{% load i18n %} |
3 |
{% block crumbs %} |
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
5 |
<li><a href="{% url servers %}">{% trans "Servers" %}</a><span class="divider">/</span></li> |
6 |
<li class="active">{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Server" %}{% endif %}</li> |
7 |
{% endblock %} |
8 |
{% block extrahead %} |
9 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
10 |
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> |
11 |
<script type="text/javascript"></script> |
12 |
{% endblock %} |
13 |
{% block homeactive %}{% endblock %} |
14 |
{% block serversactive %}class="active"{% endblock %} |
15 |
{% block subcontent %} <h4>{% if edit %}{{form.instance.get_name}} ({% trans "edit" %}){% else %}{% trans "Add Server" %}{% endif %}</h4> |
16 |
<hr>
|
17 |
<form method="POST" class="form-horizontal"> |
18 |
{% csrf_token %} |
19 |
{% if form.non_field_errors %} |
20 |
<p class="error"> |
21 |
{{ form.non_field_errors}} |
22 |
</p>
|
23 |
{% endif %} |
24 |
<div style="display: none"> |
25 |
{{form.instid}} |
26 |
</div>
|
27 |
<div class="control-group {% if form.ertype.errors %} error {% endif %}"> |
28 |
<label class="control-label" for="id_ertype"><b>{% trans "Type" %}</b></label> |
29 |
<div class="controls"> |
30 |
{{ form.ertype }} |
31 |
{% if form.ertype.errors %} <span class="help-inline"> {{ form.ertype.errors|join:", " }} </span> |
32 |
{% endif %} <span class="help-block"> {{ form.ertype.help_text }}</span> |
33 |
</div>
|
34 |
</div>
|
35 |
<div class="control-group {% if form.name.errors %} error {% endif %}"> |
36 |
<label class="control-label" for="id_name">{% trans "Label" %}</label> |
37 |
<div class="controls"> |
38 |
{{ form.name }} |
39 |
{% if form.name.errors %} <span class="help-inline"> {{ form.name.errors|join:", " }} </span> |
40 |
{% endif %} <span class="help-block"> {{ form.name.help_text }}</span> |
41 |
</div>
|
42 |
</div>
|
43 |
<div class="control-group {% if form.host.errors %} error {% endif %}"> |
44 |
<label class="control-label" for="id_host"><b>{% trans "Hostname" %}</b></label> |
45 |
<div class="controls"> |
46 |
{{ form.host }} |
47 |
{% if form.host.errors %} <span class="help-inline"> {{ form.host.errors|join:", " }} </span> |
48 |
{% endif %} <span class="help-block"> {{ form.host.help_text }}</span> |
49 |
</div>
|
50 |
</div>
|
51 |
{% if instdets.ertype == 1 or instdets.ertype == 3 %} |
52 |
<div class="control-group {% if form.port.errors %} error {% endif %}"> |
53 |
<label class="control-label" for="id_port"><b>{% trans "Port" %}</b></label> |
54 |
<div class="controls"> |
55 |
{{ form.port }} |
56 |
{% if form.port.errors %} <span class="help-inline"> {{ form.port.errors|join:", " }} </span> |
57 |
{% endif %} <span class="help-block"> {{ form.port.help_text }}</span> |
58 |
</div>
|
59 |
</div>
|
60 |
<div class="control-group {% if form.acct_port.errors %} error {% endif %}"> |
61 |
<label class="control-label" for="id_acct_port"><b>{% trans "acct_port" %}</b></label> |
62 |
<div class="controls"> |
63 |
{{ form.acct_port }} |
64 |
{% if form.acct_port.errors %} <span class="help-inline"> {{ form.acct_port.errors|join:", " }} </span> |
65 |
{% endif %} <span class="help-block"> {{ form.acct_port.help_text }}</span> |
66 |
</div>
|
67 |
</div>
|
68 |
<div class="control-group {% if form.timeout.errors %} error {% endif %}"> |
69 |
<label class="control-label" for="id_timeout"><b>{% trans "Timeout" %}</b></label> |
70 |
<div class="controls"> |
71 |
{{ form.timeout }} |
72 |
{% if form.timeout.errors %} <span class="help-inline"> {{ form.timeout.errors|join:", " }} </span> |
73 |
{% endif %} <span class="help-block"> {{ form.ertype.help_text }}</span> |
74 |
</div>
|
75 |
</div>
|
76 |
<div class="control-group {% if form.retry.errors %} error {% endif %}"> |
77 |
<label class="control-label" for="id_retry"><b>{% trans "Retry" %}</b></label> |
78 |
<div class="controls"> |
79 |
{{ form.retry }} |
80 |
{% if form.retry.errors %} <span class="help-inline"> {{ form.retry.errors|join:", " }} </span> |
81 |
{% endif %} <span class="help-block"> {{ form.retry.help_text }}</span> |
82 |
</div>
|
83 |
</div>
|
84 |
{% endif %} |
85 |
<div class="control-group {% if form.status_server.errors %} error {% endif %}"> |
86 |
<label class="control-label" for="id_status_server">{% trans "Status Server" %}</label> |
87 |
<div class="controls"> |
88 |
{{ form.status_server }} |
89 |
{% if form.status_server.errors %} <span class="help-inline"> {{ form.status_server.errors|join:", " }} </span> |
90 |
{% endif %} <span class="help-block"> {{ form.status_server.help_text }}</span> |
91 |
</div>
|
92 |
</div>
|
93 |
<div class="control-group {% if form.secret.errors %} error {% endif %}"> |
94 |
<label class="control-label" for="id_secret"><b>{% trans "Secret" %}</b></label> |
95 |
<div class="controls"> |
96 |
{{ form.secret }} |
97 |
{% if form.secret.errors %} <span class="help-inline"> {{ form.secret.errors|join:", " }} </span> |
98 |
{% endif %} <span class="help-block"> {{ form.status_server.help_text }}</span> |
99 |
</div>
|
100 |
</div>
|
101 |
<div class="control-group {% if form.proto.errors %} error {% endif %}"> |
102 |
<label class="control-label" for="id_proto"><b>{% trans "Protocol" %}</b></label> |
103 |
<div class="controls"> |
104 |
{{ form.proto }} |
105 |
{% if form.proto.errors %} <span class="help-inline"> {{ form.proto.errors|join:", " }} </span> |
106 |
{% endif %} <span class="help-block"> {{ form.proto.help_text }}</span> |
107 |
</div>
|
108 |
</div>
|
109 |
<div class="control-group"> |
110 |
<div class="controls"> |
111 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/> |
112 |
{% trans "Apply" %}</button>
|
113 |
</div>
|
114 |
</div>
|
115 |
</form>
|
116 |
{% endblock %} |
117 |
|