Commit 4295ddb3 by Bence Dányi

firewall_gui: foreign network listing & typeahead added

parent 0c54e1a9
...@@ -136,6 +136,23 @@ function EntityController(url) { ...@@ -136,6 +136,23 @@ function EntityController(url) {
return true; return true;
} }
}); });
$('#foreignNetwork').typeahead({
source: function(query, process) {
$.ajax({
url: '/firewall/autocomplete/vlangroup/',
type: 'post',
data: 'name=' + query,
success: function autocompleteSuccess(data) {
process(data.map(function(obj) {
return obj.name;
}));
}
});
},
matcher: function() {
return true;
}
});
}); });
} }
} }
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="foreignNetwork">Foreign network</label>
<div class="controls">
<input type="text" data-provide="typeahead" autocomplete="off" id="foreignNetwork" value="{{rule.foreignNetwork.name}}" />
</div>
</div>
<div class="control-group">
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox"> Remember me <input type="checkbox"> Remember me
......
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 sign in to comment