kartik-v / yii2-widget-activeform

Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).
http://demos.krajee.com/widget-details/active-form
Other
64 stars 35 forks source link

ActiveForm.php still references bootstrap4 and there is no bootstrap5 equivalent #132

Closed adamwinn closed 2 years ago

adamwinn commented 3 years ago

In ActiveForm.php, the following code exists:

$formCss = 'kv-form-bs3';
        if ($bsVer !== 3) {
            $formCss = 'kv-form-bs4';
            if ($this->tooltipStyleFeedback) {
                $css[] = 'tooltip-feedback';
            }
        }

It's checking for bootstrap3 and if that doesn't exist, default to bootstrap4. There is no bootstrap5 code here.

In registerAssets() there is code of kvBs4InitForm() but no bootstrap5 equivalent.

Reference #128

kartik-v commented 3 years ago

This is an expected logic (for CSS/JS) which is the same code that supports both bootstrap4 and bootstrap5. What is the issue you are facing?

adamwinn commented 3 years ago

I have a form element and the class associated with it is class="row row-cols-lg-auto g-3 align-items-center form-inline kv-form-bs4". I expected it to say kv-form-bs5, since I dont even have bootstrap4 installed

kartik-v commented 3 years ago

It will work with bootstrap 5 as well (as mentioned before the CSS class kv-form-bs4 will work with both bootstrap 4 and bootstrap 5) - the naming is redundant.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.