diff options
author | ivan <ivan> | 2008-04-11 01:50:17 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-04-11 01:50:17 +0000 |
commit | 542e551fdbb3ca9a402021390bcefd17104612db (patch) | |
tree | 6fc2d40446c81d7921d51df84a6e2c9cb47070a2 | |
parent | 4435a394ecbe91b3b422f25bd6d7d81befa234bb (diff) |
checkpoint taqua
-rw-r--r-- | FS/FS/cdr.pm | 10 | ||||
-rw-r--r-- | httemplate/misc/cdr-import.html | 14 |
2 files changed, 15 insertions, 9 deletions
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index b4347daf0..e9a26794a 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -448,10 +448,12 @@ as keys (for use with batch_import) and "pretty" format names as values. =cut sub import_formats { - 'asterisk' => 'Asterisk', - 'taqua' => 'Taqua', - 'unitel' => 'Unitel/RSLCOM', - 'simple' => 'Simple', + ( + 'asterisk' => 'Asterisk', + 'taqua' => 'Taqua', + 'unitel' => 'Unitel/RSLCOM', + 'simple' => 'Simple', + ); } my($tmp_mday, $tmp_mon, $tmp_year); diff --git a/httemplate/misc/cdr-import.html b/httemplate/misc/cdr-import.html index 60f619e81..a71b25b67 100644 --- a/httemplate/misc/cdr-import.html +++ b/httemplate/misc/cdr-import.html @@ -1,11 +1,13 @@ <% include("/elements/header.html",'Call Detail Record Import') %> <FORM ACTION="process/cdr-import.html" METHOD="POST" ENCTYPE="multipart/form-data"> Import a CSV file containing Call Detail Records (CDRs).<BR><BR> -CDR Format: <SELECT NAME="format"> -<OPTION VALUE="asterisk">Asterisk</OPTION> -<OPTION VALUE="unitel">Unitel/RSLCOM</OPTION> -<OPTION VALUE="simple">Simple</OPTION> -</SELECT><BR><BR> +CDR Format: +<SELECT NAME="format"> +% foreach $format ( keys %formats ) { + <OPTION VALUE="<% $format %>"><% $format{$format} %></OPTION> +% } +</SELECT> +<BR><BR> Filename: <INPUT TYPE="file" NAME="csvfile"><BR><BR> @@ -19,4 +21,6 @@ Filename: <INPUT TYPE="file" NAME="csvfile"><BR><BR> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); +tie my %formats, FS::cdr->import_formats; + </%init> |