Commit 519056da authored by Boris Kocherov's avatar Boris Kocherov

use notifyValid and notifyInvalid in checkValidity

parent eb3d81fc
......@@ -58,6 +58,12 @@
throw error;
});
})
.allowPublicAcquisition("notifyValid", function () {
return;
})
.allowPublicAcquisition("notifyInvalid", function () {
return;
})
.onEvent("submit", function () {
var g = this;
return g.props.form_view.getContent()
......
......@@ -1076,9 +1076,6 @@
g.props = {};
g.options = {};
})
.declareAcquiredMethod("notifyValid", "notifyValid")
.declareAcquiredMethod("notifyInvalid", "notifyInvalid")
.declareAcquiredMethod("renameChildrenParent", "renameChildren")
.allowPublicAcquisition("renameChildren", function (opt_arr, scope) {
var property_name,
......@@ -1210,6 +1207,8 @@
);
});
})
.declareAcquiredMethod("notifyValid", "notifyValid")
.declareAcquiredMethod("notifyInvalid", "notifyInvalid")
.declareAcquiredMethod("checkValidityParent", "checkValidityTop")
.allowPublicAcquisition("checkValidityTop", function (arr) {
return this.checkValidity(arr[0]);
......@@ -1244,9 +1243,9 @@
div.setAttribute("class", "");
});
if (validation.valid) {
return RSVP.Queue()
return g.notifyValid()
.push(function () {
return "VALID";
return false;
});
}
function print_error(message) {
......@@ -1277,8 +1276,9 @@
.push(function () {
return RSVP.all(tasks);
})
.push(g.notifyInvalid.bind(g))
.push(function () {
return "ERROR";
return false;
});
});
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment