diff roundup/cgi/templating.py @ 5172:fac171f0f27b

Fix submit_once Javascript function This needs to return a boolean value (not and integer like 0 or 1). And the work-around for an ancient version of Internet Explorer would make it break for a recent Firefox. The old version would show the popup but after clicking away the alert it would load the page. The new version (tested with Chromium and Firefox) doesn't load the page.
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 28 Nov 2016 16:09:39 +0100
parents 232c74973a56
children e8b3d3a14563
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Sat Oct 22 17:23:18 2016 -0400
+++ b/roundup/cgi/templating.py	Mon Nov 28 16:09:39 2016 +0100
@@ -2826,11 +2826,10 @@
 function submit_once() {
     if (submitted) {
         alert("Your request is being processed.\\nPlease be patient.");
-        event.returnValue = 0;    // work-around for IE
-        return 0;
+        return false;
     }
     submitted = true;
-    return 1;
+    return true;
 }
 
 function help_window(helpurl, width, height) {

Roundup Issue Tracker: http://roundup-tracker.org/