X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fcdr-import.html;h=05d0bbc3c05ab92141d835e7ce5f2dc6ae4d2713;hp=93de6e43f23bb8df38663eed18a67afd76f71003;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=1053db7f76169cbbc87840539959a4c362aff242 diff --git a/httemplate/misc/cdr-import.html b/httemplate/misc/cdr-import.html index 93de6e43f..05d0bbc3c 100644 --- a/httemplate/misc/cdr-import.html +++ b/httemplate/misc/cdr-import.html @@ -1,16 +1,61 @@ -<%= include("/elements/header.html",'Call Detail Record Import') %> -
-Import a CSV file containing Call Detail Records (CDRs).

-CDR Format:

- -Filename:

- - +<% include("/elements/header.html",'Call Detail Record Import') %> + +<& /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", + 'onsubmit' => "document.CDRImportForm.submitButton.disabled=true;", +&> + +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); +