Revision e7725082 templates/apply.html
b/templates/apply.html | ||
---|---|---|
157 | 157 |
} |
158 | 158 |
</style> |
159 | 159 |
<div align="center"> |
160 |
{% if edit %} |
|
161 |
<h3>{% trans "Edit rule" %}: {{form.data.name}}</h3> |
|
162 |
{% else %} |
|
163 |
<h3>{% trans "Apply for a new rule" %}</h3> |
|
164 |
{% endif %} |
|
165 |
<form method="POST"> |
|
166 |
{% csrf_token %} |
|
167 |
{% load unescape %} |
|
168 |
{% if form.non_field_errors %} |
|
169 |
<p class="error">{{ form.non_field_errors|unescape}}</p> |
|
170 |
{% endif %} |
|
171 |
|
|
172 |
<fieldset {% if edit %} style="display:none;" {% endif %}> |
|
173 |
<legend>{% trans "Rule Basic Info" %}</legend> |
|
174 |
<table> |
|
175 |
<tr><th>{{ form.name.label_tag }}</th><td>{{ form.name }}<span class="error">{{ form.name.errors|join:", " }}</span></td></tr> |
|
176 |
<tr class="help"><td></td><td>A unique identifier will be added as a name_suffix</td></tr> |
|
177 |
</table> |
|
178 |
</fieldset> |
|
179 |
|
|
180 |
<fieldset> |
|
181 |
<legend>{% trans "Rule Match Conditions" %}</legend> |
|
182 |
<table> |
|
183 |
<input type="hidden" id="id_applier" name="applier" value="{{applier}}"/> |
|
184 |
<tr><th>{{ form.source.label_tag }}</th><td>{{ form.source }}<span class="error">{{ form.source.errors|join:", " }}</span></td></tr> |
|
185 |
<tr class="help"><td></td><td>{{ form.source.help_text }}</td></tr> |
|
186 |
<tr><th>{{ form.destination.label_tag }}</th><td>{{ form.destination }}<span class="error">{{ form.destination.errors|join:", " }}</span></td></tr> |
|
187 |
<tr class="help"><td></td><td>{{ form.destination.help_text }}</td></tr> |
|
188 |
</table> |
|
189 |
<div id='portsacc' style="width: 500px;"> |
|
190 |
<h3 style="padding: 0.5em 0.5em 0.5em 0.7em;">Advanced Settings (Ports)</h3> |
|
191 |
<div class='accord_wrapper' style="height: 100% !important;"> |
|
192 |
Select source/destination port(s), or select common port(s) for both source/destination |
|
193 |
<table> |
|
194 |
<tr><th>{{ form.sourceport.label_tag }}</th><td>{{ form.sourceport }} <button class="new_port">Port</button><span class="error">{{ form.sourceport.errors|join:", " }}</span></td></tr> |
|
195 |
<tr class="help"><td></td><td>{{ form.sourceport.help_text }}</td></tr> |
|
196 |
<tr><th>{{ form.destinationport.label_tag }}</th><td>{{ form.destinationport }} <button class="new_port">Port</button><span class="error">{{ form.destinationport.errors|join:", " }}</span></td></tr> |
|
197 |
<tr class="help"><td></td><td>{{ form.destinationport.help_text }}</td></tr> |
|
198 |
<tr><th>{{ form.port.label_tag }}</th><td>{{ form.port }} <button class="new_port">Port</button><span class="error">{{ form.port.errors|join:", " }}</span></td></tr> |
|
199 |
<tr class="help"><td></td><td>{{ form.port.help_text }}</td></tr> |
|
200 |
</div> |
|
201 |
</table> |
|
160 |
{% if edit %}<h3>{% trans "Edit rule" %}: {{form.data.name}}</h3> |
|
161 |
{% else %}<h3>{% trans "Apply for a new rule" %}</h3> |
|
162 |
{% endif %} |
|
163 |
<form method="POST"> |
|
164 |
{% csrf_token %} |
|
165 |
{% load unescape %} |
|
166 |
{% if form.non_field_errors %} |
|
167 |
<p class="error"> |
|
168 |
{{ form.non_field_errors|unescape}} |
|
169 |
</p> |
|
170 |
{% endif %} |
|
171 |
<fieldset {% if edit %} style="display:none;" {% endif %}> |
|
172 |
<legend> |
|
173 |
{% trans "Rule Basic Info" %} |
|
174 |
</legend> |
|
175 |
<table> |
|
176 |
<tr> |
|
177 |
<th> |
|
178 |
{{ form.name.label_tag }} |
|
179 |
</th> |
|
180 |
<td> |
|
181 |
{{ form.name }}<span class="error">{{ form.name.errors|join:", " }}</span> |
|
182 |
</td> |
|
183 |
</tr> |
|
184 |
<tr class="help"> |
|
185 |
<td> |
|
186 |
</td> |
|
187 |
<td> |
|
188 |
A unique identifier will be added as a name_suffix |
|
189 |
</td> |
|
190 |
</tr> |
|
191 |
</table> |
|
192 |
</fieldset> |
|
193 |
<fieldset> |
|
194 |
<legend> |
|
195 |
{% trans "Rule Match Conditions" %} |
|
196 |
</legend> |
|
197 |
<table> |
|
198 |
<input type="hidden" id="id_applier" name="applier" value="{{applier}}"/> |
|
199 |
<tr> |
|
200 |
<th> |
|
201 |
{{ form.source.label_tag }} |
|
202 |
</th> |
|
203 |
<td> |
|
204 |
{{ form.source }}<span class="error">{{ form.source.errors|join:", " }}</span> |
|
205 |
</td> |
|
206 |
</tr> |
|
207 |
<tr class="help"> |
|
208 |
<td> |
|
209 |
</td> |
|
210 |
<td> |
|
211 |
{{ form.source.help_text }} |
|
212 |
</td> |
|
213 |
</tr> |
|
214 |
<tr> |
|
215 |
<th> |
|
216 |
{{ form.destination.label_tag }} |
|
217 |
</th> |
|
218 |
<td> |
|
219 |
{{ form.destination }}<span class="error">{{ form.destination.errors|join:", " }}</span> |
|
220 |
</td> |
|
221 |
</tr> |
|
222 |
<tr class="help"> |
|
223 |
<td> |
|
224 |
</td> |
|
225 |
<td> |
|
226 |
{{ form.destination.help_text }} |
|
227 |
</td> |
|
228 |
</tr> |
|
229 |
</table> |
|
230 |
<div id='portsacc' style="width: 500px;"> |
|
231 |
<h3 style="padding: 0.5em 0.5em 0.5em 0.7em;">Advanced Settings (Ports)</h3> |
|
232 |
<div class='accord_wrapper' style="height: 100% !important;"> |
|
233 |
Select source/destination port(s), or select common port(s) for both source/destination |
|
234 |
<table> |
|
235 |
<tr> |
|
236 |
<th> |
|
237 |
{{ form.sourceport.label_tag }} |
|
238 |
</th> |
|
239 |
<td> |
|
240 |
{{ form.sourceport }} |
|
241 |
<button class="new_port"> |
|
242 |
Port |
|
243 |
</button> |
|
244 |
<span class="error">{{ form.sourceport.errors|join:", " }}</span> |
|
245 |
</td> |
|
246 |
</tr> |
|
247 |
<tr class="help"> |
|
248 |
<td> |
|
249 |
</td> |
|
250 |
<td> |
|
251 |
{{ form.sourceport.help_text }} |
|
252 |
</td> |
|
253 |
</tr> |
|
254 |
<tr> |
|
255 |
<th> |
|
256 |
{{ form.destinationport.label_tag }} |
|
257 |
</th> |
|
258 |
<td> |
|
259 |
{{ form.destinationport }} |
|
260 |
<button class="new_port"> |
|
261 |
Port |
|
262 |
</button> |
|
263 |
<span class="error">{{ form.destinationport.errors|join:", " }}</span> |
|
264 |
</td> |
|
265 |
</tr> |
|
266 |
<tr class="help"> |
|
267 |
<td> |
|
268 |
</td> |
|
269 |
<td> |
|
270 |
{{ form.destinationport.help_text }} |
|
271 |
</td> |
|
272 |
</tr> |
|
273 |
<tr> |
|
274 |
<th> |
|
275 |
{{ form.port.label_tag }} |
|
276 |
</th> |
|
277 |
<td> |
|
278 |
{{ form.port }} |
|
279 |
<button class="new_port"> |
|
280 |
Port |
|
281 |
</button> |
|
282 |
<span class="error">{{ form.port.errors|join:", " }}</span> |
|
283 |
</td> |
|
284 |
</tr> |
|
285 |
<tr class="help"> |
|
286 |
<td> |
|
287 |
</td> |
|
288 |
<td> |
|
289 |
{{ form.port.help_text }} |
|
290 |
</td> |
|
291 |
</tr> |
|
292 |
</div> |
|
293 |
</table> |
|
294 |
</div> |
|
295 |
</fieldset> |
|
296 |
<fieldset> |
|
297 |
<legend> |
|
298 |
{% trans "Rule Actions" %} |
|
299 |
</legend> |
|
300 |
<table> |
|
301 |
<tr> |
|
302 |
<th> |
|
303 |
{{ form.then.label_tag }} |
|
304 |
</th> |
|
305 |
<td> |
|
306 |
{{ form.then }} |
|
307 |
<button id="new_then_actions"> |
|
308 |
Rate-limit |
|
309 |
</button> |
|
310 |
<span class="error">{{ form.then.errors|join:", " }}</span> |
|
311 |
</td> |
|
312 |
</tr> |
|
313 |
</table> |
|
314 |
</fieldset> |
|
315 |
<fieldset> |
|
316 |
<legend> |
|
317 |
{% trans "Expiration" %} |
|
318 |
</legend> |
|
319 |
<table> |
|
320 |
<tr> |
|
321 |
<th> |
|
322 |
{{ form.expires.label_tag }} |
|
323 |
</th> |
|
324 |
<td> |
|
325 |
{{ form.expires }}<span class="error">{{ form.expires.errors|join:", " }}</span> |
|
326 |
</td> |
|
327 |
</tr> |
|
328 |
</table> |
|
329 |
</fieldset> |
|
330 |
<fieldset> |
|
331 |
<legend> |
|
332 |
{% trans "Use/Comments" %} |
|
333 |
</legend> |
|
334 |
{% blocktrans %} |
|
335 |
<p> |
|
336 |
Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments. |
|
337 |
</p> |
|
338 |
{% endblocktrans %} |
|
339 |
<p> |
|
340 |
{{ form.comments }} |
|
341 |
{% if form.errors %} |
|
342 |
<br/> |
|
343 |
<span class="error">{{ form.comments.errors|join:", " }}</span>{% endif %} |
|
344 |
</p> |
|
345 |
</fieldset> |
|
346 |
<p> |
|
347 |
<input type="submit" id="applybutton" value="{% trans "Apply" %}" /> |
|
348 |
</p> |
|
349 |
</form> |
|
202 | 350 |
</div> |
203 |
</fieldset> |
|
204 |
<fieldset> |
|
205 |
<legend>{% trans "Rule Actions" %}</legend> |
|
206 |
<table> |
|
207 |
<tr><th>{{ form.then.label_tag }}</th><td>{{ form.then }} <button id="new_then_actions">Rate-limit</button><span class="error">{{ form.then.errors|join:", " }}</span></td></tr> |
|
208 |
</table> |
|
209 |
</fieldset> |
|
210 |
<fieldset> |
|
211 |
<legend>{% trans "Expiration" %}</legend> |
|
212 |
<table> |
|
213 |
<tr><th>{{ form.expires.label_tag }}</th><td>{{ form.expires }}<span class="error">{{ form.expires.errors|join:", " }}</span></td></tr> |
|
214 |
</table> |
|
215 |
</fieldset> |
|
216 |
<fieldset> |
|
217 |
<legend>{% trans "Use/Comments" %}</legend> |
|
218 |
{% blocktrans %} |
|
219 |
<p>Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.</p> |
|
220 |
{% endblocktrans %} |
|
221 |
<p>{{ form.comments }} |
|
222 |
{% if form.errors %}<br /><span class="error">{{ form.comments.errors|join:", " }}</span>{% endif %} |
|
223 |
</p> |
|
224 |
</fieldset> |
|
225 |
|
|
226 |
<p><input type="submit" id="applybutton" value="{% trans "Apply" %}" /></p> |
|
227 |
</form> |
|
228 |
</div> |
|
229 |
|
|
230 | 351 |
<div id="then_diag" title="Add new rate-limit value"> |
231 | 352 |
</div> |
232 |
|
|
233 | 353 |
<div id="port_diag" title="Add new port"> |
234 | 354 |
</div> |
235 | 355 |
|
Also available in: Unified diff