X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcdr-import.html;h=edc441e35032c953de093c0ff04df213468ee5dd;hb=44158be319024c0f55be4a2f72f79c6c73dc9c54;hp=93137c3d070c346cca93fd365b133bf6532d92d2;hpb=718f65eee1c797ea90a315b5f03fae75c80a5112;p=freeside.git diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html index 93137c3d0..edc441e35 100644 --- a/httemplate/misc/process/cdr-import.html +++ b/httemplate/misc/process/cdr-import.html @@ -1,30 +1,9 @@ -% -% -% my $fh = $cgi->upload('csvfile'); -% -% my $error = defined($fh) -% ? FS::cdr::batch_import( { -% 'filehandle' => $fh, -% 'format' => $cgi->param('format'), -% } ) -% : 'No file'; -% -% if ( $error ) { -% +<% $server->process %> +<%init> - -% -% errorpage($error); -%# $cgi->param('error', $error); -%# print $cgi->redirect( "${p}cust_main-import.cgi -% } else { -% +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); - - <% include("/elements/header.html",'Import successful') %> - - <% include("/elements/footer.html",'Import successful') %> -% -% } -% +my $server = new FS::UI::Web::JSRPC 'FS::cdr::process_batch_import', $cgi; +