X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Finventory_item-import.html;h=377943fb128e5b4b476b6d7dcc025511473ccf8a;hb=d0fc25693dd91869c6e1fe1372bcae35fde1a827;hp=f6159dc994afda1d9495f62a360f800a23dbaeb4;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/misc/process/inventory_item-import.html b/httemplate/misc/process/inventory_item-import.html index f6159dc99..377943fb1 100644 --- a/httemplate/misc/process/inventory_item-import.html +++ b/httemplate/misc/process/inventory_item-import.html @@ -1,31 +1,9 @@ -% -% -% my $fh = $cgi->upload('filename'); -% -% my $error = defined($fh) -% ? FS::inventory_item::batch_import( { -% 'filehandle' => $fh, -% 'classnum' => $cgi->param('classnum'), -% } ) -% : 'No file'; -% -% if ( $error ) { -% +<% $server->process %> +<%init> - -% -% eidiot($error); -%# $cgi->param('error', $error); -%# print $cgi->redirect( "${p}cust_main-import.cgi -% } else { -% - - - <% include("/elements/header.html",'Import successful') %> - - <% include("/elements/footer.html",'Import successful') %> -% -% } -% +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); +my $server = new FS::UI::Web::JSRPC 'FS::inventory_item::process_batch_import', $cgi; +