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