root / templates / apply.html @ 3e99e2d1
History | View | Annotate | Download (3 kB)
1 |
{% extends "base.html" %} |
---|---|
2 |
{% load i18n %} |
3 |
|
4 |
{% block title %} |
5 |
{% if edit %} |
6 |
{% trans "Edit Route" %} {{form.data.name}} |
7 |
{% else %} |
8 |
{% trans "Create new Route" %} |
9 |
{% endif %} |
10 |
{% endblock %} |
11 |
|
12 |
{% block breadcrumbs %}:: |
13 |
{% if edit %} |
14 |
{% trans "Edit route" %} {{form.data.name}} |
15 |
{% else %} |
16 |
{% trans "Create route" %} |
17 |
{% endif %} |
18 |
{% endblock %} |
19 |
|
20 |
{% block content %} |
21 |
<style type="text/css"> |
22 |
th { |
23 |
text-align: right; |
24 |
padding-right: 0.5em; |
25 |
vertical-align: top; |
26 |
} |
27 |
|
28 |
.help { |
29 |
font-style: italic; |
30 |
|
31 |
} |
32 |
</style>
|
33 |
|
34 |
<div align="center"> |
35 |
{% if edit %} |
36 |
<h3>{% trans "Edit route" %}: {{form.data.name}}</h3> |
37 |
{% else %} |
38 |
<h3>{% trans "Apply for a new route" %}</h3> |
39 |
{% endif %} |
40 |
<form method="POST"> |
41 |
{% csrf_token %} |
42 |
{% if form.non_field_errors %} |
43 |
<p class="error">{{ form.non_field_errors|join:", "}}</p> |
44 |
{% endif %} |
45 |
|
46 |
<fieldset {% if %} style="display:none;" {% endif %}> |
47 |
<legend>{% trans "Route Basic Info" %}</legend> |
48 |
<table>
|
49 |
<tr><th>{{ form.name.label_tag }}</th><td>{{ form.name }}<span class="error">{{ form.name.errors|join:", " }}</span></td></tr> |
50 |
<tr class="help"><td></td><td>{{ form.name.help_text }}</td></tr> |
51 |
</table>
|
52 |
</fieldset>
|
53 |
|
54 |
<fieldset>
|
55 |
<legend>{% trans "Route Match Conditions" %}</legend> |
56 |
<table>
|
57 |
<tr><th>{{ form.source.label_tag }}</th><td>{{ form.source }}<span class="error">{{ form.source.errors|join:", " }}</span></td></tr> |
58 |
<tr class="help"><td></td><td>{{ form.source.help_text }}</td></tr> |
59 |
<tr><th>{{ form.sourceport.label_tag }}</th><td>{{ form.sourceport }}<span class="error">{{ form.sourceport.errors|join:", " }}</span></td></tr> |
60 |
<tr class="help"><td></td><td>{{ form.sourceport.help_text }}</td></tr> |
61 |
<tr><th>{{ form.destination.label_tag }}</th><td>{{ form.destination }}<span class="error">{{ form.destination.errors|join:", " }}</span></td></tr> |
62 |
<tr class="help"><td></td><td>{{ form.destination.help_text }}</td></tr> |
63 |
<tr><th>{{ form.destinationport.label_tag }}</th><td>{{ form.destinationport }}<span class="error">{{ form.destinationport.errors|join:", " }}</span></td></tr> |
64 |
<tr class="help"><td></td><td>{{ form.destinationport.help_text }}</td></tr> |
65 |
<tr><th>{{ form.port.label_tag }}</th><td>{{ form.port }}<span class="error">{{ form.port.errors|join:", " }}</span></td></tr> |
66 |
<tr class="help"><td></td><td>{{ form.port.help_text }}</td></tr> |
67 |
</table>
|
68 |
</fieldset>
|
69 |
<fieldset>
|
70 |
<legend>{% trans "Route Actions" %}</legend> |
71 |
<table>
|
72 |
<tr><th>{{ form.then.label_tag }}</th><td>{{ form.then }}<span class="error">{{ form.then.errors|join:", " }}</span></td></tr> |
73 |
<tr class="help"><td></td><td>{{ form.then.help_text }}</td></tr> |
74 |
</table>
|
75 |
</fieldset>
|
76 |
<fieldset>
|
77 |
<legend>{% trans "Use/Comments" %}</legend> |
78 |
{% blocktrans %} |
79 |
<p>Give a short description of the intended use of this route, that justifies the parameter selection above. Feel free to include any additional comments.</p> |
80 |
{% endblocktrans %} |
81 |
<p>{{ form.comments }}
|
82 |
{% if form.errors %}<br /><span class="error">{{ form.comments.errors|join:", " }}</span>{% endif %} |
83 |
</p>
|
84 |
</fieldset>
|
85 |
|
86 |
<p><input type="submit" value="{% trans "Apply" %}" /></p> |
87 |
</form>
|
88 |
</div>
|
89 |
|
90 |
{% endblock %} |