diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html index 2384e1b841..eca11704ff 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html @@ -15,7 +15,7 @@ - + @@ -39,6 +39,7 @@ +
You will be logged off in seconds due to inactivity. Click here to continue using this web page. diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/services.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/services.js index 0294169311..b827960997 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/services.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/services.js @@ -2,9 +2,40 @@ var module = angular.module('keycloak.services', [ 'ngResource', 'ngRoute' ]); -module.service('Dialog', function($dialog) { +module.service('Dialog', function($modal) { var dialog = {}; + var openDialog = function(title, message, btns) { + var controller = function($scope, $modalInstance, title, message, btns) { + $scope.title = title; + $scope.message = message; + $scope.btns = btns; + + $scope.ok = function () { + $modalInstance.close(); + }; + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + }; + + return $modal.open({ + templateUrl: 'templates/kc-modal.html', + controller: controller, + resolve: { + title: function() { + return title; + }, + message: function() { + return message; + }, + btns: function() { + return btns; + } + } + }).result; + } + var escapeHtml = function(str) { var div = document.createElement('div'); div.appendChild(document.createTextNode(str)); @@ -13,64 +44,53 @@ module.service('Dialog', function($dialog) { dialog.confirmDelete = function(name, type, success) { var title = 'Delete ' + escapeHtml(type.charAt(0).toUpperCase() + type.slice(1)); - var msg = 'Are you sure you want to permanently delete the ' + escapeHtml(type) + ' ' + escapeHtml(name) + '?'; - var btns = [ { - result : 'cancel', - label : 'Cancel', - cssClass : 'btn btn-default' - }, { - result : 'ok', - label : 'Delete', - cssClass : 'btn btn-danger' - } ]; + var msg = 'Are you sure you want to permanently delete the ' + type + ' ' + name + '?'; + var btns = { + ok: { + label: 'Delete', + cssClass: 'btn btn-danger' + }, + cancel: { + label: 'Cancel', + cssClass: 'btn btn-default' + } + } - $dialog.messageBox(title, msg, btns).open().then(function(result) { - if (result == "ok") { - success(); - } - }); + openDialog(title, msg, btns).then(success); } dialog.confirmGenerateKeys = function(name, type, success) { var title = 'Generate new keys for realm'; - var msg = 'Are you sure you want to permanently generate new keys for ' + name + '?'; - var btns = [ { - result : 'cancel', - label : 'Cancel', - cssClass : 'btn btn-default' - }, { - result : 'ok', - label : 'Generate new keys', - cssClass : 'btn btn-danger' - } ]; - - $dialog.messageBox(title, msg, btns).open().then(function(result) { - if (result == "ok") { - success(); + var msg = 'Are you sure you want to permanently generate new keys for ' + name + '?'; + var btns = { + ok: { + label: 'Generate Keys', + cssClass: 'btn btn-danger' + }, + cancel: { + label: 'Cancel', + cssClass: 'btn btn-default' } - }); + } + + openDialog(title, msg, btns).then(success); } dialog.confirm = function(title, message, success, cancel) { var title = title; var msg = '' + message + '"'; - var btns = [ { - result : 'cancel', - label : 'Cancel', - cssClass : 'btn btn-default' - }, { - result : 'ok', - label : title, - cssClass : 'btn btn-danger' - } ]; - - $dialog.messageBox(title, msg, btns).open().then(function(result) { - if (result == "ok") { - success(); - } else { - cancel && cancel(); + var btns = { + ok: { + label: title, + cssClass: 'btn btn-danger' + }, + cancel: { + label: 'Cancel', + cssClass: 'btn btn-default' } - }); + } + + openDialog(title, msg, btns).then(success).reject(cancel); } return dialog diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-detail.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-detail.html index e9a42846c2..da9282d512 100644 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-detail.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-detail.html @@ -37,17 +37,13 @@
-
+
- - -
- {{authProvider.providerName|capitalize}}'s provider options
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-list.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-list.html index a49df6dcdb..8acd99c324 100644 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-list.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-auth-list.html @@ -28,7 +28,14 @@ {{authProvider.providerName|capitalize}} {{authProvider.passwordUpdateSupported}} - {{authProvider.config}} + + + + + + +
{{key}}{{value}}
+ No authentication providers available diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-modal.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-modal.html index ad9b6a7a71..25eee9682f 100644 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-modal.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-modal.html @@ -1,14 +1,11 @@ -