Skip to content

Commit c2f6085

Browse files
committed
Fix #134: Correct form label required star styling for BS 5.x
1 parent f49b8b9 commit c2f6085

12 files changed

+30
-22
lines changed

CHANGE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ Change Log: `yii2-widget-activeform`
33

44
## Version 1.6.1
55

6-
**Date**: _under development_
6+
**Date**: 13-Feb-2022
77

8+
- (enh #134): Correct form label required star styling for BS 5.x.
89
- (enh #131): Enhance hint block styling.
910
- (enh #130): Support isset validation for older PHP versions.
1011
- (enh #129): Enhance radioList and checkboxList styles.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 - 2021, Kartik Visweswaran
1+
Copyright (c) 2015 - 2022, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

src/ActiveField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-widgets
66
* @subpackage yii2-widget-activeform
77
* @version 1.6.1

src/ActiveForm.php

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-widgets
66
* @subpackage yii2-widget-activeform
77
* @version 1.6.1
@@ -21,9 +21,9 @@
2121
* ActiveForm is a widget that builds an interactive HTML form for one or multiple data models and extends the
2222
* [[YiiActiveForm]] widget to handle various bootstrap form types and new functionality.
2323
*
24-
* Example:
24+
* For example,
2525
*
26-
* ~~~
26+
* ```php
2727
* // Horizontal Form
2828
* $form = ActiveForm::begin([
2929
* 'id' => 'form-signup',
@@ -41,9 +41,10 @@
4141
* 'type' => ActiveForm::TYPE_HORIZONTAL
4242
* 'formConfig' => ['labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_SMALL]
4343
* ]);
44-
* ~~~
44+
* ```
4545
*
4646
* @method ActiveField field(Model $model, string $attribute, array $options = [])
47+
*
4748
* @author Kartik Visweswaran <[email protected]>
4849
* @since 1.0
4950
*/
@@ -52,8 +53,7 @@ class ActiveForm extends YiiActiveForm implements BootstrapInterface
5253
use BootstrapTrait;
5354

5455
/**
55-
* @var bool whether to render tooltip styled error and success messages. Applicable only for [[bsVersion]] 4.x
56-
* and above.
56+
* @var bool whether to render tooltip styled error and success messages. Applicable only for [[bsVersion]] >= 4.
5757
*/
5858
public $tooltipStyleFeedback = false;
5959

@@ -118,20 +118,27 @@ class ActiveForm extends YiiActiveForm implements BootstrapInterface
118118
* forms.
119119
* - `showHints`: _boolean_, whether to show hints (true) or hide errors (false). Defaults to `true`. The hint will be
120120
* rendered only if a valid hint has been set through the `hint()` method.
121-
* ~~~
121+
*
122+
* Defaults to,
123+
*
124+
* ```php
122125
* [
123126
* 'labelSpan' => 2,
124127
* 'deviceSize' => ActiveForm::SIZE_MEDIUM,
125128
* 'showLabels' => true,
126129
* 'showErrors' => true,
127130
* 'showHints' => true
128131
* ],
129-
* ~~~
132+
* ```
130133
*/
131134
public $formConfig = [];
132135

133136
/**
134-
* @var array HTML attributes for the form tag. Defaults to `['role' => 'form']`.
137+
* @var array HTML attributes for the form tag. Defaults to:
138+
*
139+
* ```php
140+
* ['role' => 'form']
141+
* ```
135142
*/
136143
public $options = ['role' => 'form'];
137144

src/ActiveFormAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-widgets
66
* @subpackage yii2-widget-activeform
77
* @version 1.6.1

src/Bs4CustomFileInputAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-widgets
66
* @subpackage yii2-widget-activeform
77
* @version 1.6.1

src/assets/css/activeform.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
2+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
33
* @package yii2-widgets
44
* @subpackage yii2-widget-activeform
55
* @version 1.6.1
@@ -234,7 +234,7 @@ label.disabled, label.readonly, .disabled label, .readonly label {
234234
.form-inline .radio.not-enclosed label {
235235
margin-top: -5px;
236236
}
237-
.form-group.required .has-star:not(.custom-control-label):not(.custom-file-label)::after,
237+
.required .has-star:not(.custom-control-label):not(.custom-file-label)::after,
238238
.is-required::after {
239239
content: "*";
240240
margin-left: 3px;

src/assets/css/activeform.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/js/activeform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* @package yii2-widget-activeform
33
* @author Kartik Visweswaran <[email protected]>
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2021
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @version 1.6.1
66
*
77
* Active Field Hints Display Module

src/assets/js/activeform.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)