+<%def .init>
+% # action is part of the target URL, don't need to pass it as a param
+% foreach my $action (qw(print email fax)) {
+<& /elements/progress-init.html,
+ $action.'_form',
+ [ @scalars, @lists, 'beginning', 'ending' ],
+ "../misc/${action}_events.cgi",
+ { 'message' => "Invoices re-${action}ed" }, #would be nice to show the number of them, but...
+ $action.'_', #key
+&>
+<FORM NAME="<% $action %>_form">
+% foreach my $param (@scalars, 'beginning', 'ending') {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $search{$param} |h %>">
+% }
+% foreach my $param (@lists) {
+% foreach my $value (@{ $search{$param} }) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $value |h %>">
+% }
+% }
+</FORM>
+% } # foreach $action
+<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>
+</%def>