https://github.com/lichunqiang/yii2-sweet-submit
sweet sumit using sweetalert
https://github.com/lichunqiang/yii2-sweet-submit
sweetalert yii2 yii2-extension yii2-sweetalert yii2-widgets
Last synced: 2 months ago
JSON representation
sweet sumit using sweetalert
- Host: GitHub
- URL: https://github.com/lichunqiang/yii2-sweet-submit
- Owner: lichunqiang
- License: mit
- Created: 2015-11-29T15:01:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-12T00:58:06.000Z (over 7 years ago)
- Last Synced: 2025-01-31T09:34:17.338Z (3 months ago)
- Topics: sweetalert, yii2, yii2-extension, yii2-sweetalert, yii2-widgets
- Language: PHP
- Size: 178 KB
- Stars: 27
- Watchers: 6
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yii2 - lichunqiang/yii2-sweet-submit
README
Yii2 Sweeet Submit
[](https://packagist.org/packages/light/yii2-sweet-submit)
[](https://packagist.org/packages/light/yii2-sweet-submit)
[](https://github.com/lichunqiang/yii2-sweet-submit/issues)By default `yii.js` using browser's `confirm` function to show confirm message.This library used `sweet-alert` to instead it:


## Install
```
$ composer require light\yii2-sweet-submit=*
```## Usage
you can depends this in your assets:
```
class AppAsset extends AssetBundle
{
//..public $depends = [
//your other depends
'light\widgets\SweetSubmitAsset'
];
}
```Or directly inject in the view:
```
use light\widgets\SweetSubmitAsset;SweetSubmitAsset::register($this);
```Once you had depends it in your project, `yii.swal` is available. What's this? It's just the [sweet-alert](http://t4t5.github.io/sweetalert/), now you can use it:
```
//your some.js
yii.swal('Opps. this is shown by sweet-alert');
```There is more usage you can find from [document](http://t4t5.github.io/sweetalert/)
## License
