Skip to content

Commit

Permalink
enh #24: Added support for jquery.inputmask. It only works with Yii 2…
Browse files Browse the repository at this point in the history
….0.4 or higher.
  • Loading branch information
wbraganca committed Apr 28, 2015
1 parent cd89f84 commit 2d0423c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ yii2-dynamicform change Log

dev-master
----------
- enh #24: Added support for "jquery.inputmask". It only works with Yii 2.0.4 or higher.
- enh: Remove "error/success" class css template to be cloned.
- bug: Fixes for: checkbox(), checkboxList(), radio() and radioList()

Expand Down
9 changes: 9 additions & 0 deletions assets/yii2-dynamic-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@
var _restoreSpecialJs = function(widgetOptions) {
var widgetOptionsRoot = _getWidgetOptionsRoot(widgetOptions);

// "jquery.inputmask"
var $hasInputmask = $(widgetOptionsRoot.widgetItem).find('[data-plugin-inputmask]');
if ($hasInputmask.length > 0) {
$hasInputmask.each(function() {
$(this).inputmask('remove');
$(this).inputmask(eval($(this).attr('data-plugin-inputmask')));
});
}

// "kartik-v/yii2-widget-datepicker"
var $hasDatepicker = $(widgetOptionsRoot.widgetItem).find('[data-krajee-datepicker]');
if ($hasDatepicker.length > 0) {
Expand Down
Loading

0 comments on commit 2d0423c

Please sign in to comment.