File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected function registerAjaxScript()
122122 $ this ->ajaxOptions ['data ' ] = new JsExpression ('$(this).parents("form").serialize() ' );
123123
124124 $ this ->ajaxOptions = Json::encode ($ this ->ajaxOptions );
125- $ view ->registerJs ("$('# " .$ this ->options ['id ' ]."').click(function() {
125+ $ view ->registerJs ("$('# " .$ this ->options ['id ' ]."').unbind('click'). click(function() {
126126 " . (null !== $ this ->clickedButtonVarName ? "var {$ this ->clickedButtonVarName } = this; " : "" ) . "
127127 $.ajax( " . $ this ->ajaxOptions . ");
128128 return false;
@@ -147,7 +147,7 @@ protected function registerAjaxFormScript()
147147 $ this ->ajaxOptions = Json::encode ($ this ->ajaxOptions );
148148
149149$ js = <<<SEL
150- $(document).on('beforeSubmit', "# {$ this ->useWithActiveForm }", function () {
150+ $(document).unbind('beforeSubmit'). on('beforeSubmit', "# {$ this ->useWithActiveForm }", function () {
151151 if ($(this).find('.has-error').length < 1) {
152152 $.ajax( {$ this ->ajaxOptions });
153153 }
You can’t perform that action at this time.
0 commit comments