KEYCLOAK-3815 Prevent resubmission of form when creating key provider

This commit is contained in:
Stian Thorgersen 2016-10-26 09:20:37 +02:00
parent 317749a7fd
commit bf5e724f00
2 changed files with 2 additions and 4 deletions

View file

@ -1112,12 +1112,10 @@ module.controller('RealmKeysProvidersCtrl', function($scope, Realm, realm, $http
parent: realm.id, parent: realm.id,
type: 'org.keycloak.keys.KeyProvider' type: 'org.keycloak.keys.KeyProvider'
}, function(data) { }, function(data) {
console.debug(data);
$scope.instances = data; $scope.instances = data;
}); });
$scope.addProvider = function(provider) { $scope.addProvider = function(provider) {
console.log('Add provider: ' + provider.id);
$location.url("/create/keys/" + realm.realm + "/providers/" + provider.id); $location.url("/create/keys/" + realm.realm + "/providers/" + provider.id);
}; };

View file

@ -52,8 +52,8 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-10 col-md-offset-2" data-ng-show="create && access.manageRealm"> <div class="col-md-10 col-md-offset-2" data-ng-show="create && access.manageRealm">
<button kc-save>{{:: 'save' | translate}}</button> <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
<button kc-cancel data-ng-click="cancel()">{{:: 'cancel' | translate}}</button> <button kc-cancel data-ng-disabled="!changed" data-ng-click="cancel()">{{:: 'cancel' | translate}}</button>
</div> </div>
</div> </div>