Commit 802dfff6 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added an Any button to source address

parent e872bc30
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
$(document).ready( function(){ $(document).ready( function(){
$('#setFromAll').click(function(){
$("#id_source").val('0.0.0.0/32');
return false;
});
$('#id_then').attr("multiple", ""); $('#id_then').attr("multiple", "");
$( "#id_expires" ).datepicker({ dateFormat: 'yy-mm-dd' , maxDate: '+10d', minDate: '+1d', changeMonth: false, changeYear: false }).datepicker( $.datepicker.regional[ "el" ] ); $( "#id_expires" ).datepicker({ dateFormat: 'yy-mm-dd' , maxDate: '+10d', minDate: '+1d', changeMonth: false, changeYear: false }).datepicker( $.datepicker.regional[ "el" ] );
{% comment %} {% comment %}
...@@ -198,7 +204,7 @@ ...@@ -198,7 +204,7 @@
{% trans "Rule Basic Info" %} {% trans "Rule Basic Info" %}
</legend> </legend>
<div class="control-group {% if form.name.errors %} error {% endif %}"> <div class="control-group {% if form.name.errors %} error {% endif %}">
<label class="control-label" for="id_name">{% trans "Name" %}</label> <label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label>
<div class="controls"> <div class="controls">
{{ form.name }} {{ form.name }}
{% if form.name.errors %} {% if form.name.errors %}
...@@ -216,7 +222,7 @@ ...@@ -216,7 +222,7 @@
{% trans "Admin Options" %} {% trans "Admin Options" %}
</legend> </legend>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="id_applier">{% trans "Applier" %}</label> <label class="control-label" for="id_applier"><b>{% trans "Applier" %}</b></label>
<div class="controls">{{ form.applier }}</div> <div class="controls">{{ form.applier }}</div>
{% if form.applier.errors %} {% if form.applier.errors %}
<br> <br>
...@@ -234,8 +240,8 @@ ...@@ -234,8 +240,8 @@
{% trans "Rule Match Conditions" %} {% trans "Rule Match Conditions" %}
</legend> </legend>
<div class="control-group {% if form.source.errors %} error {% endif %}"> <div class="control-group {% if form.source.errors %} error {% endif %}">
<label class="control-label" for="id_source">{% trans "Source Address" %}</label> <label class="control-label" for="id_source"><b>{% trans "Source Address" %}</b></label>
<div class="controls">{{ form.source }}&nbsp;<img src="/fodstatic/threat_source.png" style="height: 30px;"/> <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>
{% if form.source.errors %} {% if form.source.errors %}
<span class="help-inline"> <span class="help-inline">
{{ form.source.errors|join:", " }} {{ form.source.errors|join:", " }}
...@@ -247,7 +253,7 @@ ...@@ -247,7 +253,7 @@
</div> </div>
<div class="control-group {% if form.destination.errors %} error {% endif %}"> <div class="control-group {% if form.destination.errors %} error {% endif %}">
<label class="control-label" for="id_destination">{% trans "Destination Address" %}</label> <label class="control-label" for="id_destination"><b>{% trans "Destination Address" %}</b></label>
<div class="controls"> <div class="controls">
{{ form.destination }}&nbsp;<img src="/fodstatic/secure_destination.png" style="height: 30px;"/> {{ form.destination }}&nbsp;<img src="/fodstatic/secure_destination.png" style="height: 30px;"/>
{% if form.destination.errors %} {% if form.destination.errors %}
...@@ -342,7 +348,7 @@ ...@@ -342,7 +348,7 @@
{% trans "Rule Actions" %} {% trans "Rule Actions" %}
</legend> </legend>
<div class="control-group {% if form.then.errors %} error {% endif %}"> <div class="control-group {% if form.then.errors %} error {% endif %}">
<label class="control-label" for="id_then">{% trans "Then" %}</label> <label class="control-label" for="id_then"><b>{% trans "Then" %}</b></label>
<div class="controls">{{ form.then }} <div class="controls">{{ form.then }}
{% if form.then.errors %} {% if form.then.errors %}
<span class="help-inline"> <span class="help-inline">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment