diff options
author | mark <mark> | 2010-03-19 08:20:35 +0000 |
---|---|---|
committer | mark <mark> | 2010-03-19 08:20:35 +0000 |
commit | fed83c5c6c86a9ab00bb30481f5bf3937910da54 (patch) | |
tree | 7bc89b8312e051665fe070a68bbf8ed66bfd9fbe /httemplate | |
parent | ff1811385135320186e3b1f48188548b3a0dd57d (diff) |
RT#7812: confirm before closing quick payment entry
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/batch-cust_pay.html | 15 |
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> --> |