mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 14:46:19 +08:00 
			
		
		
		
	Revert "Fixes #11972: Fixed active form afterValidate wasn't triggered in some cases"
				
					
				
			This reverts commit 8211dcc41bef562cbb3249f89f97a3cee72310d5.
This commit is contained in:
		@ -551,6 +551,7 @@
 | 
				
			|||||||
    var updateInputs = function ($form, messages, submitting) {
 | 
					    var updateInputs = function ($form, messages, submitting) {
 | 
				
			||||||
        var data = $form.data('yiiActiveForm');
 | 
					        var data = $form.data('yiiActiveForm');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (submitting) {
 | 
				
			||||||
            var errorAttributes = [];
 | 
					            var errorAttributes = [];
 | 
				
			||||||
            $.each(data.attributes, function () {
 | 
					            $.each(data.attributes, function () {
 | 
				
			||||||
                if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
 | 
					                if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
 | 
				
			||||||
@ -560,8 +561,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            $form.trigger(events.afterValidate, [messages, errorAttributes]);
 | 
					            $form.trigger(events.afterValidate, [messages, errorAttributes]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (submitting) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            updateSummary($form, messages);
 | 
					            updateSummary($form, messages);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (errorAttributes.length) {
 | 
					            if (errorAttributes.length) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user