Revision 8a53465c templates/apply_set.html
b/templates/apply_set.html | ||
---|---|---|
17 | 17 |
{% endif %} |
18 | 18 |
{% endblock %} |
19 | 19 |
{% block extrahead %} |
20 |
<script type="text/javascript" src="/static/js/jquery.formset.js"></script> |
|
21 |
<script type="text/javascript"> |
|
22 |
$(function() { |
|
23 |
$('.formset_class').formset({ |
|
24 |
}); |
|
25 |
}) |
|
26 |
</script> |
|
20 | 27 |
<script> |
21 | 28 |
$(document).ready( function(){ |
22 |
|
|
29 |
//Initialize jquery formset |
|
30 |
|
|
23 | 31 |
$("#id_sourceport").css('width', '100px').attr('size', '5'); |
24 | 32 |
$("#id_port").css('width', '100px').attr('size', '5'); |
25 | 33 |
$("#id_destinationport").css('width', '100px').attr('size', '5'); |
... | ... | |
142 | 150 |
|
143 | 151 |
<style type="text/css"> |
144 | 152 |
th { |
145 |
text-align: right; |
|
146 | 153 |
padding-right: 0.5em; |
147 | 154 |
vertical-align: top; |
148 | 155 |
} |
... | ... | |
170 | 177 |
margin: 15px auto; |
171 | 178 |
position: relative; |
172 | 179 |
text-align: center; |
173 |
width: 800px;
|
|
180 |
/*width: 800px;*/
|
|
174 | 181 |
} |
175 | 182 |
|
176 | 183 |
#rule_form_container input:not([type="submit"]), #rule_form_container select { |
... | ... | |
203 | 210 |
background-color: #F9F9F9; |
204 | 211 |
border: 2px solid #FFFFFF; |
205 | 212 |
overflow: hidden; |
206 |
width: 800px;
|
|
213 |
/*width: 800px;*/
|
|
207 | 214 |
} |
208 | 215 |
#rule_form_container div label { |
209 | 216 |
color: #666666; |
... | ... | |
225 | 232 |
input { |
226 | 233 |
width:100px; |
227 | 234 |
} |
235 |
textarea{ |
|
236 |
height: 63px; |
|
237 |
width: 174px; |
|
238 |
} |
|
239 |
.delete-row{ |
|
240 |
background: url("/static/inline-delete.png") no-repeat scroll 0 50% transparent; |
|
241 |
outline: 0 none; |
|
242 |
padding-left: 16px; |
|
243 |
} |
|
228 | 244 |
|
229 |
|
|
245 |
.add-row { |
|
246 |
background: url("/static/icon_addlink.gif") no-repeat scroll 0 50% transparent; |
|
247 |
outline: 0 none; |
|
248 |
padding-left: 14px; |
|
249 |
} |
|
230 | 250 |
</style> |
231 | 251 |
{% endblock %} |
232 | 252 |
{% block content %} |
... | ... | |
237 | 257 |
{% csrf_token %} |
238 | 258 |
<table id="formset" class="form"> |
239 | 259 |
<thead><tr> |
240 |
<th>Name</th><th>Source</th><th>Destination</th><th>Then</th><th>Note</th>
|
|
260 |
<th align="center">Name</th><th>Source</th><th>Destination</th><th>Protocol</th><th>SrcPort</th><th>DstPort</th><th>Port</th><th>Then</th><th>Note</th>
|
|
241 | 261 |
</tr></thead> |
242 | 262 |
{% for form in formset.forms %} |
243 | 263 |
{{form.errors}} |
244 |
<tr> |
|
264 |
<tr class='formset_class'>
|
|
245 | 265 |
<td>{{ form.name }}</td> |
246 | 266 |
<td>{{ form.source }}</td> |
247 | 267 |
<td>{{ form.destination }}</td> |
268 |
<td>{{ form.protocol }}</td> |
|
269 |
<td>{{ form.sourceport }}</td> |
|
270 |
<td>{{ form.destinationport }}</td> |
|
271 |
<td>{{ form.port }}</td> |
|
248 | 272 |
<td>{{ form.then }}</td> |
249 | 273 |
<td>{{ form.comments }}</td> |
250 | 274 |
</tr> |
251 | 275 |
{% endfor %} |
252 | 276 |
</table> |
253 |
|
|
277 |
{{ formset.management_form }} |
|
254 | 278 |
<input type="submit" id="applybutton" value="{% trans "Apply" %}" /> |
255 | 279 |
</form> |
256 | 280 |
</div> |
Also available in: Unified diff