Browse Source

Fix #13105: Add yiiActiveForm validate_only property for skipping form auto-submission

tags/2.0.44
ptolomaues 3 years ago committed by GitHub
parent
commit
17aa0e40c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      framework/CHANGELOG.md
  2. 3
      framework/assets/yii.activeForm.js

1
framework/CHANGELOG.md

@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.44 under development
------------------------
- Enh #13105: Add yiiActiveForm validate_only property for skipping form auto-submission (ptolomaues)
- Enh #18967: Use proper attribute names for tabular data in `yii\widgets\ActiveField::addAriaAttributes()` (AnkIF)
- Bug #18798: Fix `StringHelper::dirname()` when passing string with a trailing slash (perlexed)
- Enh #18328: Raise warning when trying to register a file after `View::endPage()` has been called (perlexed)

3
framework/assets/yii.activeForm.js

@ -218,6 +218,7 @@
attributes: attributes,
submitting: false,
validated: false,
validate_only: false, // validate without auto submitting
options: getFormOptions($form)
});
@ -754,6 +755,7 @@
data.submitting = false;
} else {
data.validated = true;
if (!data.validate_only) {
if (data.submitObject) {
applyButtonOptions($form, data.submitObject);
}
@ -762,6 +764,7 @@
restoreButtonOptions($form);
}
}
}
} else {
$.each(data.attributes, function () {
if (!this.cancelled && (this.status === 2 || this.status === 3)) {

Loading…
Cancel
Save