Got scope "value" error handling set
parent
d24ecd2e7c
commit
49863e70ae
|
@ -62,6 +62,10 @@
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inputError {
|
||||||
|
border: 1px solid red !important;
|
||||||
|
}
|
||||||
|
|
||||||
a.brand {
|
a.brand {
|
||||||
background: url('${config.logoImageUrl}') no-repeat scroll 7px 7px transparent;
|
background: url('${config.logoImageUrl}') no-repeat scroll 7px 7px transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,12 +226,12 @@ var SystemScopeFormView = Backbone.View.extend({
|
||||||
error:function(error, response) {
|
error:function(error, response) {
|
||||||
if (response.status == 409) {
|
if (response.status == 409) {
|
||||||
//Conflict, scope already exists
|
//Conflict, scope already exists
|
||||||
$('#value input').addClass('error');
|
$('#value.control-group input').addClass('inputError');
|
||||||
alert("A scope with this value already exists; please enter a different value");
|
$('#value.control-group').before('<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">×</button>A scope with this value already exists, please choose a different value.</div>');
|
||||||
|
|
||||||
$('#value input').bind('click.error', function() {
|
$('#value.control-group').bind('click.error', function() {
|
||||||
$('#value input').removeClass('error');
|
$('#value.control-group input').removeClass('inputError');
|
||||||
$('#value input').unbind('click.error');
|
$('#value.control-group').unbind('click.error');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue