Przeglądaj źródła

HUE-1047 [core] Invalid form submission blocks next submission

Changed the form submission code to listen to ajax loaded forms
Enrico Berti 12 lat temu
rodzic
commit
3fa47e5ca3

+ 3 - 2
desktop/core/src/desktop/templates/common_footer.html

@@ -46,7 +46,7 @@ limitations under the License.
             startPendingRequestsPolling();
             resetTimeout = window.setTimeout(function () {
               resetPrimaryButtonsStatus();
-            }, 100);
+            }, 200);
           }
         });
 
@@ -59,7 +59,8 @@ limitations under the License.
           window.clearTimeout(resetTimeout);
         });
 
-        $("form").submit(function () {
+        $(document).on("submit", "form", function () {
+          hasAjaxBeenSent = false;
           window.setInterval(function () {
             window.clearTimeout(resetTimeout);
           }, 10);