From 49863e70ae1f075c971c64ac4577024a7e78bb92 Mon Sep 17 00:00:00 2001 From: Amanda Anganes Date: Mon, 18 Mar 2013 14:29:04 -0400 Subject: [PATCH] Got scope "value" error handling set --- .../src/main/webapp/WEB-INF/tags/header.tag | 4 ++++ .../src/main/webapp/resources/js/scope.js | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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 d2a3adfb6..ceac91b1f 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 @@ -62,6 +62,10 @@ margin: 20px 0; } + .inputError { + border: 1px solid red !important; + } + a.brand { background: url('${config.logoImageUrl}') no-repeat scroll 7px 7px transparent; } 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 a12c9330e..4942b0915 100644 --- a/openid-connect-server/src/main/webapp/resources/js/scope.js +++ b/openid-connect-server/src/main/webapp/resources/js/scope.js @@ -226,12 +226,12 @@ var SystemScopeFormView = Backbone.View.extend({ error:function(error, response) { if (response.status == 409) { //Conflict, scope already exists - $('#value input').addClass('error'); - alert("A scope with this value already exists; please enter a different value"); + $('#value.control-group input').addClass('inputError'); + $('#value.control-group').before('
A scope with this value already exists, please choose a different value.
'); - $('#value input').bind('click.error', function() { - $('#value input').removeClass('error'); - $('#value input').unbind('click.error'); + $('#value.control-group').bind('click.error', function() { + $('#value.control-group input').removeClass('inputError'); + $('#value.control-group').unbind('click.error'); }); }