[freeside-commits] freeside/httemplate/misc batch-cust_pay.html, 1.12, 1.13

Mark Wells mark at wavetail.420.am
Fri Mar 19 01:20:37 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv5797

Modified Files:
	batch-cust_pay.html 
Log Message:
RT#7812: confirm before closing quick payment entry

Index: batch-cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/batch-cust_pay.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- batch-cust_pay.html	18 May 2008 03:04:03 -0000	1.12
+++ batch-cust_pay.html	19 Mar 2010 08:20:35 -0000	1.13
@@ -2,7 +2,20 @@
 
 <% include('/elements/error.html') %>
 
-<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;">
+<SCRIPT TYPE="text/javascript">
+function warnUnload() {
+  if(document.getElementById("OneTrueTable").rows.length > 3 &&
+     !document.OneTrueForm.submit.disabled) {
+    return "The current batch will be lost.";
+  }
+  else {
+    return null;
+  }
+}
+window.onbeforeunload = warnUnload;
+</SCRIPT>
+
+<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;window.onbeforeunload = null;">
 
 <!-- <B>Batch</B> <INPUT TYPE="text" NAME="paybatch"><BR><BR> -->
 



More information about the freeside-commits mailing list