2017 © Pedro Peláez
 

yii2-extension yii2-bootstrap-sweetalert

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

image

drexlerux/yii2-bootstrap-sweetalert

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

  • Sunday, September 10, 2017
  • by drexlerux
  • Repository
  • 0 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

Alert Widget for Yii 2

  • Alert widget based on bootstrap-sweetalert extension http://lipis.github.io/bootstrap-sweetalert

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

php composer.phar require --prefer-dist drexlerux/yii2-bootstrap-sweetalert "*"

or add, (*3)

"drexlerux/yii2-bootstrap-sweetalert": "*"

to the require section of your composer.json., (*4)

Usage

Once the extension is installed, simply add widget to your page as follows:, (*5)

echo \drexlerux\sweetalert\SweetAlert::widget([
        'type' => \drexlerux\sweetalert\SweetAlert::TYPE_WARNING,
        'options' => [
            'title' => 'Warning message',
            'text' => "Do you want to delete it?",
            'confirmButtonText'  => "Yes, delete it!",
            'cancelButtonText' =>  "No, cancel plx!"
        ]
]);

Overrid Confirm

SweetAlertAsset overrides javascript confirm dialog by default. If you want to keep default edit your config.php, (*6)

'assetManager' => [
    'bundles' => [
        'drexlerux\sweetalert\SweetAlertAsset' => [
            'overrideConfirm' => false
        ]
    ]
]

Alert Options

You can find them on the options page, (*7)

The Versions

10/09 2017

dev-master

9999999-dev

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

  Sources   Download

MIT

The Requires

  • bower-asset/bootstrap-sweetalert *

 

by Avatar drexlerux

yii2 bootstrap module sweetalert

10/09 2017

v1.0.1

1.0.1.0

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

  Sources   Download

MIT

The Requires

  • bower-asset/bootstrap-sweetalert *

 

by Avatar drexlerux

yii2 bootstrap module sweetalert

10/09 2017

v1.0.0

1.0.0.0

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

  Sources   Download

MIT

The Requires

  • bower-asset/bootstrap-sweetalert *

 

by Avatar drexlerux

yii2 bootstrap module sweetalert