summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/cdr-import.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc/process/cdr-import.html')
-rw-r--r--httemplate/misc/process/cdr-import.html18
1 files changed, 2 insertions, 16 deletions
diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html
index 7c4bf2b59..edc441e35 100644
--- a/httemplate/misc/process/cdr-import.html
+++ b/httemplate/misc/process/cdr-import.html
@@ -1,23 +1,9 @@
-% if ( $error ) {
-% errorpage($error);
-% } else {
- <% include("/elements/header.html",'Import successful') %>
- <!-- XXX redirect to batch search like the payment entry... -->
- <% include("/elements/footer.html",'Import successful') %>
-% }
+<% $server->process %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
-my $fh = $cgi->upload('csvfile');
-
-my $error = defined($fh)
- ? FS::cdr::batch_import( {
- 'filehandle' => $fh,
- 'format' => scalar($cgi->param('format')),
- 'cdrbatch' => scalar($cgi->param('cdrbatch')),
- } )
- : 'No file';
+my $server = new FS::UI::Web::JSRPC 'FS::cdr::process_batch_import', $cgi;
</%init>