Got scope "value" error handling set

pull/306/merge
Amanda Anganes 12 years ago
parent d24ecd2e7c
commit 49863e70ae

@ -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;
}

@ -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('<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">&times;</button>A scope with this value already exists, please choose a different value.</div>');
$('#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');
});
}

Loading…
Cancel
Save