X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fbill.html;h=64a1a6d2cc56367686a85818890a198a49e94365;hp=bb2b3ed4ae0000b8051daf8f6315aaa1ca1628b8;hb=cf69551b63fb966966938ca2b9c6201a5f40a1f9;hpb=9569b2f1e6147f97bfacb41bc94c6605eb59206f diff --git a/httemplate/elements/bill.html b/httemplate/elements/bill.html index bb2b3ed4a..64a1a6d2c 100644 --- a/httemplate/elements/bill.html +++ b/httemplate/elements/bill.html @@ -9,7 +9,6 @@ Example: ### custnum => $custnum, label => 'Bill Now!', - formname => 'MyForm', ### # recommended @@ -20,18 +19,19 @@ Example: # optional, can contain any FS::cust_main::bill_and_collect options ### bill_opts => { 'batch_card' => 'yes' }, + formname => 'MyBillNowLink', # if for some reason you want this ) %> -
+ <% include('/elements/progress-init.html', $formname, [ 'custnum', @opt_keys ], $p.'misc/bill.cgi', $url ? { url => $url } : { message => $message }, - $key, + $formname, # use it as 'key' ) %> -<%$label%> +<%$label%> % foreach(@opt_keys) { @@ -42,8 +42,10 @@ Example: my %opt = @_; my $custnum = $opt{'custnum'}; my $label = $opt{'label'}; -my $formname = $opt{'formname'}; -my $key = $formname.'bill'.$custnum; +# formname no longer needs to be passed from outside, but we still +# need one and it needs to be unique +my $formname = $opt{'formname'} || + 'bill'.sprintf('%04d',int(rand(10000))).$custnum; my $url = $opt{'url'} || ''; my $message = $opt{'message'} || 'Finished!'; my $bill_opts = $opt{'bill_opts'} || {};