Skip to content

Commit 945197e

Browse files
author
Bjorn Hijmans
committed
Support multiple AjaxSubmitButtons with useWithActiveForm
1 parent 1a086ba commit 945197e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AjaxSubmitButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected function registerAjaxFormScript()
147147
$this->ajaxOptions= Json::encode($this->ajaxOptions);
148148

149149
$js = <<<SEL
150-
$(document).unbind('beforeSubmit').on('beforeSubmit', "#{$this->useWithActiveForm}", function () {
150+
$(document).unbind('beforeSubmit.{$this->useWithActiveForm}').on('beforeSubmit.{$this->useWithActiveForm}', "#{$this->useWithActiveForm}", function () {
151151
if ($(this).find('.has-error').length < 1) {
152152
$.ajax({$this->ajaxOptions});
153153
}

0 commit comments

Comments
 (0)