apply.html 3 KB
Newer Older
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
1 2
{% extends "base.html" %}
{% load i18n %}
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
	
{% block title %}
	{% if edit %}
		{% trans "Edit Route" %} {{form.data.name}}
	{% else %}
		{% trans "Create new Route" %}
	{% endif %}
{% endblock %}

{% block breadcrumbs %}:: 
	{% if edit %}
		{% trans "Edit route" %} {{form.data.name}}
	{% else %}
	{% trans "Create route" %}
	{% endif %}
		{% endblock %}

Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
{% block content %}
<style type="text/css">
th {
	text-align: right;
	padding-right: 0.5em;
	vertical-align: top;
}

.help {
	font-style: italic;

}
</style>

<div align="center">
35 36 37
	{% if edit %}
	<h3>{% trans "Edit route" %}: {{form.data.name}}</h3>
	{% else %}
38
<h3>{% trans "Apply for a new route" %}</h3>
39
{% endif %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
40 41
<form method="POST">
{% csrf_token %}
42 43 44
{% if form.non_field_errors %}
<p class="error">{{ form.non_field_errors|join:", "}}</p>
{% endif %}
45 46

<fieldset {% if edit %} style="display:none;" {% endif %}>
47
	<legend>{% trans "Route Basic Info" %}</legend>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
48
<table>
49 50
<tr><th>{{ form.name.label_tag }}</th><td>{{ form.name }}<span class="error">{{ form.name.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.name.help_text }}</td></tr>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
51 52 53 54
</table>
</fieldset>

<fieldset>
55 56 57 58 59 60 61 62 63 64 65 66 67
<legend>{% trans "Route Match Conditions" %}</legend>
<table>
<tr><th>{{ form.source.label_tag }}</th><td>{{ form.source }}<span class="error">{{ form.source.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.source.help_text }}</td></tr>
<tr><th>{{ form.sourceport.label_tag }}</th><td>{{ form.sourceport }}<span class="error">{{ form.sourceport.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.sourceport.help_text }}</td></tr>
<tr><th>{{ form.destination.label_tag }}</th><td>{{ form.destination }}<span class="error">{{ form.destination.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.destination.help_text }}</td></tr>
<tr><th>{{ form.destinationport.label_tag }}</th><td>{{ form.destinationport }}<span class="error">{{ form.destinationport.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.destinationport.help_text }}</td></tr>
<tr><th>{{ form.port.label_tag }}</th><td>{{ form.port }}<span class="error">{{ form.port.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.port.help_text }}</td></tr>
</table>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
68 69
</fieldset>
<fieldset>
70
<legend>{% trans "Route Actions" %}</legend>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
71
<table>
72 73
<tr><th>{{ form.then.label_tag }}</th><td>{{ form.then }}<span class="error">{{ form.then.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>{{ form.then.help_text }}</td></tr>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
74 75 76
</table>
</fieldset>
<fieldset>
77
<legend>{% trans "Use/Comments" %}</legend>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
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>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
80
{% endblocktrans %}
81 82
<p>{{ form.comments }}
{% if form.errors %}<br /><span class="error">{{ form.comments.errors|join:", " }}</span>{% endif %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
83 84 85 86 87 88
</p>
</fieldset>

<p><input type="submit" value="{% trans "Apply" %}" /></p>
</form>
</div>
89

Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
90
{% endblock %}