Open ivankff opened 5 years ago
I think, you can re-write https://github.com/loveorigami/yii2-modal-ajax/blob/master/src/ModalAjaxAsset.php#L19 for capability with bootstrap4.
Try. If it will be ok - I create new major version for bootstrap 4.
I created the fork https://github.com/ivankff/yii2-modal-ajax
And made some changes to make it compatible with Twitter Bootstrap 4:
1) replaced dependency from yii\bootstrap\BootstrapAsset
to yii\bootstrap4\BootstrapAsset
2) removed function renderHeader
(in bootstrap 4 modal's header includes tag h5
, so span
is unnecessary now)
3) added require
rection in composer.json
4) changed package version composer.json
to 4.0
5) updated readme
Note: there is no header
attribute in yii\bootstrap4\Modal
. You have to use title
instead of header
in order to set Modal's header/title.
I suggest you creating new major version or brach by merging my fork into your repository. Then I'll remove my fork and use this rep. What do you think ?
I think create new option in widget - $bootstrapVersion, and delete dependency from composer. As in my widget https://github.com/loveorigami/yii2-notification-wrapper#full-installation for notyAssets.
It's great idea. I removed dependencies from asset and composer and added an option $bootstrapVersion All changes are in my fork https://github.com/ivankff/yii2-modal-ajax
Thanks for support. It is similar, as I think. I shall be have free time in week-end and rewrite code for both bootstrap version.
With https://github.com/yiisoft/yii2-bootstrap4/blob/master/src/Modal.php and https://github.com/yiisoft/yii2-bootstrap/blob/master/src/Modal.php
i fixed it and sent a pull request!
Thanks, but is not BS4 support. It is only BS4 release without BS3 support.
as long as I had "yiisoft/yii2-bootstrap4": "~2.0.0"
, in composer.json it didn't show the modal, although it was there, but still with css class fade
and invisible
Hello. This extension depends on
yiisoft/yii2-bootstrap
but I useyiisoft/yii2-bootstrap4
in my projects.How can I use your extension with bootstrap4 ?