diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 13:13:17 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 13:13:17 -0800 |
commit | d6216f073a9a729d3265741d3aea4f4ade1c6a7f (patch) | |
tree | ff47c2ca8564a96defa099582e2ce770c423fbd1 /httemplate/elements/bill.html | |
parent | 3f8bffa5344295cacf11249fdb6f6f958f939fb8 (diff) |
UX: acknowledge bill now instead of silently redirecting
Diffstat (limited to 'httemplate/elements/bill.html')
-rw-r--r-- | httemplate/elements/bill.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/elements/bill.html b/httemplate/elements/bill.html index 420a7489b..6ba8b7e60 100644 --- a/httemplate/elements/bill.html +++ b/httemplate/elements/bill.html @@ -28,7 +28,7 @@ Example: $formname, [ 'custnum', @opt_keys ], $p.'misc/bill.cgi', - $url ? { url => $url } : { message => $message }, + \%args, $formname, # use it as 'key' ) %> <A HREF="javascript:void(0);" onclick="javascript:<%$formname%>process();"><%$label%></A> @@ -46,10 +46,11 @@ my $label = $opt{'label'}; # need one and it needs to be unique my $formname = $opt{'formname'} || 'bill'.sprintf('%04d',random_id(4)).$custnum; -my $url = $opt{'url'} || ''; -my $message = $opt{'message'} || 'Finished!'; my $bill_opts = $opt{'bill_opts'} || {}; my @opt_keys = keys(%$bill_opts); my @opt_vals = values(%$bill_opts); +my %args = ( 'message' => $opt{'message'} || mt('Customer billed') ); +$args{url} = $opt{url} if $opt{url}; + </%init> |