add a global countrycode to phone_avail import and a conf for the default (some other...
authorivan <ivan>
Sun, 9 Nov 2008 09:14:40 +0000 (09:14 +0000)
committerivan <ivan>
Sun, 9 Nov 2008 09:14:40 +0000 (09:14 +0000)
FS/FS/Conf.pm
httemplate/elements/file-upload.html
httemplate/misc/phone_avail-import.html

index 40ef14c..b86bfa8 100644 (file)
@@ -1815,6 +1815,13 @@ worry that config_items is freeside-specific and icky.
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'agent-ship_address',
+    'section'     => '',
+    'description' => "Use the agent's master service address as the service address (only ship_address2 can be entered, if blank on the master address).  Useful for multi-tenant applications.",
+    'type'        => 'checkbox',
+  },
+
   { 'key'         => 'referral_credit',
     'section'     => 'billing',
     'description' => "Enables one-time referral credits in the amount of one month <i>referred</i> customer's recurring fee (irregardless of frequency).",
@@ -2294,7 +2301,7 @@ worry that config_items is freeside-specific and icky.
   {
     'key'         => 'cust_main-require_phone',
     'section'     => '',
-    'description' => 'Require daytime or night for all customer records.',
+    'description' => 'Require daytime or night phone for all customer records.',
     'type'        => 'checkbox',
   },
 
@@ -2492,6 +2499,64 @@ worry that config_items is freeside-specific and icky.
   },
 
   {
+    'key'         => 'selfservice-head',
+    'section'     => '',
+    'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags',
+    'type'        => 'textarea', #htmlarea?
+  },
+
+
+  {
+    'key'         => 'selfservice-body_header',
+    'section'     => '',
+    'description' => 'HTML header for the self-service interface',
+    'type'        => 'textarea', #htmlarea?
+  },
+
+  {
+    'key'         => 'selfservice-body_footer',
+    'section'     => '',
+    'description' => 'HTML header for the self-service interface',
+    'type'        => 'textarea', #htmlarea?
+  },
+
+
+  {
+    'key'         => 'selfservice-body_bgcolor',
+    'section'     => '',
+    'description' => 'HTML background color for the self-service interface, for example, #FFFFFF',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'selfservice-box_bgcolor',
+    'section'     => '',
+    'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0"',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'signup-no_company',
+    'section'     => '',
+    'description' => "Don't display a field for company name on signup.",
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'signup-recommend_email',
+    'section'     => '',
+    'description' => 'Encourage the entry of an invoicing email address on signup.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'signup-recommend_daytime',
+    'section'     => '',
+    'description' => 'Encourage the entry of a daytime phone number  invoicing email address on signup.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'svc_phone-radius-default_password',
     'section'     => '',
     'description' => 'Default password when exporting svc_phone records to RADIUS',
@@ -2505,6 +2570,13 @@ worry that config_items is freeside-specific and icky.
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'default_phone_countrycode',
+    'section'     => '',
+    'description' => 'Default countrcode',
+    'type'        => 'text',
+  },
+
 );
 
 1;
index 023bffb..c8b026d 100644 (file)
@@ -55,7 +55,7 @@
 
 % foreach (@field) {
     <TR>
-      <TH><% shift @label %></TH>
+      <TH ALIGN="right"><% shift @label %></TH>
       <TD><INPUT TYPE="file" NAME="<% $_ %>" /></TD>
     </TR>
 % }
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>