[freeside-commits] freeside/httemplate/misc/process inventory_item-import.html, 1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Mon Dec 8 17:46:55 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv25262/httemplate/misc/process
Modified Files:
inventory_item-import.html
Log Message:
use common base for inventory import too, fixes problems with errors due to dos line endings and allows Excel upload, RT#4346
Index: inventory_item-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/inventory_item-import.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- inventory_item-import.html 13 Jan 2008 21:14:19 -0000 1.5
+++ inventory_item-import.html 9 Dec 2008 01:46:53 -0000 1.6
@@ -1,22 +1,9 @@
-% if ( $error ) {
-% errorpage($error);
-% } else {
- <% include("/elements/header.html",'Import successful') %>
- <!-- XXX redirect to batch search like the payment entry... -->
- <% include("/elements/footer.html",'Import successful') %>
-% }
+<% $server->process %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
-my $fh = $cgi->upload('filename');
-
-my $error = defined($fh)
- ? FS::inventory_item::batch_import( {
- 'filehandle' => $fh,
- 'classnum' => $cgi->param('classnum'),
- } )
- : 'No file';
+my $server = new FS::UI::Web::JSRPC 'FS::inventory_item::process_batch_import', $cgi;
</%init>
More information about the freeside-commits
mailing list