Преглед изворни кода

he confirm exit solution does not work correctly for multiple forms on one page because the serialized data are generated over an collection and not over the single forms.

oskar пре 11 година
родитељ
комит
11fbbca024
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Resources/public/base.js

+ 1 - 1
Resources/public/base.js

@@ -1,7 +1,7 @@
 jQuery(document).ready(function() {
     jQuery('html').removeClass('no-js');
     if (window.SONATA_CONFIG && window.SONATA_CONFIG.CONFIRM_EXIT) {
-        jQuery('.sonata-ba-form form').confirmExit();
+        jQuery('.sonata-ba-form form').each(function () { $(this).confirmExit(); });
     }
 
     Admin.setup_select2(document);