diff --git a/themes/src/main/resources/theme/base/admin/resources/js/app.js b/themes/src/main/resources/theme/base/admin/resources/js/app.js index e3b5cc5c06..3b1172c95f 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -2286,6 +2286,8 @@ module.directive('kcSave', function ($compile, Notifications) { elem.addClass("btn btn-primary"); elem.attr("type","submit"); elem.bind('click', function() { + if ($scope.hasOwnProperty("changed") && !$scope.changed) return; + $scope.$apply(function() { var form = elem.closest('form'); if (form && form.attr('name')) { diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js index bf59be0f7e..ed747ae30a 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js @@ -535,6 +535,9 @@ module.controller('UserCredentialsCtrl', function($scope, realm, user, $route, R }); $scope.resetPassword = function() { + // hit enter without entering both fields - ignore + if (!$scope.passwordAndConfirmPasswordEntered()) return; + if ($scope.pwdChange) { if ($scope.password != $scope.confirmPassword) { Notifications.error("Password and confirmation does not match."); @@ -563,6 +566,10 @@ module.controller('UserCredentialsCtrl', function($scope, realm, user, $route, R }); }; + $scope.passwordAndConfirmPasswordEntered = function() { + return $scope.password && $scope.confirmPassword; + } + $scope.disableCredentialTypes = function() { Dialog.confirm('Disable credentials', 'Are you sure you want to disable these the users credentials?', function() { UserCredentials.disableCredentialTypes({ realm: realm.realm, userId: user.id }, $scope.disableableCredentialTypes, function() { diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html b/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html index 1b545f74fa..d213fdd442 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html @@ -35,7 +35,7 @@
-
+
@@ -57,7 +57,7 @@
- +
{{:: 'credentials.disable.tooltip' | translate}}
@@ -79,7 +79,7 @@
- +
{{:: 'credentials.reset-actions-email.tooltip' | translate}} diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html index 4062b1cc33..b3c84c6eee 100755 --- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html +++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html @@ -27,7 +27,7 @@
- +
diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html index 0309bb3227..131097bfd3 100755 --- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html +++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html @@ -22,7 +22,7 @@
- +