blob: fa2f93c0812a0420ba3dbd30bf886f6391c0eb49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
<div>
<div class="col-md-4 col-sm-4 col-xs-4">
<a class="btn btn-primary" type="button" style="white-space: normal;" ng-click="edit.fromList = !edit.fromList">
<span ng-if="!edit.fromList" data-translate="moon.policy.perimeter.edit.action.list">Add from the list</span>
<span ng-if="edit.fromList" data-translate="moon.policy.perimeter.edit.action.new">Add a new Perimeter</span>
</a>
</div>
<div class="col-md-8 col-sm-8 col-xs-8">
<form name="selectMetaData" ng-if="edit.fromList" class="form-horizontal" role="form" >
<div class="form-group" >
<ui-select ng-model="edit.selectedPerimeter" name="object">
<ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match>
<ui-select-choices repeat="aPerimeter in edit.list">
<div ng-value="aPerimeter" ng-bind="aPerimeter.name"></div>
</ui-select-choices>
</ui-select>
</div>
<div class="form-group">
<div class="pull-left col-md-4 col-sm-4 col-xs-4">
<a href="" ng-disabled="edit.loading || !edit.selectedPerimeter" ng-click="edit.deletePerimeter()" class="btn btn-warning">
<span class="glyphicon glyphicon-trash"></span>
<span data-translate="moon.policy.perimeter.edit.action.delete">Delete</span>
</a>
</div>
<div class="pull-right col-md-7 col-md-offset-1 col-sm-7 col-sm-offset-1 col-xs-7 col-xs-offset-1 ">
<a href="" ng-disabled="edit.loading || !edit.selectedPerimeter" ng-click="edit.addToPolicy()" class="btn btn-warning" style="white-space: normal;">
<span class="glyphicon glyphicon-link"></span>
<span data-translate="moon.policy.perimeter.edit.action.add">Add the selected Perimeter</span>
</a>
</div>
</div>
<moon-loader ng-if="edit.loading"></moon-loader>
</form>
<form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form">
<div class="form-group" ng-class="{'has-error': edit.form.name.$invalid && edit.form.name.$dirty}">
<label for="name" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.name">Name</label>
<div class="col-sm-6">
<input name="name" id="name" class="form-control" type="text" data-ng-model="edit.perimeter.name" required />
<div class="help-block" ng-show="edit.form.name.$dirty && edit.form.name.$invalid">
<small class="error" ng-show="edit.form.name.$error.required" data-translate="moon.policy.perimeter.edit.check.name.required">Name is required</small>
</div>
</div>
</div>
<div class="form-group">
<label for="description" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.description">Description</label>
<div class="col-sm-6">
<textarea id="description" name="description" class="form-control" data-ng-model="edit.perimeter.description"></textarea>
</div>
</div>
<!--
<div class="form-group">
<label for="partnerId" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.partnerId">Partner Id</label>
<div class="col-sm-6">
<input name="partnerId" id="partnerId" class="form-control" type="text" data-ng-model="edit.perimeter.partnerId" />
</div>
</div>
-->
<div class="form-group" ng-if="edit.perimeterType === edit.subjectType" ng-class="{'has-error': edit.form.email.$invalid && edit.form.email.$dirty}">
<label for="email" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.email">Email</label>
<div class="col-sm-6">
<input name="email" id="email" class="form-control" type="email" data-ng-model="edit.perimeter.email" />
</div>
</div>
<div class="form-group" >
<label for="policyList" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.policies">Policy List </label>
<div class="col-sm-5">
<ui-select ng-model="edit.selectedPolicy" id="policyList">
<ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match>
<ui-select-choices repeat="aPolicy in edit.policiesToBeSelected">
<div ng-value="aPolicy" ng-bind="aPolicy.name"></div>
</ui-select-choices>
</ui-select>
</div>
<div class="col-sm-1 text-center">
<a href="" ng-click="edit.addPolicyToPerimeter()"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.selectedPolicies">Selected Policies</label>
<div class="col-sm-6">
<ul>
<li ng-repeat="(key, value) in edit.selectedPolicyList">
<span ng-bind="value.name" ></span> <a href="" ng-click="edit.removeSelectedPolicy(value)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a>
</li>
</ul>
</div>
</div>
<div class="form-group">
<div class="pull-right">
<a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning">
<span class="glyphicon glyphicon-save"></span>
<span data-translate="moon.policy.perimeter.edit.action.create">Create</span>
</a>
<moon-loader ng-if="edit.loading"></moon-loader>
</div>
</div>
</form>
</div>
</div>
|