X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcdr-import.html;h=7af6c521fc414f5f346450c35fe01378b7c4b714;hb=da86d5a8af2f915a340a74f6c97772451a1e23ef;hp=dc17332496fd857be14d7e4fd50372959f2c176d;hpb=fadaa67e77ad8d5d966e252aba7f193e9e3840e3;p=freeside.git diff --git a/httemplate/misc/cdr-import.html b/httemplate/misc/cdr-import.html index dc1733249..7af6c521f 100644 --- a/httemplate/misc/cdr-import.html +++ b/httemplate/misc/cdr-import.html @@ -1,15 +1,61 @@ -<%= include("/elements/header.html",'Call Detail Record Import') %> -
-Import a CSV file containing Call Detail Records (CDRs).

-CDR Format:

+<% include("/elements/header.html",'Call Detail Record Import') %> + +<% include( '/elements/form-file_upload.html', + 'name' => 'CDRImportForm', + 'action' => 'process/cdr-import.html', + 'num_files' => 1, + 'fields' => [ 'format', 'cdrbatch', ], + 'message' => 'CDR import successful', + 'url' => $p."search/cdr.html?cdrbatch=$cdrbatch", + ) +%> -Filename:

+Import a file containing Call Detail Records (CDRs).

+ + + +<% ntable('#cccccc', 2) %> + + + CDR Format + + + + + + <% include( '/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + ) + %> + + + + + + + + -
-<%= include('/elements/footer.html') %> +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + +tie my %formats, 'Tie::IxHash', FS::cdr->import_formats; + +my $cdrbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); +