Browse Source

Fixes #10029: Fixed MaskedInput not working with PJAX

tags/3.0.0-alpha1
Alexander Makarov 9 years ago
parent
commit
00e328753a
  1. 1
      framework/CHANGELOG.md
  2. 2
      framework/widgets/MaskedInput.php

1
framework/CHANGELOG.md

@ -30,6 +30,7 @@ Yii Framework 2 Change Log
- Bug #9915: `yii\helpers\ArrayHelper::getValue()` was erroring instead of returning `null` for non-existing object properties (totaldev, samdark)
- Bug #9924: Fixed `yii.js` handleAction corrupted parameter values containing quote (") character (silverfire)
- Bug #9984: Fixed wrong captcha color in case Imagick is used (DrDeath72)
- Bug #10029: Fixed MaskedInput not working with PJAX (martrix78, samdark)
- Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark)
- Enh #3506: Added `\yii\validators\IpValidator` to perform validation of IP addresses and subnets (SilverFire, samdark)
- Enh #5146: Added `\yii\i18n\Formatter::asDuration()` method (nineinchnick, SilverFire)

2
framework/widgets/MaskedInput.php

@ -146,7 +146,7 @@ class MaskedInput extends InputWidget
$encOptions = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions);
$this->_hashVar = self::PLUGIN_NAME . '_' . hash('crc32', $encOptions);
$this->options['data-plugin-' . self::PLUGIN_NAME] = $this->_hashVar;
$view->registerJs("var {$this->_hashVar} = {$encOptions};", View::POS_HEAD);
$view->registerJs("var {$this->_hashVar} = {$encOptions};", View::POS_READY);
}
/**

Loading…
Cancel
Save