Revert "Fixes #11972: Fixed active form afterValidate wasn't triggered in some cases"

This reverts commit 8211dcc41bef562cbb3249f89f97a3cee72310d5.
This commit is contained in:
SilverFire - Dmitry Naumenko
2016-07-28 13:13:09 +03:00
parent 8de6a5117c
commit aaff45ebf1

View File

@ -551,16 +551,15 @@
var updateInputs = function ($form, messages, submitting) {
var data = $form.data('yiiActiveForm');
var errorAttributes = [];
$.each(data.attributes, function () {
if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
errorAttributes.push(this);
}
});
$form.trigger(events.afterValidate, [messages, errorAttributes]);
if (submitting) {
var errorAttributes = [];
$.each(data.attributes, function () {
if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
errorAttributes.push(this);
}
});
$form.trigger(events.afterValidate, [messages, errorAttributes]);
updateSummary($form, messages);