diff options
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r-- | httemplate/misc/process/inventory_item-import.html | 17 |
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> |