bring up-to-date wrt 1.7 Conf.pm 1.180.2.49 (2009-7-26), RT#2873
[freeside.git] / FS / FS / Conf_compat17.pm
1 package FS::Conf_compat17;
2
3 use vars qw($default_dir $base_dir @config_items @card_types $DEBUG );
4 use IO::File;
5 use File::Basename;
6 use FS::ConfItem;
7 use FS::ConfDefaults;
8
9 $base_dir = '%%%FREESIDE_CONF%%%';
10 $default_dir = '%%%FREESIDE_CONF%%%';
11
12
13 $DEBUG = 0;
14
15 =head1 NAME
16
17 FS::Conf - Freeside configuration values
18
19 =head1 SYNOPSIS
20
21   use FS::Conf;
22
23   $conf = new FS::Conf "/config/directory";
24
25   $FS::Conf::default_dir = "/config/directory";
26   $conf = new FS::Conf;
27
28   $dir = $conf->dir;
29
30   $value = $conf->config('key');
31   @list  = $conf->config('key');
32   $bool  = $conf->exists('key');
33
34   $conf->touch('key');
35   $conf->set('key' => 'value');
36   $conf->delete('key');
37
38   @config_items = $conf->config_items;
39
40 =head1 DESCRIPTION
41
42 Read and write Freeside configuration values.  Keys currently map to filenames,
43 but this may change in the future.
44
45 =head1 METHODS
46
47 =over 4
48
49 =item new [ DIRECTORY ]
50
51 Create a new configuration object.  A directory arguement is required if
52 $FS::Conf::default_dir has not been set.
53
54 =cut
55
56 sub new {
57   my($proto,$dir) = @_;
58   my($class) = ref($proto) || $proto;
59   my($self) = { 'dir'      => $dir || $default_dir,
60                 'base_dir' => $base_dir,
61               };
62   bless ($self, $class);
63 }
64
65 =item dir
66
67 Returns the conf directory.
68
69 =cut
70
71 sub dir {
72   my($self) = @_;
73   my $dir = $self->{dir};
74   -e $dir or die "FATAL: $dir doesn't exist!";
75   -d $dir or die "FATAL: $dir isn't a directory!";
76   -r $dir or die "FATAL: Can't read $dir!";
77   -x $dir or die "FATAL: $dir not searchable (executable)!";
78   $dir =~ /^(.*)$/;
79   $1;
80 }
81
82 =item base_dir
83
84 Returns the base directory.  By default this is /usr/local/etc/freeside.
85
86 =cut
87
88 sub base_dir {
89   my($self) = @_;
90   my $base_dir = $self->{base_dir};
91   -e $base_dir or die "FATAL: $base_dir doesn't exist!";
92   -d $base_dir or die "FATAL: $base_dir isn't a directory!";
93   -r $base_dir or die "FATAL: Can't read $base_dir!";
94   -x $base_dir or die "FATAL: $base_dir not searchable (executable)!";
95   $base_dir =~ /^(.*)$/;
96   $1;
97 }
98
99 =item config KEY
100
101 Returns the configuration value or values (depending on context) for key.
102
103 =cut
104
105 sub config {
106   my($self,$file)=@_;
107   my($dir)=$self->dir;
108   my $fh = new IO::File "<$dir/$file" or return;
109   if ( wantarray ) {
110     map {
111       /^(.*)$/
112         or die "Illegal line (array context) in $dir/$file:\n$_\n";
113       $1;
114     } <$fh>;
115   } else {
116     <$fh> =~ /^(.*)$/
117       or die "Illegal line (scalar context) in $dir/$file:\n$_\n";
118     $1;
119   }
120 }
121
122 =item config_binary KEY
123
124 Returns the exact scalar value for key.
125
126 =cut
127
128 sub config_binary {
129   my($self,$file)=@_;
130   my($dir)=$self->dir;
131   my $fh = new IO::File "<$dir/$file" or return;
132   local $/;
133   my $content = <$fh>;
134   $content;
135 }
136
137 =item exists KEY
138
139 Returns true if the specified key exists, even if the corresponding value
140 is undefined.
141
142 =cut
143
144 sub exists {
145   my($self,$file)=@_;
146   my($dir) = $self->dir;
147   -e "$dir/$file";
148 }
149
150 =item config_orbase KEY SUFFIX
151
152 Returns the configuration value or values (depending on context) for 
153 KEY_SUFFIX, if it exists, otherwise for KEY
154
155 =cut
156
157 sub config_orbase {
158   my( $self, $file, $suffix ) = @_;
159   if ( $self->exists("${file}_$suffix") ) {
160     $self->config("${file}_$suffix");
161   } else {
162     $self->config($file);
163   }
164 }
165
166 =item touch KEY
167
168 Creates the specified configuration key if it does not exist.
169
170 =cut
171
172 sub touch {
173   my($self, $file) = @_;
174   my $dir = $self->dir;
175   unless ( $self->exists($file) ) {
176     warn "[FS::Conf] TOUCH $file\n" if $DEBUG;
177     system('touch', "$dir/$file");
178   }
179 }
180
181 =item set KEY VALUE
182
183 Sets the specified configuration key to the given value.
184
185 =cut
186
187 sub set {
188   my($self, $file, $value) = @_;
189   my $dir = $self->dir;
190   $value =~ /^(.*)$/s;
191   $value = $1;
192   unless ( join("\n", @{[ $self->config($file) ]}) eq $value ) {
193     warn "[FS::Conf] SET $file\n" if $DEBUG;
194 #    warn "$dir" if is_tainted($dir);
195 #    warn "$dir" if is_tainted($file);
196     chmod 0644, "$dir/$file";
197     my $fh = new IO::File ">$dir/$file" or return;
198     chmod 0644, "$dir/$file";
199     print $fh "$value\n";
200   }
201 }
202 #sub is_tainted {
203 #             return ! eval { join('',@_), kill 0; 1; };
204 #         }
205
206 =item delete KEY
207
208 Deletes the specified configuration key.
209
210 =cut
211
212 sub delete {
213   my($self, $file) = @_;
214   my $dir = $self->dir;
215   if ( $self->exists($file) ) {
216     warn "[FS::Conf] DELETE $file\n";
217     unlink "$dir/$file";
218   }
219 }
220
221 =item config_items
222
223 Returns all of the possible configuration items as FS::ConfItem objects.  See
224 L<FS::ConfItem>.
225
226 =cut
227
228 sub config_items {
229   my $self = shift; 
230   #quelle kludge
231   @config_items,
232   ( map { 
233         my $basename = basename($_);
234         $basename =~ /^(.*)$/;
235         $basename = $1;
236         new FS::ConfItem {
237                            'key'         => $basename,
238                            'section'     => 'billing',
239                            'description' => 'Alternate template file for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
240                            'type'        => 'textarea',
241                          }
242       } glob($self->dir. '/invoice_template_*')
243   ),
244   ( map { 
245         my $basename = basename($_);
246         $basename =~ /^(.*)$/;
247         $basename = $1;
248         new FS::ConfItem {
249                            'key'         => $basename,
250                            'section'     => 'billing',
251                            'description' => 'Alternate HTML template for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
252                            'type'        => 'textarea',
253                          }
254       } glob($self->dir. '/invoice_html_*')
255   ),
256   ( map { 
257         my $basename = basename($_);
258         $basename =~ /^(.*)$/;
259         $basename = $1;
260         ($latexname = $basename ) =~ s/latex/html/;
261         new FS::ConfItem {
262                            'key'         => $basename,
263                            'section'     => 'billing',
264                            'description' => "Alternate Notes section for HTML invoices.  Defaults to the same data in $latexname if not specified.",
265                            'type'        => 'textarea',
266                          }
267       } glob($self->dir. '/invoice_htmlnotes_*')
268   ),
269   ( map { 
270         my $basename = basename($_);
271         $basename =~ /^(.*)$/;
272         $basename = $1;
273         new FS::ConfItem {
274                            'key'         => $basename,
275                            'section'     => 'billing',
276                            'description' => 'Alternate LaTeX template for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
277                            'type'        => 'textarea',
278                          }
279       } glob($self->dir. '/invoice_latex_*')
280   ),
281   ( map { 
282         my $basename = basename($_);
283         $basename =~ /^(.*)$/;
284         $basename = $1;
285         new FS::ConfItem {
286                            'key'         => $basename,
287                            'section'     => 'billing',
288                            'description' => 'Alternate Notes section for LaTeX typeset PostScript invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
289                            'type'        => 'textarea',
290                          }
291       } glob($self->dir. '/invoice_latexnotes_*')
292   );
293 }
294
295 =back
296
297 =head1 BUGS
298
299 If this was more than just crud that will never be useful outside Freeside I'd
300 worry that config_items is freeside-specific and icky.
301
302 =head1 SEE ALSO
303
304 "Configuration" in the web interface (config/config.cgi).
305
306 httemplate/docs/config.html
307
308 =cut
309
310 #Business::CreditCard
311 @card_types = (
312   "VISA card",
313   "MasterCard",
314   "Discover card",
315   "American Express card",
316   "Diner's Club/Carte Blanche",
317   "enRoute",
318   "JCB",
319   "BankCard",
320   "Switch",
321   "Solo",
322 );
323
324 @config_items = map { new FS::ConfItem $_ } (
325
326   {
327     'key'         => 'address',
328     'section'     => 'deprecated',
329     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
330     'type'        => 'text',
331   },
332
333   {
334     'key'         => 'alerter_template',
335     'section'     => 'billing',
336     'description' => 'Template file for billing method expiration alerts.  See the <a href="../docs/billing.html#invoice_template">billing documentation</a> for details.',
337     'type'        => 'textarea',
338   },
339
340   {
341     'key'         => 'apacheroot',
342     'section'     => 'deprecated',
343     'description' => '<b>DEPRECATED</b>, add a <i>www_shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  The directory containing Apache virtual hosts',
344     'type'        => 'text',
345   },
346
347   {
348     'key'         => 'apacheip',
349     'section'     => 'deprecated',
350     'description' => '<b>DEPRECATED</b>, add an <i>apache</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be the current IP address to assign to new virtual hosts',
351     'type'        => 'text',
352   },
353
354   {
355     'key'         => 'apachemachine',
356     'section'     => 'deprecated',
357     'description' => '<b>DEPRECATED</b>, add a <i>www_shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  A machine with the apacheroot directory and user home directories.  The existance of this file enables setup of virtual host directories, and, in conjunction with the `home\' configuration file, symlinks into user home directories.',
358     'type'        => 'text',
359   },
360
361   {
362     'key'         => 'apachemachines',
363     'section'     => 'deprecated',
364     'description' => '<b>DEPRECATED</b>, add an <i>apache</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be Apache machines, one per line.  This enables export of `/etc/apache/vhosts.conf\', which can be included in your Apache configuration via the <a href="http://www.apache.org/docs/mod/core.html#include">Include</a> directive.',
365     'type'        => 'textarea',
366   },
367
368   {
369     'key'         => 'bindprimary',
370     'section'     => 'deprecated',
371     'description' => '<b>DEPRECATED</b>, add a <i>bind</i> <a href="../browse/part_export.cgi">export</a> instead.  Your BIND primary nameserver.  This enables export of /var/named/named.conf and zone files into /var/named',
372     'type'        => 'text',
373   },
374
375   {
376     'key'         => 'bindsecondaries',
377     'section'     => 'deprecated',
378     'description' => '<b>DEPRECATED</b>, add a <i>bind_slave</i> <a href="../browse/part_export.cgi">export</a> instead.  Your BIND secondary nameservers, one per line.  This enables export of /var/named/named.conf',
379     'type'        => 'textarea',
380   },
381
382   {
383     'key'         => 'encryption',
384     'section'     => 'billing',
385     'description' => 'Enable encryption of credit cards.',
386     'type'        => 'checkbox',
387   },
388
389   {
390     'key'         => 'encryptionmodule',
391     'section'     => 'billing',
392     'description' => 'Use which module for encryption?',
393     'type'        => 'text',
394   },
395
396   {
397     'key'         => 'encryptionpublickey',
398     'section'     => 'billing',
399     'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
400     'type'        => 'textarea',
401   },
402
403   {
404     'key'         => 'encryptionprivatekey',
405     'section'     => 'billing',
406     'description' => 'Your RSA Private Key - Including this will enable the "Bill Now" feature.  However if the system is compromised, a hacker can use this key to decode the stored credit card information.  This is generally not a good idea.',
407     'type'        => 'textarea',
408   },
409
410   {
411     'key'         => 'business-onlinepayment',
412     'section'     => 'billing',
413     'description' => '<a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support, at least three lines: processor, login, and password.  An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\').    Optional additional lines are passed to Business::OnlinePayment as %processor_options.',
414     'type'        => 'textarea',
415   },
416
417   {
418     'key'         => 'business-onlinepayment-ach',
419     'section'     => 'billing',
420     'description' => 'Alternate <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support for ACH transactions (defaults to regular <b>business-onlinepayment</b>).  At least three lines: processor, login, and password.  An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\').    Optional additional lines are passed to Business::OnlinePayment as %processor_options.',
421     'type'        => 'textarea',
422   },
423
424   {
425     'key'         => 'business-onlinepayment-description',
426     'section'     => 'billing',
427     'description' => 'String passed as the description field to <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a>.  Evaluated as a double-quoted perl string, with the following variables available: <code>$agent</code> (the agent name), and <code>$pkgs</code> (a comma-separated list of packages for which these charges apply)',
428     'type'        => 'text',
429   },
430
431   {
432     'key'         => 'business-onlinepayment-email-override',
433     'section'     => 'billing',
434     'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
435     'type'        => 'text',
436   },
437
438   {
439     'key'         => 'bsdshellmachines',
440     'section'     => 'deprecated',
441     'description' => '<b>DEPRECATED</b>, add a <i>bsdshell</i> <a href="../browse/part_export.cgi">export</a> instead.  Your BSD flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/master.passwd\'.',
442     'type'        => 'textarea',
443   },
444
445   {
446     'key'         => 'business-onlinepayment-email_customer',
447     'section'     => 'billing',
448     'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
449     'type'        => 'checkbox',
450   },
451
452   {
453     'key'         => 'countrydefault',
454     'section'     => 'UI',
455     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
456     'type'        => 'text',
457   },
458
459   {
460     'key'         => 'date_format',
461     'section'     => 'UI',
462     'description' => 'Format for displaying dates',
463     'type'        => 'select',
464     'select_hash' => [
465                        '%m/%d/%Y' => 'MM/DD/YYYY',
466                        '%Y/%m/%d' => 'YYYY/MM/DD',
467                      ],
468   },
469
470   {
471     'key'         => 'cyrus',
472     'section'     => 'deprecated',
473     'description' => '<b>DEPRECATED</b>, add a <i>cyrus</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to integrate with <a href="http://asg.web.cmu.edu/cyrus/imapd/">Cyrus IMAP Server</a>, three lines: IMAP server, admin username, and admin password.  Cyrus::IMAP::Admin should be installed locally and the connection to the server secured.',
474     'type'        => 'textarea',
475   },
476
477   {
478     'key'         => 'cp_app',
479     'section'     => 'deprecated',
480     'description' => '<b>DEPRECATED</b>, add a <i>cp</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to integrate with <a href="http://www.cp.net/">Critial Path Account Provisioning Protocol</a>, four lines: "host:port", username, password, and workgroup (for new users).',
481     'type'        => 'textarea',
482   },
483
484   {
485     'key'         => 'deletecustomers',
486     'section'     => 'UI',
487     'description' => 'Enable customer deletions.  Be very careful!  Deleting a customer will remove all traces that this customer ever existed!  It should probably only be used when auditing a legacy database.  Normally, you cancel all of a customers\' packages if they cancel service.',
488     'type'        => 'checkbox',
489   },
490
491   {
492     'key'         => 'deletepayments',
493     'section'     => 'billing',
494     'description' => 'Enable deletion of unclosed payments.  Really, with voids this is pretty much not recommended in any situation anymore.  Be very careful!  Only delete payments that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
495     'type'        => [qw( checkbox text )],
496   },
497
498   {
499     'key'         => 'deletecredits',
500     'section'     => 'deprecated',
501     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable deletion of unclosed credits.  Be very careful!  Only delete credits that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.',
502     'type'        => [qw( checkbox text )],
503   },
504
505   {
506     'key'         => 'deleterefunds',
507     'section'     => 'billing',
508     'description' => 'Enable deletion of unclosed refunds.  Be very careful!  Only delete refunds that were data-entry errors, not adjustments.',
509     'type'        => 'checkbox',
510   },
511
512   {
513     'key'         => 'unapplypayments',
514     'section'     => 'deprecated',
515     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable "unapplication" of unclosed payments.',
516     'type'        => 'checkbox',
517   },
518
519   {
520     'key'         => 'unapplycredits',
521     'section'     => 'deprecated',
522     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to nable "unapplication" of unclosed credits.',
523     'type'        => 'checkbox',
524   },
525
526   {
527     'key'         => 'dirhash',
528     'section'     => 'shell',
529     'description' => 'Optional numeric value to control directory hashing.  If positive, hashes directories for the specified number of levels from the front of the username.  If negative, hashes directories for the specified number of levels from the end of the username.  Some examples: <ul><li>1: user -> <a href="#home">/home</a>/u/user<li>2: user -> <a href="#home">/home</a>/u/s/user<li>-1: user -> <a href="#home">/home</a>/r/user<li>-2: user -> <a href="#home">home</a>/r/e/user</ul>',
530     'type'        => 'text',
531   },
532
533   {
534     'key'         => 'disable_customer_referrals',
535     'section'     => 'UI',
536     'description' => 'Disable new customer-to-customer referrals in the web interface',
537     'type'        => 'checkbox',
538   },
539
540   {
541     'key'         => 'editreferrals',
542     'section'     => 'UI',
543     'description' => 'Enable advertising source modification for existing customers',
544     'type'       => 'checkbox',
545   },
546
547   {
548     'key'         => 'emailinvoiceonly',
549     'section'     => 'billing',
550     'description' => 'Disables postal mail invoices',
551     'type'       => 'checkbox',
552   },
553
554   {
555     'key'         => 'disablepostalinvoicedefault',
556     'section'     => 'billing',
557     'description' => 'Disables postal mail invoices as the default option in the UI.  Be careful not to setup customers which are not sent invoices.  See <a href ="#emailinvoiceauto">emailinvoiceauto</a>.',
558     'type'       => 'checkbox',
559   },
560
561   {
562     'key'         => 'emailinvoiceauto',
563     'section'     => 'billing',
564     'description' => 'Automatically adds new accounts to the email invoice list',
565     'type'       => 'checkbox',
566   },
567
568   {
569     'key'         => 'emailinvoiceautoalways',
570     'section'     => 'billing',
571     'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
572     'type'       => 'checkbox',
573   },
574
575   {
576     'key'         => 'exclude_ip_addr',
577     'section'     => '',
578     'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
579     'type'        => 'textarea',
580   },
581   
582   {
583     'key'         => 'erpcdmachines',
584     'section'     => 'deprecated',
585     'description' => '<b>DEPRECATED</b>, ERPCD is no longer supported.  Used to be ERPCD authentication machines, one per line.  This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'',
586     'type'        => 'textarea',
587   },
588
589   {
590     'key'         => 'hidecancelledpackages',
591     'section'     => 'UI',
592     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
593     'type'        => 'checkbox',
594   },
595
596   {
597     'key'         => 'hidecancelledcustomers',
598     'section'     => 'UI',
599     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
600     'type'        => 'checkbox',
601   },
602
603   {
604     'key'         => 'home',
605     'section'     => 'required',
606     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
607     'type'        => 'text',
608   },
609
610   {
611     'key'         => 'icradiusmachines',
612     'section'     => 'deprecated',
613     'description' => '<b>DEPRECATED</b>, add an <i>sqlradius</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to enable radcheck and radreply table population - by default in the Freeside database, or in the database specified by the <a href="http://rootwood.haze.st/aspside/config/config-view.cgi#icradius_secrets">icradius_secrets</a> config option (the radcheck and radreply tables needs to be created manually).  You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS MySQL database with this option.  <blockquote><b>ADDITIONAL DEPRECATED FUNCTIONALITY</b> (instead use <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication">MySQL replication</a> or point icradius_secrets to the external database) - your <a href="ftp://ftp.cheapnet.net/pub/icradius">ICRADIUS</a> machines or <a href="http://www.freeradius.org/">FreeRADIUS</a> (with MySQL authentication) machines, one per line.  Machines listed in this file will have the radcheck table exported to them.  Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password.  For example: <CODE>"radius.isp.tld&nbsp;radius_db&nbsp;radius_user&nbsp;passw0rd"</CODE></blockquote>',
614     'type'        => [qw( checkbox textarea )],
615   },
616
617   {
618     'key'         => 'icradius_mysqldest',
619     'section'     => 'deprecated',
620     'description' => '<b>DEPRECATED</b>, add an <i>sqlradius</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be the destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines.  Defaults to "/usr/local/var/".',
621     'type'        => 'text',
622   },
623
624   {
625     'key'         => 'icradius_mysqlsource',
626     'section'     => 'deprecated',
627     'description' => '<b>DEPRECATED</b>, add an <i>sqlradius</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be the source directory for for the MySQL radcheck table files, on the Freeside machine.  Defaults to "/usr/local/var/freeside".',
628     'type'        => 'text',
629   },
630
631   {
632     'key'         => 'icradius_secrets',
633     'section'     => 'deprecated',
634     'description' => '<b>DEPRECATED</b>, add an <i>sqlradius</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to specify a database for ICRADIUS/FreeRADIUS export.  Three lines: DBI data source, username and password.',
635     'type'        => 'textarea',
636   },
637
638   {
639     'key'         => 'invoice_from',
640     'section'     => 'required',
641     'description' => 'Return address on email invoices',
642     'type'        => 'text',
643   },
644
645   {
646     'key'         => 'invoice_subject',
647     'section'     => 'billing',
648     'description' => 'Subject: header on email invoices.  Defaults to "Invoice".  The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
649     'type'        => 'text',
650   },
651
652   {
653     'key'         => 'invoice_template',
654     'section'     => 'required',
655     'description' => 'Required template file for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
656     'type'        => 'textarea',
657   },
658
659   {
660     'key'         => 'invoice_html',
661     'section'     => 'billing',
662     'description' => 'Optional HTML template for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
663
664     'type'        => 'textarea',
665   },
666
667   {
668     'key'         => 'invoice_htmlnotes',
669     'section'     => 'billing',
670     'description' => 'Notes section for HTML invoices.  Defaults to the same data in invoice_latexnotes if not specified.',
671     'type'        => 'textarea',
672   },
673
674   {
675     'key'         => 'invoice_htmlfooter',
676     'section'     => 'billing',
677     'description' => 'Footer for HTML invoices.  Defaults to the same data in invoice_latexfooter if not specified.',
678     'type'        => 'textarea',
679   },
680
681   {
682     'key'         => 'invoice_htmlreturnaddress',
683     'section'     => 'billing',
684     'description' => 'Return address for HTML invoices.  Defaults to the same data in invoice_latexreturnaddress if not specified.',
685     'type'        => 'textarea',
686   },
687
688   {
689     'key'         => 'invoice_latex',
690     'section'     => 'billing',
691     'description' => 'Optional LaTeX template for typeset PostScript invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
692     'type'        => 'textarea',
693   },
694
695   {
696     'key'         => 'invoice_latexnotes',
697     'section'     => 'billing',
698     'description' => 'Notes section for LaTeX typeset PostScript invoices.',
699     'type'        => 'textarea',
700   },
701
702   {
703     'key'         => 'invoice_latexfooter',
704     'section'     => 'billing',
705     'description' => 'Footer for LaTeX typeset PostScript invoices.',
706     'type'        => 'textarea',
707   },
708
709   {
710     'key'         => 'invoice_latexcoupon',
711     'section'     => 'billing',
712     'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
713     'type'        => 'textarea',
714   },
715
716   {
717     'key'         => 'invoice_latexreturnaddress',
718     'section'     => 'billing',
719     'description' => 'Return address for LaTeX typeset PostScript invoices.',
720     'type'        => 'textarea',
721   },
722
723   {
724     'key'         => 'invoice_latexsmallfooter',
725     'section'     => 'billing',
726     'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
727     'type'        => 'textarea',
728   },
729
730   {
731     'key'         => 'invoice_email_pdf',
732     'section'     => 'billing',
733     'description' => 'Send PDF invoice as an attachment to emailed invoices.  By default, includes the plain text invoice as the email body, unless invoice_email_pdf_note is set.',
734     'type'        => 'checkbox'
735   },
736
737   {
738     'key'         => 'invoice_email_pdf_note',
739     'section'     => 'billing',
740     'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
741     'type'        => 'textarea'
742   },
743
744
745   { 
746     'key'         => 'invoice_default_terms',
747     'section'     => 'billing',
748     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
749     'type'        => 'select',
750     'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 30', 'Net 45', 'Net 60' ],
751   },
752
753   {
754     'key'         => 'invoice_send_receipts',
755     'section'     => 'deprecated',
756     'description' => '<b>DEPRECATED</b>, this used to send an invoice copy on payments and credits.  See the payment_receipt_email and XXXX instead.',
757     'type'        => 'checkbox',
758   },
759
760   {
761     'key'         => 'payment_receipt_email',
762     'section'     => 'billing',
763     'description' => 'Template file for payment receipts.  Payment receipts are sent to the customer email invoice destination(s) when a payment is received.  See the <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitution language.  The following variables are available: <ul><li><code>$date</code> <li><code>$name</code> <li><code>$paynum</code> - Freeside payment number <li><code>$paid</code> - Amount of payment <li><code>$payby</code> - Payment type (Card, Check, Electronic check, etc.) <li><code>$payinfo</code> - Masked credit card number or check number <li><code>$balance</code> - New balance</ul>',
764     'type'        => [qw( checkbox textarea )],
765   },
766
767   {
768     'key'         => 'lpr',
769     'section'     => 'required',
770     'description' => 'Print command for paper invoices, for example `lpr -h\'',
771     'type'        => 'text',
772   },
773
774   {
775     'key'         => 'maildisablecatchall',
776     'section'     => 'deprecated',
777     'description' => '<b>DEPRECATED</b>, now the default.  Turning this option on used to disable the requirement that each virtual domain have a catch-all mailbox.',
778     'type'        => 'checkbox',
779   },
780
781   {
782     'key'         => 'lpr-postscript_prefix',
783     'section'     => 'billing',
784     'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
785     'type'        => 'text',
786   },
787
788   {
789     'key'         => 'lpr-postscript_suffix',
790     'section'     => 'billing',
791     'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
792     'type'        => 'text',
793   },
794
795   {
796     'key'         => 'money_char',
797     'section'     => '',
798     'description' => 'Currency symbol - defaults to `$\'',
799     'type'        => 'text',
800   },
801
802   {
803     'key'         => 'mxmachines',
804     'section'     => 'deprecated',
805     'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'',
806     'type'        => 'textarea',
807   },
808
809   {
810     'key'         => 'nsmachines',
811     'section'     => 'deprecated',
812     'description' => 'NS nameservers for new domains, one per line, with trailing `.\'',
813     'type'        => 'textarea',
814   },
815
816   {
817     'key'         => 'defaultrecords',
818     'section'     => 'BIND',
819     'description' => 'DNS entries to add automatically when creating a domain',
820     'type'        => 'editlist',
821     'editlist_parts' => [ { type=>'text' },
822                           { type=>'immutable', value=>'IN' },
823                           { type=>'select',
824                             select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS TXT)} },
825                           { type=> 'text' }, ],
826   },
827
828   {
829     'key'         => 'arecords',
830     'section'     => 'deprecated',
831     'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
832     'type'        => 'textarea',
833   },
834
835   {
836     'key'         => 'cnamerecords',
837     'section'     => 'deprecated',
838     'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
839     'type'        => 'textarea',
840   },
841
842   {
843     'key'         => 'nismachines',
844     'section'     => 'deprecated',
845     'description' => '<b>DEPRECATED</b>.  Your NIS master (not slave master) machines, one per line.  This enables export of `/etc/global/passwd\' and `/etc/global/shadow\'.',
846     'type'        => 'textarea',
847   },
848
849   {
850     'key'         => 'passwordmin',
851     'section'     => 'password',
852     'description' => 'Minimum password length (default 6)',
853     'type'        => 'text',
854   },
855
856   {
857     'key'         => 'passwordmax',
858     'section'     => 'password',
859     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
860     'type'        => 'text',
861   },
862
863   {
864     'key' => 'password-noampersand',
865     'section' => 'password',
866     'description' => 'Disallow ampersands in passwords',
867     'type' => 'checkbox',
868   },
869
870   {
871     'key' => 'password-noexclamation',
872     'section' => 'password',
873     'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
874     'type' => 'checkbox',
875   },
876
877   {
878     'key'         => 'qmailmachines',
879     'section'     => 'deprecated',
880     'description' => '<b>DEPRECATED</b>, add <i>qmail</i> and <i>shellcommands</i> <a href="../browse/part_export.cgi">exports</a> instead.  This option used to export `/var/qmail/control/virtualdomains\', `/var/qmail/control/recipientmap\', and `/var/qmail/control/rcpthosts\'.  Setting this option (even if empty) also turns on user `.qmail-extension\' file maintenance in conjunction with the <b>shellmachine</b> option.',
881     'type'        => [qw( checkbox textarea )],
882   },
883
884   {
885     'key'         => 'radiusmachines',
886     'section'     => 'deprecated',
887     'description' => '<b>DEPRECATED</b>, add an <i>sqlradius</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to export to be: your RADIUS authentication machines, one per line.  This enables export of `/etc/raddb/users\'.',
888     'type'        => 'textarea',
889   },
890
891   {
892     'key'         => 'referraldefault',
893     'section'     => 'UI',
894     'description' => 'Default referral, specified by refnum',
895     'type'        => 'text',
896   },
897
898 #  {
899 #    'key'         => 'registries',
900 #    'section'     => 'required',
901 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
902 #  },
903
904   {
905     'key'         => 'report_template',
906     'section'     => 'deprecated',
907     'description' => 'Deprecated template file for reports.',
908     'type'        => 'textarea',
909   },
910
911
912   {
913     'key'         => 'maxsearchrecordsperpage',
914     'section'     => 'UI',
915     'description' => 'If set, number of search records to return per page.',
916     'type'        => 'text',
917   },
918
919   {
920     'key'         => 'sendmailconfigpath',
921     'section'     => 'deprecated',
922     'description' => '<b>DEPRECATED</b>, add a <i>sendmail</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be sendmail configuration file path.  Defaults to `/etc\'.  Many newer distributions use `/etc/mail\'.',
923     'type'        => 'text',
924   },
925
926   {
927     'key'         => 'sendmailmachines',
928     'section'     => 'deprecated',
929     'description' => '<b>DEPRECATED</b>, add a <i>sendmail</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to be sendmail machines, one per line.  This enables export of `/etc/virtusertable\' and `/etc/sendmail.cw\'.',
930     'type'        => 'textarea',
931   },
932
933   {
934     'key'         => 'sendmailrestart',
935     'section'     => 'deprecated',
936     'description' => '<b>DEPRECATED</b>, add a <i>sendmail</i> <a href="../browse/part_export.cgi">export</a> instead.  Used to define the command which is run on sendmail machines after files are copied.',
937     'type'        => 'text',
938   },
939
940   {
941     'key'         => 'session-start',
942     'section'     => 'session',
943     'description' => 'If defined, the command which is executed on the Freeside machine when a session begins.  The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
944     'type'        => 'text',
945   },
946
947   {
948     'key'         => 'session-stop',
949     'section'     => 'session',
950     'description' => 'If defined, the command which is executed on the Freeside machine when a session ends.  The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
951     'type'        => 'text',
952   },
953
954   {
955     'key'         => 'shellmachine',
956     'section'     => 'deprecated',
957     'description' => '<b>DEPRECATED</b>, add a <i>shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to contain a single machine with user home directories mounted.  This enables home directory creation, renaming and archiving/deletion.  In conjunction with `qmailmachines\', it also enables `.qmail-extension\' file maintenance.',
958     'type'        => 'text',
959   },
960
961   {
962     'key'         => 'shellmachine-useradd',
963     'section'     => 'deprecated',
964     'description' => '<b>DEPRECATED</b>, add a <i>shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to contain command(s) to run on shellmachine when an account is created.  If the <b>shellmachine</b> option is set but this option is not, <code>useradd -d $dir -m -s $shell -u $uid $username</code> is the default.  If this option is set but empty, <code>cp -pr /etc/skel $dir; chown -R $uid.$gid $dir</code> is the default instead.  Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: <code>$username</code>, <code>$uid</code>, <code>$gid</code>, <code>$dir</code>, and <code>$shell</code>.',
965     'type'        => [qw( checkbox text )],
966   },
967
968   {
969     'key'         => 'shellmachine-userdel',
970     'section'     => 'deprecated',
971     'description' => '<b>DEPRECATED</b>, add a <i>shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to contain command(s) to run on shellmachine when an account is deleted.  If the <b>shellmachine</b> option is set but this option is not, <code>userdel $username</code> is the default.  If this option is set but empty, <code>rm -rf $dir</code> is the default instead.  Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: <code>$username</code> and <code>$dir</code>.',
972     'type'        => [qw( checkbox text )],
973   },
974
975   {
976     'key'         => 'shellmachine-usermod',
977     'section'     => 'deprecated',
978     'description' => '<b>DEPRECATED</b>, add a <i>shellcommands</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to contain command(s) to run on shellmachine when an account is modified.  If the <b>shellmachine</b> option is set but this option is empty, <code>[ -d $old_dir ] &amp;&amp; mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir )</code> is the default.  Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$old_dir</code>, <code>$new_dir</code>, <code>$uid</code> and <code>$gid</code>.',
979     #'type'        => [qw( checkbox text )],
980     'type'        => 'text',
981   },
982
983   {
984     'key'         => 'shellmachines',
985     'section'     => 'deprecated',
986     'description' => '<b>DEPRECATED</b>, add a <i>sysvshell</i> <a href="../browse/part_export.cgi">export</a> instead.  Your Linux and System V flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/shadow\' files.',
987      'type'        => 'textarea',
988  },
989
990   {
991     'key'         => 'shells',
992     'section'     => 'required',
993     'description' => 'Legal shells (think /etc/shells).  You probably want to `cut -d: -f7 /etc/passwd | sort | uniq\' initially so that importing doesn\'t fail with `Illegal shell\' errors, then remove any special entries afterwords.  A blank line specifies that an empty shell is permitted.',
994     'type'        => 'textarea',
995   },
996
997   {
998     'key'         => 'showpasswords',
999     'section'     => 'UI',
1000     'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
1001     'type'        => 'checkbox',
1002   },
1003
1004   {
1005     'key'         => 'signupurl',
1006     'section'     => 'UI',
1007     'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your <a href="../docs/signup.html">signup server CGI</a>, the customer view screen will display a customized link to the signup server with the appropriate customer as referral',
1008     'type'        => 'text',
1009   },
1010
1011   {
1012     'key'         => 'smtpmachine',
1013     'section'     => 'required',
1014     'description' => 'SMTP relay for Freeside\'s outgoing mail',
1015     'type'        => 'text',
1016   },
1017
1018   {
1019     'key'         => 'soadefaultttl',
1020     'section'     => 'BIND',
1021     'description' => 'SOA default TTL for new domains.',
1022     'type'        => 'text',
1023   },
1024
1025   {
1026     'key'         => 'soaemail',
1027     'section'     => 'BIND',
1028     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1029     'type'        => 'text',
1030   },
1031
1032   {
1033     'key'         => 'soaexpire',
1034     'section'     => 'BIND',
1035     'description' => 'SOA expire for new domains',
1036     'type'        => 'text',
1037   },
1038
1039   {
1040     'key'         => 'soamachine',
1041     'section'     => 'BIND',
1042     'description' => 'SOA machine for new domains, with trailing `.\'',
1043     'type'        => 'text',
1044   },
1045
1046   {
1047     'key'         => 'soarefresh',
1048     'section'     => 'BIND',
1049     'description' => 'SOA refresh for new domains',
1050     'type'        => 'text',
1051   },
1052
1053   {
1054     'key'         => 'soaretry',
1055     'section'     => 'BIND',
1056     'description' => 'SOA retry for new domains',
1057     'type'        => 'text',
1058   },
1059
1060   {
1061     'key'         => 'statedefault',
1062     'section'     => 'UI',
1063     'description' => 'Default state or province (if not supplied, the default is `CA\')',
1064     'type'        => 'text',
1065   },
1066
1067   {
1068     'key'         => 'radiusprepend',
1069     'section'     => 'deprecated',
1070     'description' => '<b>DEPRECATED</b>, real-time text radius now edits an existing file in place - just (turn off freeside-queued and) edit your RADIUS users file directly.  The contents used to be be prepended to the top of the RADIUS users file (text exports only).',
1071     'type'        => 'textarea',
1072   },
1073
1074   {
1075     'key'         => 'textradiusprepend',
1076     'section'     => 'deprecated',
1077     'description' => '<b>DEPRECATED</b>, use RADIUS check attributes instead.  The contents used to be prepended to the first line of a user\'s RADIUS entry in text exports.',
1078     'type'        => 'text',
1079   },
1080
1081   {
1082     'key'         => 'unsuspendauto',
1083     'section'     => 'billing',
1084     'description' => 'Enables the automatic unsuspension of suspended packages when a customer\'s balance due changes from positive to zero or negative as the result of a payment or credit',
1085     'type'        => 'checkbox',
1086   },
1087
1088   {
1089     'key'         => 'unsuspend-always_adjust_next_bill_date',
1090     'section'     => 'billing',
1091     'description' => 'Global override that causes unsuspensions to always adjust the next bill date under any circumstances.  This is now controlled on a per-package bases - probably best not to use this option unless you are a legacy installation that requires this behaviour.',
1092     'type'        => 'checkbox',
1093   },
1094
1095   {
1096     'key'         => 'usernamemin',
1097     'section'     => 'username',
1098     'description' => 'Minimum username length (default 2)',
1099     'type'        => 'text',
1100   },
1101
1102   {
1103     'key'         => 'usernamemax',
1104     'section'     => 'username',
1105     'description' => 'Maximum username length',
1106     'type'        => 'text',
1107   },
1108
1109   {
1110     'key'         => 'username-ampersand',
1111     'section'     => 'username',
1112     'description' => 'Allow the ampersand character (&amp;) in usernames.  Be careful when using this option in conjunction with <a href="../browse/part_export.cgi">exports</a> which execute shell commands, as the ampersand will be interpreted by the shell if not quoted.',
1113     'type'        => 'checkbox',
1114   },
1115
1116   {
1117     'key'         => 'username-letter',
1118     'section'     => 'username',
1119     'description' => 'Usernames must contain at least one letter',
1120     'type'        => 'checkbox',
1121   },
1122
1123   {
1124     'key'         => 'username-letterfirst',
1125     'section'     => 'username',
1126     'description' => 'Usernames must start with a letter',
1127     'type'        => 'checkbox',
1128   },
1129
1130   {
1131     'key'         => 'username-noperiod',
1132     'section'     => 'username',
1133     'description' => 'Disallow periods in usernames',
1134     'type'        => 'checkbox',
1135   },
1136
1137   {
1138     'key'         => 'username-nounderscore',
1139     'section'     => 'username',
1140     'description' => 'Disallow underscores in usernames',
1141     'type'        => 'checkbox',
1142   },
1143
1144   {
1145     'key'         => 'username-nodash',
1146     'section'     => 'username',
1147     'description' => 'Disallow dashes in usernames',
1148     'type'        => 'checkbox',
1149   },
1150
1151   {
1152     'key'         => 'username-uppercase',
1153     'section'     => 'username',
1154     'description' => 'Allow uppercase characters in usernames',
1155     'type'        => 'checkbox',
1156   },
1157
1158   { 
1159     'key'         => 'username-percent',
1160     'section'     => 'username',
1161     'description' => 'Allow the percent character (%) in usernames.',
1162     'type'        => 'checkbox',
1163   },
1164
1165   {
1166     'key'         => 'username_policy',
1167     'section'     => 'deprecated',
1168     'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts.  This should be one of \'prepend domsvc\' \'append domsvc\' \'append domain\' or \'append @domain\'',
1169     'type'        => 'select',
1170     'select_enum' => [ 'prepend domsvc', 'append domsvc', 'append domain', 'append @domain' ],
1171     #'type'        => 'text',
1172   },
1173
1174   {
1175     'key'         => 'vpopmailmachines',
1176     'section'     => 'deprecated',
1177     'description' => '<b>DEPRECATED</b>, add a <i>vpopmail</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to contain your vpopmail pop toasters, one per line.  Each line is of the form "machinename vpopdir vpopuid vpopgid".  For example: <code>poptoaster.domain.tld /home/vpopmail 508 508</code>  Note: vpopuid and vpopgid are values taken from the vpopmail machine\'s /etc/passwd',
1178     'type'        => 'textarea',
1179   },
1180
1181   {
1182     'key'         => 'vpopmailrestart',
1183     'section'     => 'deprecated',
1184     'description' => '<b>DEPRECATED</b>, add a <i>vpopmail</i> <a href="../browse/part_export.cgi">export</a> instead.  This option used to define the shell commands to run on vpopmail machines after files are copied.  An example can be found in eg/vpopmailrestart of the source distribution.',
1185     'type'        => 'textarea',
1186   },
1187
1188   {
1189     'key'         => 'safe-part_pkg',
1190     'section'     => 'deprecated',
1191     'description' => '<b>DEPRECATED</b>, obsolete.  Used to validate package definition setup and recur expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1192     'type'        => 'checkbox',
1193   },
1194
1195   { 
1196     'key'         => 'username-colon',
1197     'section'     => 'username',
1198     'description' => 'Allow the colon character (:) in usernames.',
1199     'type'        => 'checkbox',
1200   },
1201
1202   {
1203     'key'         => 'safe-part_bill_event',
1204     'section'     => 'UI',
1205     'description' => 'Validates invoice event expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1206     'type'        => 'checkbox',
1207   },
1208
1209   {
1210     'key'         => 'show_ss',
1211     'section'     => 'UI',
1212     'description' => 'Turns on display/collection of SS# in the web interface.',
1213     'type'        => 'checkbox',
1214   },
1215
1216   { 
1217     'key'         => 'show_stateid',
1218     'section'     => 'UI',
1219     'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface.  Sometimes required by electronic check (ACH) processors.",
1220     'type'        => 'checkbox',
1221   },
1222
1223   {
1224     'key'         => 'show_bankstate',
1225     'section'     => 'UI',
1226     'description' => "Turns on display/collection of state for bank accounts in the web interface.  Sometimes required by electronic check (ACH) processors.",
1227     'type'        => 'checkbox',
1228   },
1229
1230   { 
1231     'key'         => 'agent_defaultpkg',
1232     'section'     => 'UI',
1233     'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
1234     'type'        => 'checkbox',
1235   },
1236
1237   {
1238     'key'         => 'legacy_link',
1239     'section'     => 'UI',
1240     'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
1241     'type'        => 'checkbox',
1242   },
1243
1244   {
1245     'key'         => 'legacy_link-steal',
1246     'section'     => 'UI',
1247     'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
1248     'type'        => 'checkbox',
1249   },
1250
1251   {
1252     'key'         => 'queue_dangerous_controls',
1253     'section'     => 'UI',
1254     'description' => 'Enable queue modification controls on account pages and for new jobs.  Unless you are a developer working on new export code, you should probably leave this off to avoid causing provisioning problems.',
1255     'type'        => 'checkbox',
1256   },
1257
1258   {
1259     'key'         => 'security_phrase',
1260     'section'     => 'password',
1261     'description' => 'Enable the tracking of a "security phrase" with each account.  Not recommended, as it is vulnerable to social engineering.',
1262     'type'        => 'checkbox',
1263   },
1264
1265   {
1266     'key'         => 'locale',
1267     'section'     => 'UI',
1268     'description' => 'Message locale',
1269     'type'        => 'select',
1270     'select_enum' => [ qw(en_US) ],
1271   },
1272
1273   {
1274     'key'         => 'selfservice_server-quiet',
1275     'section'     => 'deprecated',
1276     'description' => '<b>DEPRECATED</b>, the self-service server no longer sends superfluous decline and cancel emails.  Used to disable decline and cancel emails generated by transactions initiated by the selfservice server.',
1277     'type'        => 'checkbox',
1278   },
1279
1280   {
1281     'key'         => 'signup_server-quiet',
1282     'section'     => 'deprecated',
1283     'description' => '<b>DEPRECATED</b>, the signup server is now part of the self-service server and no longer sends superfluous decline and cancel emails.  Used to disable decline and cancel emails generated by transactions initiated by the signup server.  Does not disable welcome emails.',
1284     'type'        => 'checkbox',
1285   },
1286
1287   {
1288     'key'         => 'signup_server-payby',
1289     'section'     => '',
1290     'description' => 'Acceptable payment types for the signup server',
1291     'type'        => 'selectmultiple',
1292     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
1293   },
1294
1295   {
1296     'key'         => 'signup_server-email',
1297     'section'     => 'deprecated',
1298     'description' => '<b>DEPRECATED</b>, this feature is no longer available.  See the ***fill me in*** report instead.  Used to contain a comma-separated list of email addresses to receive notification of signups via the signup server.',
1299     'type'        => 'text',
1300   },
1301
1302   {
1303     'key'         => 'signup_server-default_agentnum',
1304     'section'     => '',
1305     'description' => 'Default agent for the signup server',
1306     'type'        => 'select-sub',
1307     'options_sub' => sub { require FS::Record;
1308                            require FS::agent;
1309                            map { $_->agentnum => $_->agent }
1310                                FS::Record::qsearch('agent', { disabled=>'' } );
1311                          },
1312     'option_sub'  => sub { require FS::Record;
1313                            require FS::agent;
1314                            my $agent = FS::Record::qsearchs(
1315                              'agent', { 'agentnum'=>shift }
1316                            );
1317                            $agent ? $agent->agent : '';
1318                          },
1319   },
1320
1321   {
1322     'key'         => 'signup_server-default_refnum',
1323     'section'     => '',
1324     'description' => 'Default advertising source for the signup server',
1325     'type'        => 'select-sub',
1326     'options_sub' => sub { require FS::Record;
1327                            require FS::part_referral;
1328                            map { $_->refnum => $_->referral }
1329                                FS::Record::qsearch( 'part_referral', 
1330                                                     { 'disabled' => '' }
1331                                                   );
1332                          },
1333     'option_sub'  => sub { require FS::Record;
1334                            require FS::part_referral;
1335                            my $part_referral = FS::Record::qsearchs(
1336                              'part_referral', { 'refnum'=>shift } );
1337                            $part_referral ? $part_referral->referral : '';
1338                          },
1339   },
1340
1341   {
1342     'key'         => 'signup_server-default_pkgpart',
1343     'section'     => '',
1344     'description' => 'Default pakcage for the signup server',
1345     'type'        => 'select-sub',
1346     'options_sub' => sub { require FS::Record;
1347                            require FS::part_pkg;
1348                            map { $_->pkgpart => $_->pkg.' - '.$_->comment }
1349                                FS::Record::qsearch( 'part_pkg',
1350                                                     { 'disabled' => ''}
1351                                                   );
1352                          },
1353     'option_sub'  => sub { require FS::Record;
1354                            require FS::part_pkg;
1355                            my $part_pkg = FS::Record::qsearchs(
1356                              'part_pkg', { 'pkgpart'=>shift }
1357                            );
1358                            $part_pkg
1359                              ? $part_pkg->pkg.' - '.$part_pkg->comment
1360                              : '';
1361                          },
1362   },
1363
1364   {
1365     'key'         => 'show-msgcat-codes',
1366     'section'     => 'UI',
1367     'description' => 'Show msgcat codes in error messages.  Turn this option on before reporting errors to the mailing list.',
1368     'type'        => 'checkbox',
1369   },
1370
1371   {
1372     'key'         => 'signup_server-realtime',
1373     'section'     => '',
1374     'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
1375     'type'        => 'checkbox',
1376   },
1377   {
1378     'key'         => 'signup_server-classnum2',
1379     'section'     => '',
1380     'description' => 'Package Class for first optional purchase',
1381     'type'        => 'select-sub',
1382     'options_sub' => sub { require FS::Record;
1383                            require FS::pkg_class;
1384                            map { $_->classnum => $_->classname }
1385                                FS::Record::qsearch('pkg_class', {} );
1386                          },
1387     'option_sub'  => sub { require FS::Record;
1388                            require FS::pkg_class;
1389                            my $pkg_class = FS::Record::qsearchs(
1390                              'pkg_class', { 'classnum'=>shift }
1391                            );
1392                            $pkg_class ? $pkg_class->classname : '';
1393                          },
1394   },
1395
1396   {
1397     'key'         => 'signup_server-classnum3',
1398     'section'     => '',
1399     'description' => 'Package Class for second optional purchase',
1400     'type'        => 'select-sub',
1401     'options_sub' => sub { require FS::Record;
1402                            require FS::pkg_class;
1403                            map { $_->classnum => $_->classname }
1404                                FS::Record::qsearch('pkg_class', {} );
1405                          },
1406     'option_sub'  => sub { require FS::Record;
1407                            require FS::pkg_class;
1408                            my $pkg_class = FS::Record::qsearchs(
1409                              'pkg_class', { 'classnum'=>shift }
1410                            );
1411                            $pkg_class ? $pkg_class->classname : '';
1412                          },
1413   },
1414
1415   {
1416     'key'         => 'backend-realtime',
1417     'section'     => '',
1418     'description' => 'Run billing for backend signups immediately.',
1419     'type'        => 'checkbox',
1420   },
1421
1422   {
1423     'key'         => 'declinetemplate',
1424     'section'     => 'billing',
1425     'description' => 'Template file for credit card decline emails.',
1426     'type'        => 'textarea',
1427   },
1428
1429   {
1430     'key'         => 'emaildecline',
1431     'section'     => 'billing',
1432     'description' => 'Enable emailing of credit card decline notices.',
1433     'type'        => 'checkbox',
1434   },
1435
1436   {
1437     'key'         => 'emaildecline-exclude',
1438     'section'     => 'billing',
1439     'description' => 'List of error messages that should not trigger email decline notices, one per line.',
1440     'type'        => 'textarea',
1441   },
1442
1443   {
1444     'key'         => 'cancelmessage',
1445     'section'     => 'billing',
1446     'description' => 'Template file for cancellation emails.',
1447     'type'        => 'textarea',
1448   },
1449
1450   {
1451     'key'         => 'cancelsubject',
1452     'section'     => 'billing',
1453     'description' => 'Subject line for cancellation emails.',
1454     'type'        => 'text',
1455   },
1456
1457   {
1458     'key'         => 'emailcancel',
1459     'section'     => 'billing',
1460     'description' => 'Enable emailing of cancellation notices.',
1461     'type'        => 'checkbox',
1462   },
1463
1464   {
1465     'key'         => 'require_cardname',
1466     'section'     => 'billing',
1467     'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
1468     'type'        => 'checkbox',
1469   },
1470
1471   {
1472     'key'         => 'enable_taxclasses',
1473     'section'     => 'billing',
1474     'description' => 'Enable per-package tax classes',
1475     'type'        => 'checkbox',
1476   },
1477
1478   {
1479     'key'         => 'require_taxclasses',
1480     'section'     => 'billing',
1481     'description' => 'Require a taxclass to be entered for every package',
1482     'type'        => 'checkbox',
1483   },
1484
1485   {
1486     'key'         => 'welcome_email',
1487     'section'     => '',
1488     'description' => 'Template file for welcome email.  Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created.  See the <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitution language.  The following variables are available<ul><li><code>$username</code> <li><code>$password</code> <li><code>$first</code> <li><code>$last</code> <li><code>$pkg</code></ul>',
1489     'type'        => 'textarea',
1490   },
1491
1492   {
1493     'key'         => 'welcome_email-from',
1494     'section'     => '',
1495     'description' => 'From: address header for welcome email',
1496     'type'        => 'text',
1497   },
1498
1499   {
1500     'key'         => 'welcome_email-subject',
1501     'section'     => '',
1502     'description' => 'Subject: header for welcome email',
1503     'type'        => 'text',
1504   },
1505   
1506   {
1507     'key'         => 'welcome_email-mimetype',
1508     'section'     => '',
1509     'description' => 'MIME type for welcome email',
1510     'type'        => 'select',
1511     'select_enum' => [ 'text/plain', 'text/html' ],
1512   },
1513
1514   {
1515     'key'         => 'welcome_letter',
1516     'section'     => '',
1517     'description' => 'Optional LaTex template file for a printed welcome letter.  A welcome letter is printed the first time a cust_pkg record is created.  See the <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation and the billing documentation for details on the template substitution language.  A variable exists for each fieldname in the customer record (<code>$first, $last, etc</code>).  The following additional variables are available<ul><li><code>$payby</code> - a friendler represenation of the field<li><code>$payinfo</code> - the masked payment information<li><code>$expdate</code> - the time at which the payment method expires (a UNIX timestamp)<li><code>$returnaddress</code> - the invoice return address for this customer\'s agent</ul>',
1518     'type'        => 'textarea',
1519   },
1520
1521   {
1522     'key'         => 'warning_email',
1523     'section'     => '',
1524     'description' => 'Template file for warning email.  Warning emails are sent to the customer email invoice destination(s) each time a svc_acct record has its usage drop below a threshold or 0.  See the <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitution language.  The following variables are available<ul><li><code>$username</code> <li><code>$password</code> <li><code>$first</code> <li><code>$last</code> <li><code>$pkg</code> <li><code>$column</code> <li><code>$amount</code> <li><code>$threshold</code></ul>',
1525     'type'        => 'textarea',
1526   },
1527
1528   {
1529     'key'         => 'warning_email-from',
1530     'section'     => '',
1531     'description' => 'From: address header for warning email',
1532     'type'        => 'text',
1533   },
1534
1535   {
1536     'key'         => 'warning_email-cc',
1537     'section'     => '',
1538     'description' => 'Additional recipient(s) (comma separated) for warning email when remaining usage reaches zero.',
1539     'type'        => 'text',
1540   },
1541
1542   {
1543     'key'         => 'warning_email-subject',
1544     'section'     => '',
1545     'description' => 'Subject: header for warning email',
1546     'type'        => 'text',
1547   },
1548   
1549   {
1550     'key'         => 'warning_email-mimetype',
1551     'section'     => '',
1552     'description' => 'MIME type for warning email',
1553     'type'        => 'select',
1554     'select_enum' => [ 'text/plain', 'text/html' ],
1555   },
1556
1557   {
1558     'key'         => 'payby',
1559     'section'     => 'billing',
1560     'description' => 'Available payment types.',
1561     'type'        => 'selectmultiple',
1562     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP) ],
1563   },
1564
1565   {
1566     'key'         => 'payby-default',
1567     'section'     => 'UI',
1568     'description' => 'Default payment type.  HIDE disables display of billing information and sets customers to BILL.',
1569     'type'        => 'select',
1570     'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
1571   },
1572
1573   {
1574     'key'         => 'paymentforcedtobatch',
1575     'section'     => 'deprecated',
1576     'description' => 'See batch-enable_payby and realtime-disable_payby.  Used to (for CHEK): Cause per customer payment entry to be forced to a batch processor rather than performed realtime.',
1577     'type'        => 'checkbox',
1578   },
1579
1580   {
1581     'key'         => 'svc_acct-notes',
1582     'section'     => 'UI',
1583     'description' => 'Extra HTML to be displayed on the Account View screen.',
1584     'type'        => 'textarea',
1585   },
1586
1587   {
1588     'key'         => 'radius-password',
1589     'section'     => '',
1590     'description' => 'RADIUS attribute for plain-text passwords.',
1591     'type'        => 'select',
1592     'select_enum' => [ 'Password', 'User-Password' ],
1593   },
1594
1595   {
1596     'key'         => 'radius-ip',
1597     'section'     => '',
1598     'description' => 'RADIUS attribute for IP addresses.',
1599     'type'        => 'select',
1600     'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
1601   },
1602
1603   #http://dev.coova.org/svn/coova-chilli/doc/dictionary.chillispot
1604   {
1605     'key'         => 'radius-chillispot-max',
1606     'section'     => '',
1607     'description' => 'Enable ChilliSpot (and CoovaChilli) Max attributes, specifically ChilliSpot-Max-{Input,Output,Total}-{Octets,Gigawords}.',
1608     'type'        => 'checkbox',
1609   },
1610
1611   {
1612     'key'         => 'svc_acct-alldomains',
1613     'section'     => '',
1614     'description' => 'Allow accounts to select any domain in the database.  Normally accounts can only select from the domain set in the service definition and those purchased by the customer.',
1615     'type'        => 'checkbox',
1616   },
1617
1618   {
1619     'key'         => 'dump-scpdest',
1620     'section'     => '',
1621     'description' => 'destination for scp database dumps: user@host:/path',
1622     'type'        => 'text',
1623   },
1624
1625   {
1626     'key'         => 'dump-pgpid',
1627     'section'     => '',
1628     'description' => "Optional PGP public key user or key id for database dumps.  The public key should exist on the freeside user's public keyring, and the gpg binary and GnuPG perl module should be installed.",
1629     'type'        => 'text',
1630   },
1631
1632   {
1633     'key'         => 'users-allow_comp',
1634     'section'     => 'deprecated',
1635     'description' => '<b>DEPRECATED</b>, enable the <i>Complimentary customer</i> access right instead.  Was: Usernames (Freeside users, created with <a href="../docs/man/bin/freeside-adduser.html">freeside-adduser</a>) which can create complimentary customers, one per line.  If no usernames are entered, all users can create complimentary accounts.',
1636     'type'        => 'textarea',
1637   },
1638
1639   {
1640     'key'         => 'credit_card-recurring_billing_flag',
1641     'section'     => 'billing',
1642     'description' => 'This controls when the system passes the "recurring_billing" flag on credit card transactions.  If supported by your processor (and the Business::OnlinePayment processor module), passing the flag indicates this is a recurring transaction and may turn off the CVV requirement. ',
1643     'type'        => 'select',
1644     'select_hash' => [
1645                        'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
1646                        'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, irregardless of previous charges on the card.',
1647                      ],
1648   },
1649
1650   {
1651     'key'         => 'credit_card-recurring_billing_acct_code',
1652     'section'     => 'billing',
1653     'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill".  Useful for reporting purposes with supported gateways (PlugNPay, others?)',
1654     'type'        => 'checkbox',
1655   },
1656
1657   {
1658     'key'         => 'cvv-save',
1659     'section'     => 'billing',
1660     'description' => 'Save CVV2 information after the initial transaction for the selected credit card types.  Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.',
1661     'type'        => 'selectmultiple',
1662     'select_enum' => \@card_types,
1663   },
1664
1665   {
1666     'key'         => 'allow_negative_charges',
1667     'section'     => 'billing',
1668     'description' => 'Allow negative charges.  Normally not used unless importing data from a legacy system that requires this.',
1669     'type'        => 'checkbox',
1670   },
1671   {
1672       'key'         => 'auto_unset_catchall',
1673       'section'     => '',
1674       'description' => 'When canceling a svc_acct that is the email catchall for one or more svc_domains, automatically set their catchall fields to null.  If this option is not set, the attempt will simply fail.',
1675       'type'        => 'checkbox',
1676   },
1677
1678   {
1679     'key'         => 'system_usernames',
1680     'section'     => 'username',
1681     'description' => 'A list of system usernames that cannot be edited or removed, one per line.  Use a bare username to prohibit modification/deletion of the username in any domain, or username@domain to prohibit modification/deletetion of a specific username and domain.',
1682     'type'        => 'textarea',
1683   },
1684
1685   {
1686     'key'         => 'cust_pkg-change_svcpart',
1687     'section'     => '',
1688     'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
1689     'type'        => 'checkbox',
1690   },
1691
1692   {
1693     'key'         => 'disable_autoreverse',
1694     'section'     => 'BIND',
1695     'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
1696     'type'        => 'checkbox',
1697   },
1698
1699   {
1700     'key'         => 'svc_www-enable_subdomains',
1701     'section'     => '',
1702     'description' => 'Enable selection of specific subdomains for virtual host creation.',
1703     'type'        => 'checkbox',
1704   },
1705
1706   {
1707     'key'         => 'svc_www-usersvc_svcpart',
1708     'section'     => '',
1709     'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
1710     'type'        => 'textarea',
1711   },
1712
1713   {
1714     'key'         => 'selfservice_server-primary_only',
1715     'section'     => '',
1716     'description' => 'Only allow primary accounts to access self-service functionality.',
1717     'type'        => 'checkbox',
1718   },
1719
1720   {
1721     'key'         => 'card_refund-days',
1722     'section'     => 'billing',
1723     'description' => 'After a payment, the number of days a refund link will be available for that payment.  Defaults to 120.',
1724     'type'        => 'text',
1725   },
1726
1727   {
1728     'key'         => 'agent-showpasswords',
1729     'section'     => '',
1730     'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
1731     'type'        => 'checkbox',
1732   },
1733
1734   {
1735     'key'         => 'global_unique-username',
1736     'section'     => 'username',
1737     'description' => 'Global username uniqueness control: none (usual setting - check uniqueness per exports), username (all usernames are globally unique, regardless of domain or exports), or username@domain (all username@domain pairs are globally unique, regardless of exports).  disabled turns off duplicate checking completely and is STRONGLY NOT RECOMMENDED unless you REALLY need to turn this off.',
1738     'type'        => 'select',
1739     'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
1740   },
1741
1742   {
1743     'key'         => 'svc_external-skip_manual',
1744     'section'     => 'UI',
1745     'description' => 'When provisioning svc_external services, skip manual entry of id and title fields in the UI.  Usually used in conjunction with an export that populates these fields (i.e. artera_turbo).',
1746     'type'        => 'checkbox',
1747   },
1748
1749   {
1750     'key'         => 'svc_external-display_type',
1751     'section'     => 'UI',
1752     'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
1753     'type'        => 'select',
1754     'select_enum' => [ 'generic', 'artera_turbo', ],
1755   },
1756
1757   {
1758     'key'         => 'ticket_system',
1759     'section'     => '',
1760     'description' => 'Ticketing system integration.  <b>RT_Internal</b> uses the built-in RT ticketing system (see the <a href="../docs/install-rt">integrated ticketing installation instructions</a>).   <b>RT_External</b> accesses an external RT installation in a separate database (local or remote).',
1761     'type'        => 'select',
1762     #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
1763     'select_enum' => [ '', qw(RT_Internal RT_External) ],
1764   },
1765
1766   {
1767     'key'         => 'ticket_system-default_queueid',
1768     'section'     => '',
1769     'description' => 'Default queue used when creating new customer tickets.',
1770     'type'        => 'select-sub',
1771     'options_sub' => sub {
1772                            my $conf = new FS::Conf;
1773                            if ( $conf->config('ticket_system') ) {
1774                              eval "use FS::TicketSystem;";
1775                              die $@ if $@;
1776                              FS::TicketSystem->queues();
1777                            } else {
1778                              ();
1779                            }
1780                          },
1781     'option_sub'  => sub { 
1782                            my $conf = new FS::Conf;
1783                            if ( $conf->config('ticket_system') ) {
1784                              eval "use FS::TicketSystem;";
1785                              die $@ if $@;
1786                              FS::TicketSystem->queue(shift);
1787                            } else {
1788                              '';
1789                            }
1790                          },
1791   },
1792
1793   {
1794     'key'         => 'ticket_system-custom_priority_field',
1795     'section'     => '',
1796     'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
1797     'type'        => 'text',
1798   },
1799
1800   {
1801     'key'         => 'ticket_system-custom_priority_field-values',
1802     'section'     => '',
1803     'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
1804     'type'        => 'textarea',
1805   },
1806
1807   {
1808     'key'         => 'ticket_system-custom_priority_field_queue',
1809     'section'     => '',
1810     'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
1811     'type'        => 'text',
1812   },
1813
1814   {
1815     'key'         => 'ticket_system-rt_external_datasrc',
1816     'section'     => '',
1817     'description' => 'With external RT integration, the DBI data source for the external RT installation, for example, <code>DBI:Pg:user=rt_user;password=rt_word;host=rt.example.com;dbname=rt</code>',
1818     'type'        => 'text',
1819
1820   },
1821
1822   {
1823     'key'         => 'ticket_system-rt_external_url',
1824     'section'     => '',
1825     'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
1826     'type'        => 'text',
1827   },
1828
1829   {
1830     'key'         => 'company_name',
1831     'section'     => 'required',
1832     'description' => 'Your company name',
1833     'type'        => 'text',
1834   },
1835
1836   {
1837     'key'         => 'echeck-void',
1838     'section'     => 'deprecated',
1839     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
1840     'type'        => 'checkbox',
1841   },
1842
1843   {
1844     'key'         => 'cc-void',
1845     'section'     => 'deprecated',
1846     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable local-only voiding of credit card payments in addition to refunds against the payment gateway',
1847     'type'        => 'checkbox',
1848   },
1849
1850   {
1851     'key'         => 'unvoid',
1852     'section'     => 'deprecated',
1853     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable unvoiding of voided payments',
1854     'type'        => 'checkbox',
1855   },
1856
1857   {
1858     'key'         => 'address2-search',
1859     'section'     => 'UI',
1860     'description' => 'Enable a "Unit" search box which searches the second address field',
1861     'type'        => 'checkbox',
1862   },
1863
1864   {
1865     'key'         => 'cust_main-require_address2',
1866     'section'     => 'UI',
1867     'description' => 'Second address field is required (on service address only, if billing and service addresses differ).  Also enables "Unit" labeling of address2 on customer view and edit pages.  Useful for multi-tenant applications.  See also: address2-search',
1868     'type'        => 'checkbox',
1869   },
1870
1871   { 'key'         => 'referral_credit',
1872     'section'     => 'billing',
1873     'description' => "Enables one-time referral credits in the amount of one month <i>referred</i> customer's recurring fee (irregardless of frequency).",
1874     'type'        => 'checkbox',
1875   },
1876
1877   { 'key'         => 'selfservice_server-cache_module',
1878     'section'     => '',
1879     'description' => 'Module used to store self-service session information.  All modules handle any number of self-service servers.  Cache::SharedMemoryCache is appropriate for a single database / single Freeside server.  Cache::FileCache is useful for multiple databases on a single server, or when IPC::ShareLite is not available (i.e. FreeBSD).', #  _Database stores session information in the database and is appropriate for multiple Freeside servers, but may be slower.',
1880     'type'        => 'select',
1881     'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
1882   },
1883
1884   {
1885     'key'         => 'hylafax',
1886     'section'     => 'billing',
1887     'description' => 'Options for a HylaFAX server to enable the FAX invoice destination.  They should be in the form of a space separated list of arguments to the Fax::Hylafax::Client::sendfax subroutine.  You probably shouldn\'t override things like \'docfile\'.  *Note* Only supported when using typeset invoices (see the invoice_latex configuration option).',
1888     'type'        => [qw( checkbox textarea )],
1889   },
1890
1891   {
1892     'key'         => 'cust_bill-ftpformat',
1893     'section'     => 'billing',
1894     'description' => 'Enable FTP of raw invoice data - format.',
1895     'type'        => 'select',
1896     'select_enum' => [ '', 'default', 'billco', ],
1897   },
1898
1899   {
1900     'key'         => 'cust_bill-ftpserver',
1901     'section'     => 'billing',
1902     'description' => 'Enable FTP of raw invoice data - server.',
1903     'type'        => 'text',
1904   },
1905
1906   {
1907     'key'         => 'cust_bill-ftpusername',
1908     'section'     => 'billing',
1909     'description' => 'Enable FTP of raw invoice data - server.',
1910     'type'        => 'text',
1911   },
1912
1913   {
1914     'key'         => 'cust_bill-ftppassword',
1915     'section'     => 'billing',
1916     'description' => 'Enable FTP of raw invoice data - server.',
1917     'type'        => 'text',
1918   },
1919
1920   {
1921     'key'         => 'cust_bill-ftpdir',
1922     'section'     => 'billing',
1923     'description' => 'Enable FTP of raw invoice data - server.',
1924     'type'        => 'text',
1925   },
1926
1927   {
1928     'key'         => 'cust_bill-spoolformat',
1929     'section'     => 'billing',
1930     'description' => 'Enable spooling of raw invoice data - format.',
1931     'type'        => 'select',
1932     'select_enum' => [ '', 'default', 'billco', ],
1933   },
1934
1935   {
1936     'key'         => 'cust_bill-spoolagent',
1937     'section'     => 'billing',
1938     'description' => 'Enable per-agent spooling of raw invoice data.',
1939     'type'        => 'checkbox',
1940   },
1941
1942   {
1943     'key'         => 'svc_acct-usage_suspend',
1944     'section'     => 'billing',
1945     'description' => 'Suspends the package an account belongs to when svc_acct.seconds or a bytecount is decremented to 0 or below (accounts with an empty seconds and up|down|totalbytes value are ignored).  Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
1946     'type'        => 'checkbox',
1947   },
1948
1949   {
1950     'key'         => 'svc_acct-usage_unsuspend',
1951     'section'     => 'billing',
1952     'description' => 'Unuspends the package an account belongs to when svc_acct.seconds or a bytecount is incremented from 0 or below to a positive value (accounts with an empty seconds and up|down|totalbytes value are ignored).  Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
1953     'type'        => 'checkbox',
1954   },
1955
1956   {
1957     'key'         => 'svc_acct-usage_threshold',
1958     'section'     => 'billing',
1959     'description' => 'The threshold (expressed as percentage) of acct.seconds or acct.up|down|totalbytes at which a warning message is sent to a service holder.  Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.  Defaults to 80.',
1960     'type'        => 'text',
1961   },
1962
1963   {
1964     'key'         => 'cust-fields',
1965     'section'     => 'UI',
1966     'description' => 'Which customer fields to display on reports by default',
1967     'type'        => 'select',
1968     'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
1969   },
1970
1971   {
1972     'key'         => 'cust_pkg-display_times',
1973     'section'     => 'UI',
1974     'description' => 'Display full timestamps (not just dates) for customer packages.  Useful if you are doing real-time things like hourly prepaid.',
1975     'type'        => 'checkbox',
1976   },
1977
1978   {
1979     'key'         => 'svc_acct-edit_uid',
1980     'section'     => 'shell',
1981     'description' => 'Allow UID editing.',
1982     'type'        => 'checkbox',
1983   },
1984
1985   {
1986     'key'         => 'svc_acct-edit_gid',
1987     'section'     => 'shell',
1988     'description' => 'Allow GID editing.',
1989     'type'        => 'checkbox',
1990   },
1991
1992   {
1993     'key'         => 'zone-underscore',
1994     'section'     => 'BIND',
1995     'description' => 'Allow underscores in zone names.  As underscores are illegal characters in zone names, this option is not recommended.',
1996     'type'        => 'checkbox',
1997   },
1998
1999   #these should become per-user...
2000   {
2001     'key'         => 'vonage-username',
2002     'section'     => '',
2003     'description' => 'Vonage Click2Call username (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2004     'type'        => 'text',
2005   },
2006   {
2007     'key'         => 'vonage-password',
2008     'section'     => '',
2009     'description' => 'Vonage Click2Call username (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2010     'type'        => 'text',
2011   },
2012   {
2013     'key'         => 'vonage-fromnumber',
2014     'section'     => '',
2015     'description' => 'Vonage Click2Call number (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2016     'type'        => 'text',
2017   },
2018
2019   {
2020     'key'         => 'echeck-nonus',
2021     'section'     => 'billing',
2022     'description' => 'Disable ABA-format account checking for Electronic Check payment info',
2023     'type'        => 'checkbox',
2024   },
2025
2026   {
2027     'key'         => 'voip-cust_cdr_spools',
2028     'section'     => '',
2029     'description' => 'Enable the per-customer option for individual CDR spools.',
2030     'type'        => 'checkbox',
2031   },
2032
2033   {
2034     'key'         => 'svc_forward-arbitrary_dst',
2035     'section'     => '',
2036     'description' => "Allow forwards to point to arbitrary strings that don't necessarily look like email addresses.  Only used when using forwards for weird, non-email things.",
2037     'type'        => 'checkbox',
2038   },
2039
2040   {
2041     'key'         => 'tax-ship_address',
2042     'section'     => 'billing',
2043     'description' => 'By default, tax calculations are done based on the billing address.  Enable this switch to calculate tax based on the shipping address instead.  Note: Tax reports can take a long time when enabled.',
2044     'type'        => 'checkbox',
2045   },
2046
2047   {
2048     'key'         => 'invoice-ship_address',
2049     'section'     => 'billing',
2050     'description' => 'Enable this switch to include the ship address on the invoice.',
2051     'type'        => 'checkbox',
2052   },
2053
2054   {
2055     'key'         => 'invoice-unitprice',
2056     'section'     => 'billing',
2057     'description' => 'This switch enables unit pricing on the invoice.',
2058     'type'        => 'checkbox',
2059   },
2060
2061   {
2062     'key'         => 'postal_invoice-fee_pkgpart',
2063     'section'     => 'billing',
2064     'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
2065     'type'        => 'select-sub',
2066     'options_sub' => sub { require FS::Record;
2067                            require FS::part_pkg;
2068                            map { $_->pkgpart => $_->pkg }
2069                                FS::Record::qsearch('part_pkg', { disabled=>'' } );
2070                          },
2071     'option_sub'  => sub { require FS::Record;
2072                            require FS::part_pkg;
2073                            my $part_pkg = FS::Record::qsearchs(
2074                              'part_pkg', { 'pkgpart'=>shift }
2075                            );
2076                            $part_pkg ? $part_pkg->pkg : '';
2077                          },
2078   },
2079
2080   {
2081     'key'         => 'postal_invoice-recurring_only',
2082     'section'     => 'billing',
2083     'description' => 'The postal invoice fee is omitted on invoices without recurring charges when this is set',
2084     'type'        => 'checkbox',
2085   },
2086
2087   {
2088     'key'         => 'batch-enable',
2089     'section'     => 'deprecated', #make sure batch-enable_payby is set for
2090                                    #everyone before removing
2091     'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
2092     'type'        => 'checkbox',
2093   },
2094
2095   {
2096     'key'         => 'batch-enable_payby',
2097     'section'     => 'billing',
2098     'description' => 'Enable batch processing for the specified payment types.',
2099     'type'        => 'selectmultiple',
2100     'select_enum' => [qw( CARD CHEK )],
2101   },
2102
2103   {
2104     'key'         => 'realtime-disable_payby',
2105     'section'     => 'billing',
2106     'description' => 'Disable realtime processing for the specified payment types.',
2107     'type'        => 'selectmultiple',
2108     'select_enum' => [qw( CARD CHEK )],
2109   },
2110
2111   {
2112     'key'         => 'batch-default_format',
2113     'section'     => 'billing',
2114     'description' => 'Default format for batches.',
2115     'type'        => 'select',
2116     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch',
2117                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP',
2118                        'ach-spiritone',
2119                     ]
2120   },
2121
2122   {
2123     'key'         => 'batch-fixed_format-CARD',
2124     'section'     => 'billing',
2125     'description' => 'Fixed (unchangeable) format for credit card batches.',
2126     'type'        => 'select',
2127     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP' ,
2128                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP' ]
2129   },
2130
2131   {
2132     'key'         => 'batch-fixed_format-CHEK',
2133     'section'     => 'billing',
2134     'description' => 'Fixed (unchangeable) format for electronic check batches.',
2135     'type'        => 'select',
2136     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
2137                        'ach-spiritone',
2138                      ]
2139   },
2140
2141   {
2142     'key'         => 'batch-increment_expiration',
2143     'section'     => 'billing',
2144     'description' => 'Increment expiration date years in batches until cards are current.  Make sure this is acceptable to your batching provider before enabling.',
2145     'type'        => 'checkbox'
2146   },
2147
2148   {
2149     'key'         => 'batchconfig-BoM',
2150     'section'     => 'billing',
2151     'description' => 'Configuration for Bank of Montreal batching, seven lines: 1. Origin ID, 2. Datacenter, 3. Typecode, 4. Short name, 5. Long name, 6. Bank, 7. Bank account',
2152     'type'        => 'textarea',
2153   },
2154
2155   {
2156     'key'         => 'batchconfig-PAP',
2157     'section'     => 'billing',
2158     'description' => 'Configuration for PAP batching, seven lines: 1. Origin ID, 2. Datacenter, 3. Typecode, 4. Short name, 5. Long name, 6. Bank, 7. Bank account',
2159     'type'        => 'textarea',
2160   },
2161
2162   {
2163     'key'         => 'batchconfig-csv-chase_canada-E-xactBatch',
2164     'section'     => 'billing',
2165     'description' => 'Gateway ID for Chase Canada E-xact batching',
2166     'type'        => 'text',
2167   },
2168
2169   {
2170     'key'         => 'payment_history-years',
2171     'section'     => 'UI',
2172     'description' => 'Number of years of payment history to show by default.  Currently defaults to 2.',
2173     'type'        => 'text',
2174   },
2175
2176   {
2177     'key'         => 'cust_main-use_comments',
2178     'section'     => 'UI',
2179     'description' => 'Display free form comments on the customer edit screen.  Useful as a scratch pad.',
2180     'type'        => 'checkbox',
2181   },
2182
2183   {
2184     'key'         => 'cust_main-disable_notes',
2185     'section'     => 'UI',
2186     'description' => 'Disable new style customer notes - timestamped and user identified customer notes.  Useful in tracking who did what.',
2187     'type'        => 'checkbox',
2188   },
2189
2190   {
2191     'key'         => 'cust_main_note-display_times',
2192     'section'     => 'UI',
2193     'description' => 'Display full timestamps (not just dates) for customer notes.',
2194     'type'        => 'checkbox',
2195   },
2196
2197   {
2198     'key'         => 'cust_main-ticket_statuses',
2199     'section'     => 'UI',
2200     'description' => 'Show tickets with these statuses on the customer view page.',
2201     'type'        => 'selectmultiple',
2202     'select_enum' => [qw( new open stalled resolved rejected deleted )],
2203   },
2204
2205   {
2206     'key'         => 'cust_main-max_tickets',
2207     'section'     => 'UI',
2208     'description' => 'Maximum number of tickets to show on the customer view page.',
2209     'type'        => 'text',
2210   },
2211
2212   {
2213     'key'         => 'cust_main-skeleton_tables',
2214     'section'     => '',
2215     'description' => 'Tables which will have skeleton records inserted into them for each customer.  Syntax for specifying tables is unfortunately a tricky perl data structure for now.',
2216     'type'        => 'textarea',
2217   },
2218
2219   {
2220     'key'         => 'cust_main-skeleton_custnum',
2221     'section'     => '',
2222     'description' => 'Customer number specifying the source data to copy into skeleton tables for new customers.',
2223     'type'        => 'text',
2224   },
2225
2226   {
2227     'key'         => 'cust_main-enable_birthdate',
2228     'section'     => 'UI',
2229     'descritpion' => 'Enable tracking of a birth date with each customer record',
2230     'type'        => 'checkbox',
2231   },
2232
2233   {
2234     'key'         => 'support-key',
2235     'section'     => '',
2236     'description' => 'A support key enables access to commercial services delivered over the network, such as the payroll module, access to the internal ticket system, priority support and optional backups.',
2237     'type'        => 'text',
2238   },
2239
2240   {
2241     'key'         => 'card-types',
2242     'section'     => 'billing',
2243     'description' => 'Select one or more card types to enable only those card types.  If no card types are selected, all card types are available.',
2244     'type'        => 'selectmultiple',
2245     'select_enum' => \@card_types,
2246   },
2247
2248   {
2249     'key'         => 'dashboard-toplist',
2250     'section'     => 'UI',
2251     'description' => 'List of items to display on the top of the front page',
2252     'type'        => 'textarea',
2253   },
2254
2255   {
2256     'key'         => 'impending_recur_template',
2257     'section'     => 'billing',
2258     'description' => 'Template file for alerts about looming first time recurrant billing.  See the <a href="http://search.cpan.org/~mjd/Text-Template.pm">Text::Template</a> documentation for details on the template substitition language.  Also see packages with a <a href="../browse/part_pkg.cgi">flat price plan</a>  The following variables are available<ul><li><code>$packages</code> allowing <code>$packages->[0]</code> thru <code>$packages->[n]</code> <li><code>$package</code> the first package, same as <code>$packages->[0]</code> <li><code>$recurdates</code> allowing <code>$recurdates->[0]</code> thru <code>$recurdates->[n]</code> <li><code>$recurdate</code> the first recurdate, same as <code>$recurdate->[0]</code> <li><code>$first</code> <li><code>$last</code></ul>',
2259 # <li><code>$payby</code> <li><code>$expdate</code> most likely only confuse
2260     'type'        => 'textarea',
2261   },
2262
2263   {
2264     'key'         => 'selfservice-session_timeout',
2265     'section'     => '',
2266     'description' => 'Self-service session timeout.  Defaults to 1 hour.',
2267     'type'        => 'select',
2268     'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
2269   },
2270
2271   {
2272     'key'         => 'disable_setup_suspended_pkgs',
2273     'section'     => 'billing',
2274     'description' => 'Disables charging of setup fees for suspended packages.',
2275     'type'       => 'checkbox',
2276   },
2277
2278   {
2279     'key' => 'password-generated-allcaps',
2280     'section' => 'password',
2281     'description' => 'Causes passwords automatically generated to consist entirely of capital letters',
2282     'type' => 'checkbox',
2283   },
2284
2285   {
2286     'key'         => 'datavolume-forcemegabytes',
2287     'section'     => 'UI',
2288     'description' => 'All data volumes are expressed in megabytes',
2289     'type'        => 'checkbox',
2290   },
2291
2292   {
2293     'key'         => 'datavolume-significantdigits',
2294     'section'     => 'UI',
2295     'description' => 'number of significant digits to use to represent data volumes',
2296     'type'        => 'text',
2297   },
2298
2299   {
2300     'key'         => 'disable_void_after',
2301     'section'     => 'billing',
2302     'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
2303     'type'        => 'text',
2304   },
2305
2306   {
2307     'key'         => 'disable_line_item_date_ranges',
2308     'section'     => 'billing',
2309     'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
2310     'type'        => 'checkbox',
2311   },
2312
2313   {
2314     'key'         => 'cust_main-require_phone',
2315     'section'     => '',
2316     'description' => 'Require daytime or night for all customer records.',
2317     'type'        => 'checkbox',
2318   },
2319
2320   {
2321     'key'         => 'cust_main-require_invoicing_list_email',
2322     'section'     => '',
2323     'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
2324     'type'        => 'checkbox',
2325   },
2326
2327   {
2328     'key'         => 'cancel_credit_type',
2329     'section'     => 'billing',
2330     'description' => 'The group to use for new, automatically generated credit reasons resulting from cancellation.',
2331     'type'        => 'select-sub',
2332     'options_sub' => sub { require FS::Record;
2333                            require FS::reason_type;
2334                            map { $_->typenum => $_->type }
2335                                FS::Record::qsearch('reason_type', { class=>'R' } );
2336                          },
2337     'option_sub'  => sub { require FS::Record;
2338                            require FS::reason_type;
2339                            my $reason_type = FS::Record::qsearchs(
2340                              'reason_type', { 'typenum' => shift }
2341                            );
2342                            $reason_type ? $reason_type->type : '';
2343                          },
2344   },
2345
2346   {
2347     'key'         => 'referral_credit_type',
2348     'section'     => 'billing',
2349     'description' => 'The group to use for new, automatically generated credit reasons resulting from referrals.',
2350     'type'        => 'select-sub',
2351     'options_sub' => sub { require FS::Record;
2352                            require FS::reason_type;
2353                            map { $_->typenum => $_->type }
2354                                FS::Record::qsearch('reason_type', { class=>'R' } );
2355                          },
2356     'option_sub'  => sub { require FS::Record;
2357                            require FS::reason_type;
2358                            my $reason_type = FS::Record::qsearchs(
2359                              'reason_type', { 'typenum' => shift }
2360                            );
2361                            $reason_type ? $reason_type->type : '';
2362                          },
2363   },
2364
2365   {
2366     'key'         => 'signup_credit_type',
2367     'section'     => 'billing',
2368     'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
2369     'type'        => 'select-sub',
2370     'options_sub' => sub { require FS::Record;
2371                            require FS::reason_type;
2372                            map { $_->typenum => $_->type }
2373                                FS::Record::qsearch('reason_type', { class=>'R' } );
2374                          },
2375     'option_sub'  => sub { require FS::Record;
2376                            require FS::reason_type;
2377                            my $reason_type = FS::Record::qsearchs(
2378                              'reason_type', { 'typenum' => shift }
2379                            );
2380                            $reason_type ? $reason_type->type : '';
2381                          },
2382   },
2383
2384   {
2385     'key'         => 'cust_main-agent_custid-format',
2386     'section'     => '',
2387     'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
2388     'type'        => 'select',
2389     'select_hash' => [
2390                        ''      => 'Numeric only',
2391                        'ww?d+' => 'Numeric with one or two letter prefix',
2392                      ],
2393   },
2394
2395   {
2396     'key'         => 'card_masking_method',
2397     'section'     => 'UI',
2398     'description' => 'Digits to display when masking credit cards.  Note that the first six digits are necessary to canonically identify the credit card type (Visa/MC, Amex, Discover, Maestro, etc.) in all cases.  The first four digits can identify the most common credit card types in most cases (Visa/MC, Amex, and Discover).  The first two digits can distinguish between Visa/MC and Amex.',
2399     'type'        => 'select',
2400     'select_hash' => [
2401                        ''            => '123456xxxxxx1234',
2402                        'first6last2' => '123456xxxxxxxx12',
2403                        'first4last4' => '1234xxxxxxxx1234',
2404                        'first4last2' => '1234xxxxxxxxxx12',
2405                        'first2last4' => '12xxxxxxxxxx1234',
2406                        'first2last2' => '12xxxxxxxxxxxx12',
2407                        'first0last4' => 'xxxxxxxxxxxx1234',
2408                        'first0last2' => 'xxxxxxxxxxxxxx12',
2409                      ],
2410   },
2411
2412   {
2413     'key'         => 'disable_previous_balance',
2414     'section'     => 'billing',
2415     'description' => 'Disable inclusion of previous balance lines on invoices',
2416     'type'        => 'checkbox',
2417   },
2418
2419   {
2420     'key'         => 'disable_acl_changes',
2421     'section'     => '',
2422     'description' => 'Disable all ACL changes, for demos.',
2423     'type'        => 'checkbox',
2424   },
2425
2426   {
2427     'key'         => 'cust_main-edit_agent_custid',
2428     'section'     => 'UI',
2429     'description' => 'Enable editing of the agent_custid field.',
2430     'type'        => 'checkbox',
2431   },
2432
2433   {
2434     'key'         => 'cust_main-default_areacode',
2435     'section'     => 'UI',
2436     'description' => 'Default area code for customers.',
2437     'type'        => 'text',
2438   },
2439
2440   {
2441     'key'         => 'cust_bill-max_same_services',
2442     'section'     => 'billing',
2443     'description' => 'Maximum number of the same service to list individually on invoices before condensing to a single line listing the number of services.  Defaults to 5.',
2444     'type'        => 'text',
2445   },
2446
2447   {
2448     'key'         => 'suspend_email_admin',
2449     'section'     => '',
2450     'description' => 'Destination admin email address to enable suspension notices',
2451     'type'        => 'text',
2452   },
2453
2454   {
2455     'key'         => 'email_report-subject',
2456     'section'     => '',
2457     'description' => 'Subject for reports emailed by freeside-fetch.  Defaults to "Freeside report".',
2458     'type'        => 'text',
2459   },
2460
2461   {
2462     'key'         => 'sg-multicustomer_hack',
2463     'section'     => '',
2464     'description' => "Don't use this.",
2465     'type'        => 'checkbox',
2466   },
2467
2468   {
2469     'key'         => 'queued-max_kids',
2470     'section'     => '',
2471     'description' => 'Maximum number of queued processes.  Defaults to 10.',
2472     'type'        => 'text',
2473   },
2474
2475   {
2476     'key'         => 'cancelled_cust-noevents',
2477     'section'     => 'billing',
2478     'description' => "Don't run events for cancelled customers",
2479     'type'        => 'checkbox',
2480   },
2481
2482   {
2483     'key'         => 'svc_broadband-manage_link',
2484     'section'     => 'UI',
2485     'description' => 'URL for svc_broadband "Manage Device" link.  The following substitutions are available: $ip_addr.',
2486     'type'        => 'text',
2487   },
2488
2489 );
2490
2491 1;
2492