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
|
||||
|
||||
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
|
||||
|
||||
### ButtonDropdown
|
||||
|
@ -16,6 +16,8 @@ yii2-bootstrap5 は、Bootstrap 4 から Bootstrap 5 への移行ガイドに従
|
||||
|
||||
### ActiveForm
|
||||
|
||||
新しい定数[[yii\bootstrap5\ActiveForm::LAYOUT_FLOATING]]があります。 Bootstrap5で導入された[新しいフォームレイアウト](https://getbootstrap.com/docs/5.0/forms/floating-labels/)です。
|
||||
|
||||
### Breadcrumbs
|
||||
|
||||
### ButtonDropdown
|
||||
|
@ -16,6 +16,9 @@ The most notable changes are summarized below:
|
||||
|
||||
### 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
|
||||
|
||||
### ButtonDropdown
|
||||
|
@ -518,6 +518,9 @@ class ActiveField extends \yii\widgets\ActiveField
|
||||
$config['enableError'] = false;
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user