projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4435a39
)
checkpoint taqua
author
ivan
<ivan>
Fri, 11 Apr 2008 01:50:17 +0000
(
01:50
+0000)
committer
ivan
<ivan>
Fri, 11 Apr 2008 01:50:17 +0000
(
01:50
+0000)
FS/FS/cdr.pm
patch
|
blob
|
history
httemplate/misc/cdr-import.html
patch
|
blob
|
history
diff --git
a/FS/FS/cdr.pm
b/FS/FS/cdr.pm
index
b4347da
..
e9a2679
100644
(file)
--- 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 {
=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);
}
my($tmp_mday, $tmp_mon, $tmp_year);
diff --git
a/httemplate/misc/cdr-import.html
b/httemplate/misc/cdr-import.html
index
60f619e
..
a71b25b
100644
(file)
--- 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>
<% 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>
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');
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
+tie my %formats, FS::cdr->import_formats;
+
</%init>
</%init>