root / templates / apply.html @ e872bc30
History | View | Annotate | Download (14.3 kB)
1 | 064ecc91 | Leonidas Poulopoulos | {% extends "base.html" %} |
---|---|---|---|
2 | 064ecc91 | Leonidas Poulopoulos | {% load i18n %} |
3 | 97e42c7d | Leonidas Poulopoulos | |
4 | 3e99e2d1 | Leonidas Poulopoulos | {% block title %} |
5 | 3e99e2d1 | Leonidas Poulopoulos | {% if edit %} |
6 | 33e8f0b8 | Leonidas Poulopoulos | {% trans "Edit Rule" %} {{form.data.name}} |
7 | 3e99e2d1 | Leonidas Poulopoulos | {% else %} |
8 | 33e8f0b8 | Leonidas Poulopoulos | {% trans "Create new Rule" %} |
9 | 3e99e2d1 | Leonidas Poulopoulos | {% endif %} |
10 | 3e99e2d1 | Leonidas Poulopoulos | {% endblock %} |
11 | 3e99e2d1 | Leonidas Poulopoulos | |
12 | 62ee35d6 | Leonidas Poulopoulos | {% block breadcrumbs %} |
13 | 62ee35d6 | Leonidas Poulopoulos | <li class="active"><span class="divider">/</span> |
14 | 3e99e2d1 | Leonidas Poulopoulos | {% if edit %} |
15 | 33e8f0b8 | Leonidas Poulopoulos | {% trans "Edit rule" %} {{form.data.name}} |
16 | 3e99e2d1 | Leonidas Poulopoulos | {% else %} |
17 | 33e8f0b8 | Leonidas Poulopoulos | {% trans "Create rule" %} |
18 | 3e99e2d1 | Leonidas Poulopoulos | {% endif %} |
19 | 62ee35d6 | Leonidas Poulopoulos | </li>
|
20 | 62ee35d6 | Leonidas Poulopoulos | {% endblock %} |
21 | 97e42c7d | Leonidas Poulopoulos | {% block extrahead %} |
22 | 97e42c7d | Leonidas Poulopoulos | <script>
|
23 | 97e42c7d | Leonidas Poulopoulos | $(document).ready( function(){
|
24 | 97e42c7d | Leonidas Poulopoulos |
|
25 | 62ee35d6 | Leonidas Poulopoulos |
|
26 | 97e42c7d | Leonidas Poulopoulos | $('#id_then').attr("multiple", "");
|
27 | 052c14aa | Leonidas Poulopoulos | $( "#id_expires" ).datepicker({ dateFormat: 'yy-mm-dd' , maxDate: '+10d', minDate: '+1d', changeMonth: false, changeYear: false }).datepicker( $.datepicker.regional[ "el" ] );
|
28 | bea340d9 | Leonidas Poulopoulos | {% comment %}
|
29 | 97e42c7d | Leonidas Poulopoulos | $('#then_diag').dialog({
|
30 | 97e42c7d | Leonidas Poulopoulos | height: 220,
|
31 | 97e42c7d | Leonidas Poulopoulos | width: 340,
|
32 | 97e42c7d | Leonidas Poulopoulos | modal: true,
|
33 | 97e42c7d | Leonidas Poulopoulos | autoOpen: false,
|
34 | 97e42c7d | Leonidas Poulopoulos | buttons: {
|
35 | ab02d61c | Leonidas Poulopoulos | '{% trans "Add" %}': function() {
|
36 | 97e42c7d | Leonidas Poulopoulos | console.log($("#add_rl_form").serialize());
|
37 | 97e42c7d | Leonidas Poulopoulos | $.ajax({
|
38 | 97e42c7d | Leonidas Poulopoulos | url:"{% url add-rate-limit %}",
|
39 | 97e42c7d | Leonidas Poulopoulos | data:$("#add_rl_form").serialize(),
|
40 | 97e42c7d | Leonidas Poulopoulos | type: "POST",
|
41 | 97e42c7d | Leonidas Poulopoulos | cache: false,
|
42 | 97e42c7d | Leonidas Poulopoulos | success:function(data){
|
43 | 97e42c7d | Leonidas Poulopoulos | try {
|
44 | 97e42c7d | Leonidas Poulopoulos | value = data.pk;
|
45 | 97e42c7d | Leonidas Poulopoulos | text = data.value;
|
46 | 97e42c7d | Leonidas Poulopoulos | $('#id_then').append($("<option></option>").attr("value",value).text(text));
|
47 | 97e42c7d | Leonidas Poulopoulos | $('#then_diag').dialog('close');
|
48 | 97e42c7d | Leonidas Poulopoulos | }
|
49 | 97e42c7d | Leonidas Poulopoulos | catch (exception) {
|
50 | 97e42c7d | Leonidas Poulopoulos | $('#then_diag').html(data);
|
51 | 97e42c7d | Leonidas Poulopoulos | }
|
52 | 97e42c7d | Leonidas Poulopoulos | }
|
53 | 97e42c7d | Leonidas Poulopoulos | });
|
54 | 97e42c7d | Leonidas Poulopoulos | },
|
55 | ab02d61c | Leonidas Poulopoulos | '{% trans "Cancel" %}': function() {
|
56 | 97e42c7d | Leonidas Poulopoulos | $('#then_diag').dialog('close');
|
57 | 97e42c7d | Leonidas Poulopoulos | }
|
58 | 97e42c7d | Leonidas Poulopoulos | }
|
59 | 97e42c7d | Leonidas Poulopoulos | });
|
60 | 6663a783 | Leonidas Poulopoulos | {% endcomment %}
|
61 | 97e42c7d | Leonidas Poulopoulos | $('#port_diag').dialog({
|
62 | 97e42c7d | Leonidas Poulopoulos | height: 220,
|
63 | 97e42c7d | Leonidas Poulopoulos | width: 340,
|
64 | 97e42c7d | Leonidas Poulopoulos | modal: true,
|
65 | 97e42c7d | Leonidas Poulopoulos | autoOpen: false,
|
66 | 97e42c7d | Leonidas Poulopoulos | buttons: {
|
67 | ab02d61c | Leonidas Poulopoulos | '{% trans "Add" %}': function() {
|
68 | 97e42c7d | Leonidas Poulopoulos | $.ajax({
|
69 | 97e42c7d | Leonidas Poulopoulos | url:"{% url add-port %}",
|
70 | 97e42c7d | Leonidas Poulopoulos | data:$("#add_port_form").serialize(),
|
71 | 97e42c7d | Leonidas Poulopoulos | type: "POST",
|
72 | 97e42c7d | Leonidas Poulopoulos | cache: false,
|
73 | 97e42c7d | Leonidas Poulopoulos | success:function(data){
|
74 | 62ee35d6 | Leonidas Poulopoulos | console.log(data);
|
75 | 97e42c7d | Leonidas Poulopoulos | try {
|
76 | 97e42c7d | Leonidas Poulopoulos | value = data.value;
|
77 | 97e42c7d | Leonidas Poulopoulos | text = data.text;
|
78 | 62ee35d6 | Leonidas Poulopoulos | console.log(text, value);
|
79 | 62ee35d6 | Leonidas Poulopoulos | if (typeof value === 'undefined' && typeof text === 'undefined'){
|
80 | 62ee35d6 | Leonidas Poulopoulos | $('#port_diag').html(data);
|
81 | 62ee35d6 | Leonidas Poulopoulos | }
|
82 | 62ee35d6 | Leonidas Poulopoulos | else{
|
83 | 62ee35d6 | Leonidas Poulopoulos | $('#id_port').append($("<option></option>").attr("value",value).text(text));
|
84 | 62ee35d6 | Leonidas Poulopoulos | $('#id_destinationport').append($("<option></option>").attr("value",value).text(text));
|
85 | 62ee35d6 | Leonidas Poulopoulos | $('#id_sourceport').append($("<option></option>").attr("value",value).text(text));
|
86 | 62ee35d6 | Leonidas Poulopoulos | $('#port_diag').dialog('close');
|
87 | 62ee35d6 | Leonidas Poulopoulos | }
|
88 | 97e42c7d | Leonidas Poulopoulos | }
|
89 | 97e42c7d | Leonidas Poulopoulos | catch (exception) {
|
90 | 97e42c7d | Leonidas Poulopoulos | $('#port_diag').html(data);
|
91 | 97e42c7d | Leonidas Poulopoulos | }
|
92 | 97e42c7d | Leonidas Poulopoulos | }
|
93 | 97e42c7d | Leonidas Poulopoulos | });
|
94 | 97e42c7d | Leonidas Poulopoulos | },
|
95 | ab02d61c | Leonidas Poulopoulos | '{% trans "Cancel" %}': function() {
|
96 | 97e42c7d | Leonidas Poulopoulos | $('#port_diag').dialog('close');
|
97 | 97e42c7d | Leonidas Poulopoulos | }
|
98 | 97e42c7d | Leonidas Poulopoulos | }
|
99 | 97e42c7d | Leonidas Poulopoulos | });
|
100 | 97e42c7d | Leonidas Poulopoulos |
|
101 | 138e4e37 | Leonidas Poulopoulos | {% comment %}
|
102 | 97e42c7d | Leonidas Poulopoulos | $("#new_then_actions").button({
|
103 | 97e42c7d | Leonidas Poulopoulos | icons: {
|
104 | 97e42c7d | Leonidas Poulopoulos | primary: "ui-icon-plusthick"
|
105 | 97e42c7d | Leonidas Poulopoulos | },
|
106 | 97e42c7d | Leonidas Poulopoulos | })
|
107 | 97e42c7d | Leonidas Poulopoulos | .click(function(){
|
108 | 97e42c7d | Leonidas Poulopoulos | $.ajax({
|
109 | 97e42c7d | Leonidas Poulopoulos | url: "{% url add-rate-limit %}",
|
110 | 97e42c7d | Leonidas Poulopoulos | cache: false,
|
111 | 97e42c7d | Leonidas Poulopoulos | success: function(data){
|
112 | 97e42c7d | Leonidas Poulopoulos | $("#then_diag").html(data);
|
113 | 97e42c7d | Leonidas Poulopoulos | }
|
114 | 97e42c7d | Leonidas Poulopoulos | });
|
115 | 97e42c7d | Leonidas Poulopoulos | $('#then_diag').dialog('open');
|
116 | 97e42c7d | Leonidas Poulopoulos | return false;
|
117 | 97e42c7d | Leonidas Poulopoulos | });
|
118 | 97e42c7d | Leonidas Poulopoulos |
|
119 | 138e4e37 | Leonidas Poulopoulos | {% endcomment %}
|
120 | 62ee35d6 | Leonidas Poulopoulos | $(".new_port").button()
|
121 | 97e42c7d | Leonidas Poulopoulos | .click(function(){
|
122 | 97e42c7d | Leonidas Poulopoulos | $.ajax({
|
123 | 97e42c7d | Leonidas Poulopoulos | url: "{% url add-port %}",
|
124 | 97e42c7d | Leonidas Poulopoulos | cache: false,
|
125 | 97e42c7d | Leonidas Poulopoulos | success: function(data){
|
126 | 97e42c7d | Leonidas Poulopoulos | $("#port_diag").html(data);
|
127 | 97e42c7d | Leonidas Poulopoulos | }
|
128 | 97e42c7d | Leonidas Poulopoulos | });
|
129 | 97e42c7d | Leonidas Poulopoulos | $('#port_diag').dialog('open');
|
130 | 97e42c7d | Leonidas Poulopoulos | return false;
|
131 | 97e42c7d | Leonidas Poulopoulos | });
|
132 | 62ee35d6 | Leonidas Poulopoulos | });
|
133 | 97e42c7d | Leonidas Poulopoulos | |
134 | 97e42c7d | Leonidas Poulopoulos | </script>
|
135 | 97e42c7d | Leonidas Poulopoulos | {% endblock %} |
136 | 064ecc91 | Leonidas Poulopoulos | {% block content %} |
137 | 064ecc91 | Leonidas Poulopoulos | <style type="text/css"> |
138 | 7b50e98b | Leonidas Poulopoulos | |
139 | 064ecc91 | Leonidas Poulopoulos | |
140 | a14f0140 | Leonidas Poulopoulos | |
141 | a14f0140 | Leonidas Poulopoulos | #rule_form_container input:not([type="submit"]), #rule_form_container select { |
142 | a14f0140 | Leonidas Poulopoulos | background: none repeat scroll 0 0 #FFFFFF; |
143 | a14f0140 | Leonidas Poulopoulos | border: 1px solid #DDDDDD; |
144 | b7a29549 | Leonidas Poulopoulos | -moz-border-radius: 3px; border-radius:3px; -webkit-border-radius: 3px; |
145 | a14f0140 | Leonidas Poulopoulos | float: left; |
146 | a14f0140 | Leonidas Poulopoulos | font-family: "Century Gothic",Helvetica,sans-serif; |
147 | a14f0140 | Leonidas Poulopoulos | font-size: 13px; |
148 | a14f0140 | Leonidas Poulopoulos | outline: medium none; |
149 | a14f0140 | Leonidas Poulopoulos | padding: 5px; |
150 | a14f0140 | Leonidas Poulopoulos | width: 180px; |
151 | a14f0140 | Leonidas Poulopoulos | } |
152 | a14f0140 | Leonidas Poulopoulos | |
153 | a14f0140 | Leonidas Poulopoulos | |
154 | a14f0140 | Leonidas Poulopoulos | #rule_form_container{ |
155 | b7a29549 | Leonidas Poulopoulos | -moz-border-radius: 10px 10px 10px 10px; border-radius:10px; -webkit-border-radius: 10px; |
156 | b7a29549 | Leonidas Poulopoulos | -moz-box-shadow: 0 0 3px #AAAAAA; box-shadow: 0 0 3px #AAAAAA; -webkit-box-shadow: 0 0 3px #AAAAAA; |
157 | b7a29549 | Leonidas Poulopoulos | background-color: #F9F9F9; |
158 | b7a29549 | Leonidas Poulopoulos | border: 2px solid #FFFFFF; |
159 | b7a29549 | Leonidas Poulopoulos | overflow: hidden; |
160 | a14f0140 | Leonidas Poulopoulos | width: 800px; |
161 | a14f0140 | Leonidas Poulopoulos | } |
162 | a14f0140 | Leonidas Poulopoulos | #rule_form_container div label { |
163 | a14f0140 | Leonidas Poulopoulos | color: #666666; |
164 | a14f0140 | Leonidas Poulopoulos | float: left; |
165 | a14f0140 | Leonidas Poulopoulos | font-family: "Century Gothic",Helvetica,sans-serif; |
166 | a14f0140 | Leonidas Poulopoulos | font-size: 15px; |
167 | a14f0140 | Leonidas Poulopoulos | font-weight: bold; |
168 | a14f0140 | Leonidas Poulopoulos | line-height: 26px; |
169 | a14f0140 | Leonidas Poulopoulos | margin-right: 15px; |
170 | a14f0140 | Leonidas Poulopoulos | text-align: right; |
171 | a14f0140 | Leonidas Poulopoulos | text-shadow: 1px 1px 1px #FFFFFF; |
172 | a14f0140 | Leonidas Poulopoulos | width: 180px; |
173 | a14f0140 | Leonidas Poulopoulos | } |
174 | a14f0140 | Leonidas Poulopoulos | #rule_form_container p.submit { |
175 | a14f0140 | Leonidas Poulopoulos | background: none repeat scroll 0 0 transparent; |
176 | a14f0140 | Leonidas Poulopoulos | border: medium none; |
177 | a14f0140 | Leonidas Poulopoulos | box-shadow: none; |
178 | a14f0140 | Leonidas Poulopoulos | } |
179 | a14f0140 | Leonidas Poulopoulos | |
180 | 064ecc91 | Leonidas Poulopoulos | </style>
|
181 | 62ee35d6 | Leonidas Poulopoulos | <div id="rule_form_wrapper" class="container"> |
182 | 62ee35d6 | Leonidas Poulopoulos | {% if edit %}<h4>{% trans "Edit rule" %}: {{form.data.name}}</h4> |
183 | 62ee35d6 | Leonidas Poulopoulos | {% else %}<h4>{% trans "Apply for a new rule" %}</h4> |
184 | e7725082 | Leonidas Poulopoulos | {% endif %} |
185 | bbc3e0ab | Leonidas Poulopoulos | <hr>
|
186 | bbc3e0ab | Leonidas Poulopoulos | <br>
|
187 | 62ee35d6 | Leonidas Poulopoulos | <form method="POST" class="form-horizontal"> |
188 | 62ee35d6 | Leonidas Poulopoulos | |
189 | a14f0140 | Leonidas Poulopoulos | {% csrf_token %} |
190 | a14f0140 | Leonidas Poulopoulos | {% load unescape %} |
191 | a14f0140 | Leonidas Poulopoulos | {% if form.non_field_errors %} |
192 | a14f0140 | Leonidas Poulopoulos | <p class="error"> |
193 | a14f0140 | Leonidas Poulopoulos | {{ form.non_field_errors|unescape}} |
194 | a14f0140 | Leonidas Poulopoulos | </p>
|
195 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
196 | a14f0140 | Leonidas Poulopoulos | <fieldset {% if %} style="display:none;" {% endif %}> |
197 | a14f0140 | Leonidas Poulopoulos | <legend>
|
198 | a14f0140 | Leonidas Poulopoulos | {% trans "Rule Basic Info" %} |
199 | a14f0140 | Leonidas Poulopoulos | </legend>
|
200 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.name.errors %} error {% endif %}"> |
201 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_name">{% trans "Name" %}</label> |
202 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
203 | 62ee35d6 | Leonidas Poulopoulos | {{ form.name }} |
204 | a14f0140 | Leonidas Poulopoulos | {% if form.name.errors %} |
205 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
206 | a14f0140 | Leonidas Poulopoulos | {{ form.name.errors|join:", " }} |
207 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
208 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
209 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">A unique identifier will be added as a name_suffix</span> |
210 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
211 | a14f0140 | Leonidas Poulopoulos | </div>
|
212 | a14f0140 | Leonidas Poulopoulos | </fieldset>
|
213 | 88a6afb7 | Leonidas Poulopoulos | {% if user.is_superuser %} |
214 | 88a6afb7 | Leonidas Poulopoulos | <fieldset>
|
215 | 88a6afb7 | Leonidas Poulopoulos | <legend>
|
216 | 88a6afb7 | Leonidas Poulopoulos | {% trans "Admin Options" %} |
217 | 88a6afb7 | Leonidas Poulopoulos | </legend>
|
218 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group"> |
219 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_applier">{% trans "Applier" %}</label> |
220 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls">{{ form.applier }}</div> |
221 | 88a6afb7 | Leonidas Poulopoulos | {% if form.applier.errors %} |
222 | 88a6afb7 | Leonidas Poulopoulos | <br>
|
223 | 88a6afb7 | Leonidas Poulopoulos | <p class="error" style="clear:both;"> |
224 | 88a6afb7 | Leonidas Poulopoulos | {{ form.applier.errors|join:", " }} |
225 | 88a6afb7 | Leonidas Poulopoulos | </p>
|
226 | 88a6afb7 | Leonidas Poulopoulos | {% endif %} |
227 | 88a6afb7 | Leonidas Poulopoulos | </div>
|
228 | 88a6afb7 | Leonidas Poulopoulos | </fieldset>
|
229 | 88a6afb7 | Leonidas Poulopoulos | {% else %} |
230 | 88a6afb7 | Leonidas Poulopoulos | <input type="hidden" id="id_applier" name="applier" value="{{applier}}"/> |
231 | 88a6afb7 | Leonidas Poulopoulos | {% endif %} |
232 | a14f0140 | Leonidas Poulopoulos | <fieldset>
|
233 | a14f0140 | Leonidas Poulopoulos | <legend>
|
234 | a14f0140 | Leonidas Poulopoulos | {% trans "Rule Match Conditions" %} |
235 | a14f0140 | Leonidas Poulopoulos | </legend>
|
236 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.source.errors %} error {% endif %}"> |
237 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_source">{% trans "Source Address" %}</label> |
238 | 548848ba | Leonidas Poulopoulos | <div class="controls">{{ form.source }} <img src="/fodstatic/threat_source.png" style="height: 30px;"/> |
239 | 62ee35d6 | Leonidas Poulopoulos | {% if form.source.errors %} |
240 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
241 | a14f0140 | Leonidas Poulopoulos | {{ form.source.errors|join:", " }} |
242 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
243 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
244 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block"> {{ form.source.help_text }}</span> |
245 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
246 | 62ee35d6 | Leonidas Poulopoulos | |
247 | 62ee35d6 | Leonidas Poulopoulos | |
248 | a14f0140 | Leonidas Poulopoulos | </div>
|
249 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.destination.errors %} error {% endif %}"> |
250 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_destination">{% trans "Destination Address" %}</label> |
251 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
252 | 548848ba | Leonidas Poulopoulos | {{ form.destination }} <img src="/fodstatic/secure_destination.png" style="height: 30px;"/> |
253 | 62ee35d6 | Leonidas Poulopoulos | {% if form.destination.errors %} |
254 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
255 | a14f0140 | Leonidas Poulopoulos | {{ form.destination.errors|join:", " }} |
256 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
257 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
258 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">{{ form.destination.help_text }}</span> |
259 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
260 | 62ee35d6 | Leonidas Poulopoulos | |
261 | a14f0140 | Leonidas Poulopoulos | </div>
|
262 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.protocol.errors %} error {% endif %}"> |
263 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_protocol">{% trans "Protocol" %}</label> |
264 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls">{{ form.protocol }} |
265 | 62ee35d6 | Leonidas Poulopoulos | {% if form.protocol.errors %} |
266 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
267 | 7fac6521 | Leonidas Poulopoulos | {{ form.protocol.errors|join:", " }} |
268 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
269 | 7fac6521 | Leonidas Poulopoulos | {% endif %} |
270 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
271 | 62ee35d6 | Leonidas Poulopoulos | |
272 | 7fac6521 | Leonidas Poulopoulos | </div>
|
273 | 62ee35d6 | Leonidas Poulopoulos | <div
|
274 | 62ee35d6 | Leonidas Poulopoulos | class="control-group {% if form.port.errors %} error {% endif %}"> |
275 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_port">{% trans "Ports" %}</label> |
276 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
277 | 62ee35d6 | Leonidas Poulopoulos | <div id="portsaccordion" class="accordion"> |
278 | 62ee35d6 | Leonidas Poulopoulos | <div class="accordion-group"> |
279 | 62ee35d6 | Leonidas Poulopoulos | <div class="accordion-heading"> |
280 | 62ee35d6 | Leonidas Poulopoulos | <a class="accordion-toggle" data-toggle="collapse" |
281 | 62ee35d6 | Leonidas Poulopoulos | data-parent="#accordion2" href="#collapseOne"> {% trans "Advanced Settings (Ports)" %}</a> |
282 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
283 | 62ee35d6 | Leonidas Poulopoulos | <div id="collapseOne" class="accordion-body collapse"> |
284 | 62ee35d6 | Leonidas Poulopoulos | <div class="accordion-inner"> |
285 | 62ee35d6 | Leonidas Poulopoulos | <label>{% trans "Select source/destination port(s), or select common port(s) for both source/destination" %}</label> |
286 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.sourceport.errors %} error {% endif %}"> |
287 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_sourceport">{% trans "Source Port" %}</label> |
288 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
289 | 62ee35d6 | Leonidas Poulopoulos | {{ form.sourceport }} |
290 | 62ee35d6 | Leonidas Poulopoulos | |
291 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
292 | 62ee35d6 | Leonidas Poulopoulos | <button class="new_port btn btn-small"><i class="icon-plus"></i>{% trans "Port" %}</button> |
293 | 62ee35d6 | Leonidas Poulopoulos | {% if form.sourceport.errors %} |
294 | 62ee35d6 | Leonidas Poulopoulos | {{ form.sourceport.errors|join:", " }} |
295 | 62ee35d6 | Leonidas Poulopoulos | {% endif %} |
296 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
297 | 62ee35d6 | Leonidas Poulopoulos | |
298 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">{{ form.sourceport.help_text }}</span> |
299 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
300 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
301 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.destinationport.errors %} error {% endif %}"> |
302 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_destinationport">{% trans "Destination Port" %}</label> |
303 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
304 | 62ee35d6 | Leonidas Poulopoulos | {{ form.destinationport }} |
305 | 62ee35d6 | Leonidas Poulopoulos | |
306 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
307 | 62ee35d6 | Leonidas Poulopoulos | <button class="new_port btn btn-small"><i class="icon-plus"></i>{% trans "Port" %}</button> |
308 | 62ee35d6 | Leonidas Poulopoulos | {% if form.destinationport.errors %} |
309 | 62ee35d6 | Leonidas Poulopoulos | {{ form.destinationport.errors|join:", " }} |
310 | 62ee35d6 | Leonidas Poulopoulos | {% endif %} |
311 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
312 | 62ee35d6 | Leonidas Poulopoulos | |
313 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">{{ form.destinationport.help_text }}</span> |
314 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
315 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
316 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.port.errors %} error {% endif %}"> |
317 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_port">{% trans "Port" %}</label> |
318 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
319 | 62ee35d6 | Leonidas Poulopoulos | {{ form.port }} |
320 | 62ee35d6 | Leonidas Poulopoulos | |
321 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
322 | 62ee35d6 | Leonidas Poulopoulos | <button class="new_port btn btn-small"><i class="icon-plus"></i>{% trans "Port" %}</button> |
323 | 62ee35d6 | Leonidas Poulopoulos | {% if form.port.errors %} |
324 | 62ee35d6 | Leonidas Poulopoulos | {{ form.port.errors|join:", " }} |
325 | 62ee35d6 | Leonidas Poulopoulos | {% endif %} |
326 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
327 | 62ee35d6 | Leonidas Poulopoulos | |
328 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">{{ form.port.help_text }}</span> |
329 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
330 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
331 | 62ee35d6 | Leonidas Poulopoulos | |
332 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
333 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
334 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
335 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
336 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
337 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
338 | 62ee35d6 | Leonidas Poulopoulos | |
339 | 62ee35d6 | Leonidas Poulopoulos | </fieldset>
|
340 | a14f0140 | Leonidas Poulopoulos | <fieldset>
|
341 | a14f0140 | Leonidas Poulopoulos | <legend>
|
342 | a14f0140 | Leonidas Poulopoulos | {% trans "Rule Actions" %} |
343 | a14f0140 | Leonidas Poulopoulos | </legend>
|
344 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.then.errors %} error {% endif %}"> |
345 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_then">{% trans "Then" %}</label> |
346 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls">{{ form.then }} |
347 | a14f0140 | Leonidas Poulopoulos | {% if form.then.errors %} |
348 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
349 | a14f0140 | Leonidas Poulopoulos | {{ form.then.errors|join:", " }} |
350 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
351 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
352 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
353 | 62ee35d6 | Leonidas Poulopoulos | {% comment %} |
354 | 62ee35d6 | Leonidas Poulopoulos | <button id="new_then_actions"> |
355 | 62ee35d6 | Leonidas Poulopoulos | Rate-limit |
356 | 62ee35d6 | Leonidas Poulopoulos | </button>
|
357 | 62ee35d6 | Leonidas Poulopoulos | {% endcomment %} |
358 | 62ee35d6 | Leonidas Poulopoulos | |
359 | a14f0140 | Leonidas Poulopoulos | </div>
|
360 | a14f0140 | Leonidas Poulopoulos | </fieldset>
|
361 | a14f0140 | Leonidas Poulopoulos | <fieldset>
|
362 | a14f0140 | Leonidas Poulopoulos | <legend>
|
363 | a14f0140 | Leonidas Poulopoulos | {% trans "Expiration" %} |
364 | a14f0140 | Leonidas Poulopoulos | </legend>
|
365 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.expires.errors %} error {% endif %}"> |
366 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_expires">{% trans "Expires" %}</label> |
367 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls">{{ form.expires }} |
368 | a14f0140 | Leonidas Poulopoulos | {% if form.expires.errors %} |
369 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
370 | a14f0140 | Leonidas Poulopoulos | {{ form.expires.errors|join:", " }} |
371 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
372 | a14f0140 | Leonidas Poulopoulos | {% endif %} |
373 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
374 | a14f0140 | Leonidas Poulopoulos | </div>
|
375 | a14f0140 | Leonidas Poulopoulos | </fieldset>
|
376 | a14f0140 | Leonidas Poulopoulos | <fieldset>
|
377 | 62ee35d6 | Leonidas Poulopoulos | |
378 | 62ee35d6 | Leonidas Poulopoulos | <legend>
|
379 | a14f0140 | Leonidas Poulopoulos | {% trans "Use/Comments" %} |
380 | a14f0140 | Leonidas Poulopoulos | </legend>
|
381 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group {% if form.comments.errors %} error {% endif %}"> |
382 | 62ee35d6 | Leonidas Poulopoulos | <label class="control-label" for="id_comments">{% trans "Comments" %}</label> |
383 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
384 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-block">{% blocktrans %}Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.{% endblocktrans %}</span> |
385 | a14f0140 | Leonidas Poulopoulos | {{ form.comments }} |
386 | 62ee35d6 | Leonidas Poulopoulos | |
387 | 62ee35d6 | Leonidas Poulopoulos | {% if form.comments.errors %} |
388 | 62ee35d6 | Leonidas Poulopoulos | <span class="help-inline"> |
389 | 62ee35d6 | Leonidas Poulopoulos | {{ form.comments.errors|join:", " }} |
390 | 62ee35d6 | Leonidas Poulopoulos | </span>
|
391 | 62ee35d6 | Leonidas Poulopoulos | {% endif %} |
392 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
393 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
394 | 62ee35d6 | Leonidas Poulopoulos | |
395 | a14f0140 | Leonidas Poulopoulos | </fieldset>
|
396 | 62ee35d6 | Leonidas Poulopoulos | <div class="control-group"> |
397 | 62ee35d6 | Leonidas Poulopoulos | <div class="controls"> |
398 | 9f012dae | Leonidas Poulopoulos | <button type="submit" id="applybutton" value="{% trans 'Apply' %}" class="btn btn-large btn-primary"/>Apply</button> |
399 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
400 | 62ee35d6 | Leonidas Poulopoulos | </div>
|
401 | 62ee35d6 | Leonidas Poulopoulos | |
402 | 62ee35d6 | Leonidas Poulopoulos | |
403 | e7725082 | Leonidas Poulopoulos | </form>
|
404 | 7b50e98b | Leonidas Poulopoulos | </div>
|
405 | 97e42c7d | Leonidas Poulopoulos | <div id="then_diag" title="Add new rate-limit value"> |
406 | 97e42c7d | Leonidas Poulopoulos | </div>
|
407 | ab02d61c | Leonidas Poulopoulos | <div id="port_diag" title="{% trans "Add port" %}"> |
408 | 97e42c7d | Leonidas Poulopoulos | </div>
|
409 | 97e42c7d | Leonidas Poulopoulos | |
410 | 064ecc91 | Leonidas Poulopoulos | {% endblock %} |