X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Finventory_item-import.html;h=377943fb128e5b4b476b6d7dcc025511473ccf8a;hb=cf54023e010df76e0c39ac70902877d7c4c94c6e;hp=3aae202c73b1127e64b60ad1e29e65cf3f253913;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git 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') %> - - <% 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;