Browse Source

Merge branch 'activeFormHiddenField' of git://github.com/lennartvdd/yii2 into lennartvdd-activeFormHiddenField

stream into a topic branch.
tags/3.0.0-alpha1
SilverFire - Dmitry Naumenko 8 years ago
parent
commit
fcba5f3171
  1. 7
      framework/CHANGELOG.md
  2. 1
      framework/widgets/ActiveField.php
  3. 1
      tests/framework/widgets/ActiveFieldTest.php

7
framework/CHANGELOG.md

@ -13,8 +13,8 @@ Yii Framework 2 Change Log
- Chg: Removed `yii\base\Object::class` in favor of native PHP syntax `::class`, which does not trigger autoloading (cebe)
- Chg #12074: Updated `yii\widgets\ActiveField::hint()` method signature to match `label()` (PowerGamer1, samdark)
- Chg #11560: Removed XCache and Zend data cache support as caching backends (samdark)
- Enh #2990: `yii\widgets\ActiveField::hiddenInput()` no longer renders label by default (lennartvdd)
2.0.10 under development
2.0.11 under development
------------------------
@ -141,6 +141,11 @@ Yii Framework 2 Change Log
- Bug #6347: `inverseOf()` not working for dynamic relational queries (laszlovl)
- Bug #8644: Fixed trying to ENABLE/DISABLE TRIGGER ALL on a view in PostgreSQL (ricpelo)
- Enh #8795: Refactored `yii\web\User::loginByCookie()` in order to make it easier to override (maine-mike, silverfire)
- Enh #9948: `yii\rbac\PhpManager` now invalidates script file cache performed by 'OPCache' or 'APC' on file saving (klimov-paul)
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
- Enh #11490: Added `yii\data\ArrayDataProvider::$modelClass` property to specify a model used to provide column labels even when data array is empty (PowerGamer1)
- Enh #11591: Added support for wildcards for `only` and `except` at `yii\base\ActionFilter` (klimov-paul)
- Bug #9950: Updated `yii\grid\DataColumn::getHeaderCellLabel()` to extract attribute label from the `filterModel` of Grid (silverfire)
- Bug #10613: Fixed PostgreSQL Schema to return correct column names for unique indexes that have mixed case column names (cebe)
- Bug #10681: Fixed active form `beforeValidate` wasn't triggered in some cases (lynicidn)

1
framework/widgets/ActiveField.php

@ -408,6 +408,7 @@ class ActiveField extends Component
*/
public function hiddenInput($options = [])
{
$this->label(false);
$options = array_merge($this->inputOptions, $options);
$this->adjustLabelFor($options);
$this->parts['{input}'] = Html::activeHiddenInput($this->model, $this->attribute, $options);

1
tests/framework/widgets/ActiveFieldTest.php

@ -294,6 +294,7 @@ EOD;
EOD;
$this->activeField->hiddenInput();
$this->assertEquals($expectedValue, $this->activeField->parts['{input}']);
$this->assertEquals('', $this->activeField->parts['{label}']);
}
public function testListBox()

Loading…
Cancel
Save