Commit 4e41ddde by Bence Dányi

firewall_gui: provide generic typeahead for model relationships

parent e45c5c26
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="vlan">Vlan</label> <label class="control-label" for="vlan">Vlan</label>
<div class="controls"> <div class="controls">
<input type="text" data-provide="typeahead" autocomplete="off" id="vlan" ng-model="entity.vlan.name" /> <input type="text" data-provide="typeahead" autocomplete="off" class="vlan" id="vlan" ng-model="entity.vlan.name" />
</div> </div>
</div> </div>
</div> </div>
...@@ -87,14 +87,14 @@ ...@@ -87,14 +87,14 @@
<label class="control-label" for="hostgroups">Host groups</label> <label class="control-label" for="hostgroups">Host groups</label>
<div class="controls"> <div class="controls">
<div class="well well-small"> <div class="well well-small">
<span class="label label-info" ng-repeat="group in entity.groups"> <span class="label label-info" ng-repeat="group in entity.groups | filter: destroyed">
<a href="#/hostgroups/{{group.id}}">{{group.name}}</a> <a href="#/hostgroups/{{group.id}}">{{group.name}}</a>
<a href><i class="icon-remove"></i></a> <a href ng-click="removeHostGroup(group)"><i class="icon-remove"></i></a>
</span> </span>
</div> </div>
<div class="input-append"> <div class="input-append">
<input class="span2" id="hostgroup" type="text"> <input class="span2 hostgroup" id="hostgroup" type="text" ng-model="newGroup">
<button class="btn" type="button">Add</button> <button class="btn" type="button" ng-click="addHostGroup(newGroup)">Add</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="foreignNetwork">Foreign network</label> <label class="control-label" for="foreignNetwork">Foreign network</label>
<div class="controls"> <div class="controls">
<input type="text" data-provide="typeahead" autocomplete="off" id="foreignNetwork" ng-model="entity.foreignNetwork.name" /> <input type="text" data-provide="typeahead" autocomplete="off" id="foreignNetwork" class="vlangroup" ng-model="entity.foreignNetwork.name" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="domain">Domain</label> <label class="control-label" for="domain">Domain</label>
<div class="controls"> <div class="controls">
<input type="text" autocomplete="off" id="domain" ng-model="entity.domain.name" /> <input type="text" class="domain" data-provide="typeahead" autocomplete="off" id="domain" ng-model="entity.domain.name" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</span> </span>
</div> </div>
<div class="input-append"> <div class="input-append">
<input class="span2" id="vlan" type="text"> <input class="span2 vlan" id="vlan" type="text" data-provide="typeahead">
<button class="btn" type="button">Add</button> <button class="btn" type="button">Add</button>
</div> </div>
</div> </div>
......
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