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

-CDR Format: - -

- -Filename:

- - + +<& /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') %> @@ -21,6 +54,8 @@ Filename:

die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); -tie my %formats, FS::cdr->import_formats; +tie my %formats, 'Tie::IxHash', FS::cdr->import_formats; + +my $cdrbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);