[freeside-commits] freeside/httemplate/elements menu.html, 1.87, 1.88 progress-init.html, 1.14, 1.15

Mark Wells mark at wavetail.420.am
Tue Jun 8 15:25:03 PDT 2010


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

Modified Files:
	menu.html progress-init.html 
Log Message:
RT#947: batch download of invoice PDFs

Index: menu.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/menu.html,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -w -d -r1.87 -r1.88
--- menu.html	26 May 2010 06:39:13 -0000	1.87
+++ menu.html	8 Jun 2010 22:25:00 -0000	1.88
@@ -357,6 +357,8 @@
 $tools_menu{'Process payment batches'} = [ $fsurl.'search/pay_batch.cgi?magic=_date;open=1;intransit=1', 'Process credit card and electronic check batches' ]
   if ( $conf->exists('batch-enable') || $conf->config('batch-enable_payby') )
      && $curuser->access_right('Process batches');
+$tools_menu{'Process invoice batches'} = [ $fsurl.'search/bill_batch.cgi' ] 
+  if ( $conf->exists('invoice_print_pdf') );
 $tools_menu{'Job Queue'} =  [ $fsurl.'search/queue.html', 'View pending job queue' ]
   if $curuser->access_right('Job queue');
 $tools_menu{'Ticketing'} = [ \%tools_ticketing, 'Ticketing tools' ]

Index: progress-init.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/progress-init.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- progress-init.html	14 Aug 2008 11:53:41 -0000	1.14
+++ progress-init.html	8 Jun 2010 22:25:01 -0000	1.15
@@ -1,3 +1,47 @@
+<%doc>
+Example:
+In misc/something.html:
+
+  <FORM NAME="MyForm">
+  <INPUT TYPE="hidden" NAME="recordnum" VALUE="42">
+  <INPUT TYPE="hidden" NAME="what_to_do" VALUE="delete">
+  <% include( '/elements/progress-init.html',
+             'MyForm', 
+             [ 'recordnum', 'what_to_do' ],
+             $p.'misc/process_something.html',
+             { url => $p.'where_to_go_next.html' },
+         #or { message => 'Finished!' },
+         );
+  </FORM>
+  <SCRIPT TYPE="text/javascript>process();</SCRIPT>
+
+In misc/process_something.html:
+
+<%init>
+my $server = FS::UI::Web::JSRPC->new('FS::something::process_whatever', $cgi);
+</%init>
+<% $server->process %>
+
+In FS/something.pm:
+
+sub process_whatever { #class method
+  my $job = shift;
+  my $param = thaw(base64_decode(shift));
+  # param = { 'recordnum' => 42, 'what_to_do' => delete }
+  # make use of this as you like
+  do_phase1;
+  $job->update_statustext(20);
+  do_phase2;
+  $job->update_statustext(40);
+  do_phase3;
+  $job->update_statustext(60);
+  # etc.
+  return 'BLAH BLAH NOBODY WILL EVER SEE THIS RETURN VALUE';
+}
+
+I am not responsible for errors in the above documentation.
+
+</%doc>
 <% include('/elements/xmlhttp.html',
               'method' => 'POST',
               'url'    => $action,



More information about the freeside-commits mailing list