Download the PHP package karnbrockgmbh/yii2-modal-ajax without Composer
On this page you can find all versions of the php package karnbrockgmbh/yii2-modal-ajax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download karnbrockgmbh/yii2-modal-ajax
More information about karnbrockgmbh/yii2-modal-ajax
Files in karnbrockgmbh/yii2-modal-ajax
Package yii2-modal-ajax
Short Description A wrapper around Yii2 Bootstrap Modal for using an ActiveForm via AJAX inside
License MIT
Homepage https://github.com/karnbrockgmbh/yii2-modal-ajax
Rated 5.00 based on 1 reviews
Informations about the package yii2-modal-ajax
yii2-modal-ajax
A wrapper around Yii2 Bootstrap Modal for using an ActiveForm via AJAX inside.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json file.
Usage
Controller
Extend your basic logic with ajax render and save capabilities:
to
View
Plugin Events
On top if the basic twitter bootstrap modal events the following events are triggered
kbModalBeforeShow
This event is triggered right before the view for the form is loaded. Additional parameters available with this event are:
xhr
: XMLHttpRequest, the jQuery XML Http Request object used for this transaction.settings
: object, the jQuery ajax settings for this transaction.
kbModalShow
This event is triggered after the view for the form is successful loaded. Additional parameters available with this event are:
data
: object, the data object sent via server's response.status
: string, the jQuery AJAX success text status.xhr
: XMLHttpRequest, the jQuery XML Http Request object used for this transaction.
kbModalBeforeSubmit
This event is triggered right before the form is submitted. Additional parameters available with this event are:
xhr
: XMLHttpRequest, the jQuery XML Http Request object used for this transaction.settings
: object, the jQuery ajax settings for this transaction.
kbModalSubmit
This event is triggered after the form is successful submitted. Additional parameters available with this event are:
data
: object, the data object sent via server's response.status
: string, the jQuery AJAX success text status.xhr
: XMLHttpRequest, the jQuery XML Http Request object used for this transaction.