X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcdr-import.html;h=edc441e35032c953de093c0ff04df213468ee5dd;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hp=68edaa21cdc2c43a1eeeb6d457f4b5c9d1b6c782;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html index 68edaa21c..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> - -% -% eidiot($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; +