summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authormark <mark>2010-03-19 08:20:35 +0000
committermark <mark>2010-03-19 08:20:35 +0000
commitfed83c5c6c86a9ab00bb30481f5bf3937910da54 (patch)
tree7bc89b8312e051665fe070a68bbf8ed66bfd9fbe /httemplate
parentff1811385135320186e3b1f48188548b3a0dd57d (diff)
RT#7812: confirm before closing quick payment entry
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/misc/batch-cust_pay.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html
index e10a5f658..505f2d0ff 100644
--- a/httemplate/misc/batch-cust_pay.html
+++ b/httemplate/misc/batch-cust_pay.html
@@ -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> -->