[freeside-commits] freeside/httemplate/elements bill.html, NONE, 1.1 progress-init.html, 1.15, 1.16

Mark Wells mark at wavetail.420.am
Tue Jul 6 05:18:13 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv31959/httemplate/elements

Modified Files:
	progress-init.html 
Added Files:
	bill.html 
Log Message:
"Bill now" link uses job queue/progressbar, RT#8995

--- NEW FILE: bill.html ---
<%doc>
Clickable link to bill a customer.

Example:
<FORM name="MyForm">
<% include( '/elements/bill.html',
            ###
            # required
            ###
            custnum   => $custnum,
            label     => 'Bill Now!',
            formname  => 'MyForm',

            ###
            # recommended
            ###
            url       => $p.'view/cust_main.cgi?'.$custnum,

            ###
            # optional, can contain any FS::cust_main::bill_and_collect options
            ###
            bill_opts => { 'batch_card' => 'yes' },
) %>
</FORM>
</%doc>
<% include('/elements/progress-init.html',
          $formname,
          [ 'custnum', @opt_keys ],
          $p.'misc/bill.cgi',
          $url ? { url => $url } : { message => $message },
          $key,
) %>
<A HREF="javascript:void(0);" onclick="javascript:<%$key%>process();"><%$label%></A>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<%$custnum%>">
% foreach(@opt_keys) {
<INPUT TYPE="hidden" NAME="<%$_%>" VALUE="<%$bill_opts->{$_}%>">
% }
<%init>
my %opt = @_;
my $custnum   = $opt{'custnum'};
my $label     = $opt{'label'};
my $formname  = $opt{'formname'};
my $key       = $formname.'bill'.$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);
</%init>

Index: progress-init.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/progress-init.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -d -r1.15 -r1.16
--- progress-init.html	8 Jun 2010 22:25:01 -0000	1.15
+++ progress-init.html	6 Jul 2010 12:18:11 -0000	1.16
@@ -11,7 +11,7 @@
              $p.'misc/process_something.html',
              { url => $p.'where_to_go_next.html' },
          #or { message => 'Finished!' },
-         );
+         ) %>
   </FORM>
   <SCRIPT TYPE="text/javascript>process();</SCRIPT>
 
@@ -36,11 +36,9 @@
   do_phase3;
   $job->update_statustext(60);
   # etc.
-  return 'BLAH BLAH NOBODY WILL EVER SEE THIS RETURN VALUE';
+  return 'this value will be ignored';
 }
 
-I am not responsible for errors in the above documentation.
-
 </%doc>
 <% include('/elements/xmlhttp.html',
               'method' => 'POST',



More information about the freeside-commits mailing list