add a global countrycode to phone_avail import and a conf for the default (some other...
[freeside.git] / httemplate / misc / phone_avail-import.html
index 98dcc8a..1f4d8ca 100644 (file)
@@ -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>