diff --git a/openid-connect-server/src/main/webapp/WEB-INF/tags/header.tag b/openid-connect-server/src/main/webapp/WEB-INF/tags/header.tag index 1847766dc..d644d70e3 100644 --- a/openid-connect-server/src/main/webapp/WEB-INF/tags/header.tag +++ b/openid-connect-server/src/main/webapp/WEB-INF/tags/header.tag @@ -109,7 +109,10 @@ diff --git a/openid-connect-server/src/main/webapp/resources/js/admin.js b/openid-connect-server/src/main/webapp/resources/js/admin.js index 8ad3d3f13..5155ca50d 100644 --- a/openid-connect-server/src/main/webapp/resources/js/admin.js +++ b/openid-connect-server/src/main/webapp/resources/js/admin.js @@ -38,10 +38,10 @@ var ListWidgetChildView = Backbone.View.extend({ console.log("An error occurred when deleting from a list widget"); //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", @@ -271,10 +271,10 @@ var BlackListWidgetView = ListWidgetView.extend({ }, error:function(error, response) { //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", diff --git a/openid-connect-server/src/main/webapp/resources/js/client.js b/openid-connect-server/src/main/webapp/resources/js/client.js index a8d3d5c0b..deb867be8 100644 --- a/openid-connect-server/src/main/webapp/resources/js/client.js +++ b/openid-connect-server/src/main/webapp/resources/js/client.js @@ -165,10 +165,10 @@ var ClientView = Backbone.View.extend({ console.log("An error occurred when deleting a client"); //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", @@ -502,10 +502,10 @@ var ClientFormView = Backbone.View.extend({ console.log("An error occurred when deleting from a list widget"); //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", diff --git a/openid-connect-server/src/main/webapp/resources/js/grant.js b/openid-connect-server/src/main/webapp/resources/js/grant.js index f71d0adbd..3e6c63ba2 100644 --- a/openid-connect-server/src/main/webapp/resources/js/grant.js +++ b/openid-connect-server/src/main/webapp/resources/js/grant.js @@ -133,10 +133,10 @@ var ApprovedSiteView = Backbone.View.extend({ error:function (error, response) { //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", diff --git a/openid-connect-server/src/main/webapp/resources/js/scope.js b/openid-connect-server/src/main/webapp/resources/js/scope.js index 76f6cf176..dd4e5403e 100644 --- a/openid-connect-server/src/main/webapp/resources/js/scope.js +++ b/openid-connect-server/src/main/webapp/resources/js/scope.js @@ -87,10 +87,10 @@ var SystemScopeView = Backbone.View.extend({ error:function (error, response) { //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", @@ -241,7 +241,7 @@ var SystemScopeFormView = Backbone.View.extend({ error:function(error, response) { //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); if (response.status == 409) { //Conflict, scope already exists @@ -256,7 +256,7 @@ var SystemScopeFormView = Backbone.View.extend({ } else { //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", diff --git a/openid-connect-server/src/main/webapp/resources/js/whitelist.js b/openid-connect-server/src/main/webapp/resources/js/whitelist.js index 0e5daf567..107f4475a 100644 --- a/openid-connect-server/src/main/webapp/resources/js/whitelist.js +++ b/openid-connect-server/src/main/webapp/resources/js/whitelist.js @@ -134,10 +134,10 @@ var WhiteListView = Backbone.View.extend({ console.log("An error occurred when deleting a whitelist entry"); //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static", @@ -201,10 +201,10 @@ var WhiteListFormView = Backbone.View.extend({ console.log("An error occurred when deleting from a list widget"); //Pull out the response text. - var responseText = JSON.parse(response.responseText); + var responseJson = JSON.parse(response.responseText); //Display an alert with an error message - $('#modalAlert div.modal-body').html("
Warning!" + responseText + "
"); + $('#modalAlert div.modal-body').html(responseJson.errorMessage); $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog "backdrop" : "static",