Statistics
| Branch: | Tag: | Revision:

root / templates / apply.html @ 802dfff6

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