KEYCLOAK-109: Add support for managing Web Origins and Redirect URIs.
This commit is contained in:
parent
34fe0a751c
commit
7d6f88f617
3 changed files with 60 additions and 1 deletions
|
@ -42,6 +42,13 @@ input[type="password"].error:focus,
|
|||
input[type="email"].error:focus {
|
||||
box-shadow: 0 0 5px #ba1212;
|
||||
}
|
||||
.input-below {
|
||||
clear: both;
|
||||
display: inline-block;
|
||||
margin-left: 10.9090909090909em;
|
||||
margin-top: 0.45454545454545em;
|
||||
padding-left: 3.63636363636364em;
|
||||
}
|
||||
input[type="button"],
|
||||
button,
|
||||
a.button {
|
||||
|
@ -776,3 +783,11 @@ input[type="email"].tiny {
|
|||
.breadcrumb > li + li:before {
|
||||
content: "» ";
|
||||
}
|
||||
|
||||
.item-deletable:hover .btn-delete {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn-delete {
|
||||
display: none;
|
||||
}
|
|
@ -196,6 +196,20 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
|
|||
}
|
||||
}, true);
|
||||
|
||||
$scope.deleteWebOrigin = function(index) {
|
||||
$scope.application.webOrigins.splice(index, 1);
|
||||
}
|
||||
$scope.addWebOrigin = function() {
|
||||
$scope.application.webOrigins.push($scope.newWebOrigin);
|
||||
$scope.newWebOrigin = "";
|
||||
}
|
||||
$scope.deleteRedirectUri = function(index) {
|
||||
$scope.application.redirectUris.splice(index, 1);
|
||||
}
|
||||
$scope.addRedirectUri = function() {
|
||||
$scope.application.redirectUris.push($scope.newRedirectUri);
|
||||
$scope.newRedirectUri = "";
|
||||
}
|
||||
|
||||
$scope.save = function() {
|
||||
if ($scope.applicationForm.$valid) {
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="adminUrl" class="control-label">Base URL</label>
|
||||
<label for="baseUrl" class="control-label">Base URL</label>
|
||||
|
||||
<div class="controls">
|
||||
<input class="input-small" type="text" name="baseUrl" id="baseUrl"
|
||||
|
@ -65,6 +65,36 @@
|
|||
data-ng-model="application.adminUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newWebOrigin" class="control-label">Web Origin</label>
|
||||
<div class="controls">
|
||||
<div ng-repeat="webOrigin in application.webOrigins" class="item-deletable">
|
||||
<input class="input-small" type="text" data-ng-class="{'input-below':!$first}"
|
||||
name="webOrigin" id="webOrigin" data-ng-model="webOrigin" readonly />
|
||||
<button type="button" data-ng-click="deleteWebOrigin($index)" class="btn-delete">
|
||||
Delete</button>
|
||||
</div>
|
||||
<input class="input-small" type="text" name="newWebOrigin" id="newWebOrigin"
|
||||
placeholder="New Web Origin..." data-ng-model="newWebOrigin"
|
||||
data-ng-class="{'input-below':application.webOrigins.length}" />
|
||||
<button data-ng-click="addWebOrigin()" ng-show="newWebOrigin.length > 0">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newRedirectUri" class="control-label">Redirect URI</label>
|
||||
<div class="controls">
|
||||
<div ng-repeat="redirectUri in application.redirectUris" class="item-deletable">
|
||||
<input class="input-small" type="text" data-ng-class="{'input-below':!$first}"
|
||||
name="redirectUri" id="redirectUri" data-ng-model="redirectUri" readonly />
|
||||
<button type="button" data-ng-click="deleteRedirectUri($index)" class="btn-delete">
|
||||
Delete</button>
|
||||
</div>
|
||||
<input class="input-small" type="text" name="newRedirectUri" id="newRedirectUri"
|
||||
placeholder="New Redirect URI..." data-ng-model="newRedirectUri"
|
||||
data-ng-class="{'input-below':application.redirectUris.length}" />
|
||||
<button data-ng-click="addRedirectUri()" ng-show="newRedirectUri.length > 0">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="form-actions" data-ng-show="create">
|
||||
<button type="submit" data-ng-click="save()" class="primary">Save
|
||||
|
|
Loading…
Reference in a new issue