diff options
author | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
commit | eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd (patch) | |
tree | bb38241e8c865c3bca861da7749071feeadd2b5b /httemplate/search/cust_bill.html | |
parent | 32b5d3a31f112a381f0a15ac5e3a2204242f3405 (diff) |
event refactor, landing on HEAD!
Diffstat (limited to 'httemplate/search/cust_bill.html')
-rwxr-xr-x | httemplate/search/cust_bill.html | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index b65608eab..7b9386ec6 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -199,18 +199,41 @@ my $html_init = join("\n", map { qq!<INPUT TYPE="hidden" NAME="open" VALUE="$open">!, qq!<INPUT TYPE="hidden" NAME="days" VALUE="$days">!, qq!</FORM>! -} qw( print_ email_ fax_ ) ); +} qw( print_ email_ fax_ ) ). + +'<SCRIPT TYPE="text/javascript"> + +function confirm_print_process() { + if ( ! confirm("Are you sure you want to reprint these invoices?") ) { + return; + } + print_process(); +} +function confirm_email_process() { + if ( ! confirm("Are you sure you want to re-email these invoices?") ) { + return; + } + email_process(); +} +function confirm_fax_process() { + if ( ! confirm("Are you sure you want to re-fax these invoices?") ) { + return; + } + fax_process(); +} + +</SCRIPT>'; my $menubar = [ 'Main menu' => $p, 'Print these invoices' => - "javascript:print_process()", + "javascript:confirm_print_process()", 'Email these invoices' => - "javascript:email_process()", + "javascript:confirm_email_process()", ]; push @$menubar, 'Fax these invoices' => - "javascript:fax_process()" + "javascript:confirm_fax_process()" if $conf->exists('hylafax'); </%init> |