Fix #1337 Remove keyup on input

This commit is contained in:
Nicolas Le Goff
2013-07-12 18:40:04 +02:00
parent a0ad497200
commit 6ae2f29a52

View File

@@ -21,7 +21,8 @@ define([
events: { events: {
"click .btn-submit-field": "createAction", "click .btn-submit-field": "createAction",
"click .btn-add-field": "toggleCreateFormAction", "click .btn-add-field": "toggleCreateFormAction",
"click .btn-cancel-field": "toggleCreateFormAction" "click .btn-cancel-field": "toggleCreateFormAction",
"keyup input": "onKeyupInput"
}, },
render: function() { render: function() {
var template = _.template($("#create_template").html()); var template = _.template($("#create_template").html());
@@ -51,6 +52,13 @@ define([
return this; return this;
}, },
onKeyupInput: function (event) {
$(event.target)
.closest(".control-group")
.removeClass("error")
.find(".help-block")
.empty();
},
createAction: function(event) { createAction: function(event) {
var self = this; var self = this;
var formErrors = 0; var formErrors = 0;