File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected function registerAjaxScript()
122
122
$ this ->ajaxOptions ['data ' ] = new JsExpression ('$(this).parents("form").serialize() ' );
123
123
124
124
$ this ->ajaxOptions = Json::encode ($ this ->ajaxOptions );
125
- $ view ->registerJs ("$('# " .$ this ->options ['id ' ]."').click(function() {
125
+ $ view ->registerJs ("$('# " .$ this ->options ['id ' ]."').unbind('click'). click(function() {
126
126
" . (null !== $ this ->clickedButtonVarName ? "var {$ this ->clickedButtonVarName } = this; " : "" ) . "
127
127
$.ajax( " . $ this ->ajaxOptions . ");
128
128
return false;
@@ -147,7 +147,7 @@ protected function registerAjaxFormScript()
147
147
$ this ->ajaxOptions = Json::encode ($ this ->ajaxOptions );
148
148
149
149
$ js = <<<SEL
150
- $(document).on('beforeSubmit', "# {$ this ->useWithActiveForm }", function () {
150
+ $(document).unbind('beforeSubmit'). on('beforeSubmit', "# {$ this ->useWithActiveForm }", function () {
151
151
if ($(this).find('.has-error').length < 1) {
152
152
$.ajax( {$ this ->ajaxOptions });
153
153
}
You can’t perform that action at this time.
0 commit comments