mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 12:49:04 +08:00
Merge branch 'AnatolyRugalev-issue-10322'
This commit is contained in:
@@ -51,6 +51,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #9562: Adds `char` datatype to framework (df2)
|
||||
- Enh #9604: `yii\db\BaseActiveRecord` now triggers event `EVENT_AFTER_REFRESH` after a record is refreshed (raoul2000)
|
||||
- Enh #9893: `yii.js` handleAction enhanced to support for data-form attribute, so links can trigger specific forms (SamMousa)
|
||||
- Enh #10322: ActiveForm now respects formtarget attribute of submit button (AnatolyRugalev)
|
||||
- Enh #10451: Check of existence of `$_SERVER` in `\yii\web\Request` before using it (quantum13)
|
||||
- Enh #10487: `yii\helpers\BaseArrayHelper::index()` got a third parameter `$groupBy` to group the input array by the key in one or more dimensions (quantum13, silverfire, samdark)
|
||||
- Enh #10610: Added `BaseUrl::$urlManager` to be able to set URL manager used for creating URLs (samdark)
|
||||
@@ -211,6 +212,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #10783: Added migration and unit-tests for `yii\i18n\DbMessageSource` (silverfire)
|
||||
- Enh #10797: Cleaned up requirements checker CSS (muhammadcahya)
|
||||
- Enh #11336: Allow resettting `$hostInfo`, `$scriptUrl`, and `$pathInfo` in `yii\web\Request` and `$baseUrl`, and `$hostInfo` in `yii\web\UrlManager` to `null`, to make Yii determine the value again (cebe)
|
||||
- Enh #10322: `yii.activeForm.js` now respects the `formtarget` attribute of submit button (anatolyrugalev)
|
||||
- Enh: Added last resort measure for `FileHelper::removeDirectory()` fail to unlink symlinks under Windows (samdark)
|
||||
- Enh: `AttributeBehavior::getValue()` now respects the callable in array format (silverfire)
|
||||
- Chg #6419: Added `yii\web\ErrorHandler::displayVars` make list of displayed vars customizable. `$_ENV` and `$_SERVER` are not displayed by default anymore (silverfire)
|
||||
|
||||
@@ -201,7 +201,8 @@
|
||||
settings: settings,
|
||||
attributes: attributes,
|
||||
submitting: false,
|
||||
validated: false
|
||||
validated: false,
|
||||
target: $form.attr('target')
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -575,7 +576,14 @@
|
||||
data.submitting = false;
|
||||
} else {
|
||||
data.validated = true;
|
||||
var buttonTarget = data.submitObject ? data.submitObject.attr('formtarget') : null;
|
||||
if (buttonTarget) {
|
||||
// set target attribute to form tag before submit
|
||||
$form.attr('target', buttonTarget);
|
||||
}
|
||||
$form.submit();
|
||||
// restore original target attribute value
|
||||
$form.attr('target', data.target);
|
||||
}
|
||||
} else {
|
||||
$.each(data.attributes, function () {
|
||||
|
||||
Reference in New Issue
Block a user