summaryrefslogtreecommitdiff
path: root/httemplate/misc/process
diff options
context:
space:
mode:
authorivan <ivan>2008-12-09 01:46:53 +0000
committerivan <ivan>2008-12-09 01:46:53 +0000
commitde1e1a1c2563a9741a5be44f997889f7c37c36ed (patch)
treea2a9f5df86d825cf706a82d30995a96710a38800 /httemplate/misc/process
parent6115c160d19e6c82e3f713d0d79128fbf45e46da (diff)
use common base for inventory import too, fixes problems with errors due to dos line endings and allows Excel upload, RT#4346
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/inventory_item-import.html17
1 files changed, 2 insertions, 15 deletions
diff --git a/httemplate/misc/process/inventory_item-import.html b/httemplate/misc/process/inventory_item-import.html
index 3aae202c7..377943fb1 100644
--- a/httemplate/misc/process/inventory_item-import.html
+++ b/httemplate/misc/process/inventory_item-import.html
@@ -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>