ayrozjlc/yii2-disable-submit-form
最新稳定版本:v1.0.0
Composer 安装命令:
composer require ayrozjlc/yii2-disable-submit-form
包简介
Yii2 asset to automatically disable submit form on Yii2 ActiveForm.
README 文档
README
Yii2 asset to automatically disable submit buttons on Yii2 ActiveForm.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist "ayrozjlc/yii2-disable-submit-form:*"
or add
"ayrozjlc/yii2-disable-submit-form": "*"
to the require section of your composer.json file.
Register Asset
Register the ayrozjlc\disablesubmit\DisableSubmitFormAsset, preferably on your AppAsset dependencies
class AppAsset extends yii\web\AssetBundle { public $depends = [ 'ayrozjlc\disablesubmit\DisableSubmitFormAsset', // other dependencies ]; }
or add in view
// ... use ayrozjlc\disablesubmit\DisableSubmitFormAsset; // ... DisableSubmitFormAsset::register($this);
Usage
add in view
$customScript = " $('#id-form').disableForm({ disabled_text : 'message', // block : true // to activate plugin blockui // block_div : '#element' // by default it is applied to the parent element of the form });"; $this->registerJs($customScript, \yii\web\View::POS_READY);
统计信息
- 总下载量: 781
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-08-17