summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2008-11-09 09:14:40 +0000
committerivan <ivan>2008-11-09 09:14:40 +0000
commit63ec397ccea7b71f6ae9b77db7f905c1a56d430d (patch)
treede705c19a8b6c1190b8740c5f0381e43163cdadc /httemplate
parent54d73dfad0b27edd10ec7c917a96c88d45ad6789 (diff)
add a global countrycode to phone_avail import and a conf for the default (some other conf values snuck in also, oh well)
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/file-upload.html2
-rw-r--r--httemplate/misc/phone_avail-import.html17
2 files changed, 15 insertions, 4 deletions
diff --git a/httemplate/elements/file-upload.html b/httemplate/elements/file-upload.html
index 023bffb1e..c8b026d04 100644
--- a/httemplate/elements/file-upload.html
+++ b/httemplate/elements/file-upload.html
@@ -55,7 +55,7 @@
% foreach (@field) {
<TR>
- <TH><% shift @label %></TH>
+ <TH ALIGN="right"><% shift @label %></TH>
<TD><INPUT TYPE="file" NAME="<% $_ %>" /></TD>
</TR>
% }
diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html
index 98dcc8abb..1f4d8caae 100644
--- a/httemplate/misc/phone_avail-import.html
+++ b/httemplate/misc/phone_avail-import.html
@@ -19,8 +19,6 @@ Import a file containing phone numbers (DIDs).
<INPUT TYPE="hidden" NAME="availbatch" VALUE="<% $availbatch %>">
- <INPUT TYPE="hidden" NAME="countrycode" VALUE="1">
-
<% include( '/elements/tr-select-table.html',
'table' => 'part_export',
'name_col' => 'machine',
@@ -31,6 +29,16 @@ Import a file containing phone numbers (DIDs).
)
%>
+ <TR>
+ <TH ALIGN="right">Country code</TH>
+ <TD>
+ <INPUT TYPE = "text"
+ NAME = "countrycode"
+ VALUE = "<% $conf->config('default_phone_countrycode') || 1 %>"
+ >
+ </TD>
+ </TR>
+
<% include( '/elements/file-upload.html',
'field' => 'file',
'label' => 'Filename',
@@ -72,6 +80,9 @@ Field information:
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
-my $availbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
+my $conf = new FS::Conf;
+
+my $availbatch =
+ time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
</%init>