added Floating label to docs and fixed template in field
This commit is contained in:
parent
2e885dd544
commit
4063a438e6
@ -16,6 +16,9 @@ Die grössten Änderungen finden Sie hier zusammengefasst:
|
|||||||
|
|
||||||
### ActiveForm
|
### ActiveForm
|
||||||
|
|
||||||
|
Es gibt eine neue Konstante [[yii\bootstrap5\ActiveForm::LAYOUT_FLOATING]]. Sie repräsentiert ein neues
|
||||||
|
[neues Formular-Layout](https://getbootstrap.com/docs/5.0/forms/floating-labels/) in Bootstrap 5.
|
||||||
|
|
||||||
### Breadcrumbs
|
### Breadcrumbs
|
||||||
|
|
||||||
### ButtonDropdown
|
### ButtonDropdown
|
||||||
|
@ -16,6 +16,8 @@ yii2-bootstrap5 は、Bootstrap 4 から Bootstrap 5 への移行ガイドに従
|
|||||||
|
|
||||||
### ActiveForm
|
### ActiveForm
|
||||||
|
|
||||||
|
新しい定数[[yii\bootstrap5\ActiveForm::LAYOUT_FLOATING]]があります。 Bootstrap5で導入された[新しいフォームレイアウト](https://getbootstrap.com/docs/5.0/forms/floating-labels/)です。
|
||||||
|
|
||||||
### Breadcrumbs
|
### Breadcrumbs
|
||||||
|
|
||||||
### ButtonDropdown
|
### ButtonDropdown
|
||||||
|
@ -16,6 +16,9 @@ The most notable changes are summarized below:
|
|||||||
|
|
||||||
### ActiveForm
|
### ActiveForm
|
||||||
|
|
||||||
|
There is a new constant [[yii\bootstrap5\ActiveForm::LAYOUT_FLOATING]]. It's a
|
||||||
|
[new form layout](https://getbootstrap.com/docs/5.0/forms/floating-labels/) introduced in Bootstrap 5.
|
||||||
|
|
||||||
### Breadcrumbs
|
### Breadcrumbs
|
||||||
|
|
||||||
### ButtonDropdown
|
### ButtonDropdown
|
||||||
|
@ -518,6 +518,9 @@ class ActiveField extends \yii\widgets\ActiveField
|
|||||||
$config['enableError'] = false;
|
$config['enableError'] = false;
|
||||||
|
|
||||||
Html::addCssClass($config['labelOptions'], ['screenreader' => 'visually-hidden']);
|
Html::addCssClass($config['labelOptions'], ['screenreader' => 'visually-hidden']);
|
||||||
|
} elseif ($layout === ActiveForm::LAYOUT_FLOATING) {
|
||||||
|
$config['template'] = "{input}\n{label}\n{error}\n{hint}";
|
||||||
|
Html::addCssClass($config['options'], ['layout' => 'form-floating mt-3']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
Loading…
Reference in New Issue
Block a user