Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap4 #23

Open
ivankff opened this issue Mar 21, 2019 · 9 comments
Open

bootstrap4 #23

ivankff opened this issue Mar 21, 2019 · 9 comments

Comments

@ivankff
Copy link

ivankff commented Mar 21, 2019

Hello.
This extension depends on yiisoft/yii2-bootstrap
but I use yiisoft/yii2-bootstrap4 in my projects.

How can I use your extension with bootstrap4 ?

@loveorigami
Copy link
Owner

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.

@ivankff
Copy link
Author

ivankff commented Mar 22, 2019

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.

@ivankff
Copy link
Author

ivankff commented Mar 25, 2019

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 ?

@loveorigami
Copy link
Owner

loveorigami commented Mar 25, 2019

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.

@ivankff
Copy link
Author

ivankff commented Mar 26, 2019

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

@loveorigami
Copy link
Owner

loveorigami commented Mar 26, 2019

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

@niyozbek
Copy link

i fixed it and sent a pull request!

@loveorigami
Copy link
Owner

Thanks, but is not BS4 support. It is only BS4 release without BS3 support.

@user1007017
Copy link

user1007017 commented Jun 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants