a25f9403f5df30552f0906d1bdd0b5ba8822ae4e
[freeside.git] / FS / FS / Conf.pm
1 package FS::Conf;
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="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">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="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">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="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">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="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">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 =cut
307
308 #Business::CreditCard
309 @card_types = (
310   "VISA card",
311   "MasterCard",
312   "Discover card",
313   "American Express card",
314   "Diner's Club/Carte Blanche",
315   "enRoute",
316   "JCB",
317   "BankCard",
318   "Switch",
319   "Solo",
320 );
321
322 @config_items = map { new FS::ConfItem $_ } (
323
324   {
325     'key'         => 'address',
326     'section'     => 'deprecated',
327     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
328     'type'        => 'text',
329   },
330
331   {
332     'key'         => 'alerter_template',
333     'section'     => 'billing',
334     'description' => 'Template file for billing method expiration alerts.  See the <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Credit_cards_and_Electronic_checks">billing documentation</a> for details.',
335     'type'        => 'textarea',
336   },
337
338   {
339     'key'         => 'apacheroot',
340     'section'     => 'deprecated',
341     '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',
342     'type'        => 'text',
343   },
344
345   {
346     'key'         => 'apacheip',
347     'section'     => 'deprecated',
348     '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',
349     'type'        => 'text',
350   },
351
352   {
353     'key'         => 'apachemachine',
354     'section'     => 'deprecated',
355     '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.',
356     'type'        => 'text',
357   },
358
359   {
360     'key'         => 'apachemachines',
361     'section'     => 'deprecated',
362     '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.',
363     'type'        => 'textarea',
364   },
365
366   {
367     'key'         => 'bindprimary',
368     'section'     => 'deprecated',
369     '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',
370     'type'        => 'text',
371   },
372
373   {
374     'key'         => 'bindsecondaries',
375     'section'     => 'deprecated',
376     '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',
377     'type'        => 'textarea',
378   },
379
380   {
381     'key'         => 'encryption',
382     'section'     => 'billing',
383     'description' => 'Enable encryption of credit cards.',
384     'type'        => 'checkbox',
385   },
386
387   {
388     'key'         => 'encryptionmodule',
389     'section'     => 'billing',
390     'description' => 'Use which module for encryption?',
391     'type'        => 'text',
392   },
393
394   {
395     'key'         => 'encryptionpublickey',
396     'section'     => 'billing',
397     'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
398     'type'        => 'textarea',
399   },
400
401   {
402     'key'         => 'encryptionprivatekey',
403     'section'     => 'billing',
404     '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.',
405     'type'        => 'textarea',
406   },
407
408   {
409     'key'         => 'business-onlinepayment',
410     'section'     => 'billing',
411     '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.',
412     'type'        => 'textarea',
413   },
414
415   {
416     'key'         => 'business-onlinepayment-ach',
417     'section'     => 'billing',
418     '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.',
419     'type'        => 'textarea',
420   },
421
422   {
423     'key'         => 'business-onlinepayment-description',
424     'section'     => 'billing',
425     '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)',
426     'type'        => 'text',
427   },
428
429   {
430     'key'         => 'business-onlinepayment-email-override',
431     'section'     => 'billing',
432     'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
433     'type'        => 'text',
434   },
435
436   {
437     'key'         => 'bsdshellmachines',
438     'section'     => 'deprecated',
439     '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\'.',
440     'type'        => 'textarea',
441   },
442
443   {
444     'key'         => 'business-onlinepayment-email_customer',
445     'section'     => 'billing',
446     'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
447     'type'        => 'checkbox',
448   },
449
450   {
451     'key'         => 'countrydefault',
452     'section'     => 'UI',
453     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
454     'type'        => 'text',
455   },
456
457   {
458     'key'         => 'date_format',
459     'section'     => 'UI',
460     'description' => 'Format for displaying dates',
461     'type'        => 'select',
462     'select_hash' => [
463                        '%m/%d/%Y' => 'MM/DD/YYYY',
464                        '%Y/%m/%d' => 'YYYY/MM/DD',
465                      ],
466   },
467
468   {
469     'key'         => 'cyrus',
470     'section'     => 'deprecated',
471     '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.',
472     'type'        => 'textarea',
473   },
474
475   {
476     'key'         => 'cp_app',
477     'section'     => 'deprecated',
478     '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).',
479     'type'        => 'textarea',
480   },
481
482   {
483     'key'         => 'deletecustomers',
484     'section'     => 'UI',
485     '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.',
486     'type'        => 'checkbox',
487   },
488
489   {
490     'key'         => 'deletepayments',
491     'section'     => 'billing',
492     '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.',
493     'type'        => [qw( checkbox text )],
494   },
495
496   {
497     'key'         => 'deletecredits',
498     'section'     => 'deprecated',
499     '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.',
500     'type'        => [qw( checkbox text )],
501   },
502
503   {
504     'key'         => 'deleterefunds',
505     'section'     => 'billing',
506     'description' => 'Enable deletion of unclosed refunds.  Be very careful!  Only delete refunds that were data-entry errors, not adjustments.',
507     'type'        => 'checkbox',
508   },
509
510   {
511     'key'         => 'unapplypayments',
512     'section'     => 'deprecated',
513     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable "unapplication" of unclosed payments.',
514     'type'        => 'checkbox',
515   },
516
517   {
518     'key'         => 'unapplycredits',
519     'section'     => 'deprecated',
520     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to nable "unapplication" of unclosed credits.',
521     'type'        => 'checkbox',
522   },
523
524   {
525     'key'         => 'dirhash',
526     'section'     => 'shell',
527     '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>',
528     'type'        => 'text',
529   },
530
531   {
532     'key'         => 'disable_customer_referrals',
533     'section'     => 'UI',
534     'description' => 'Disable new customer-to-customer referrals in the web interface',
535     'type'        => 'checkbox',
536   },
537
538   {
539     'key'         => 'editreferrals',
540     'section'     => 'UI',
541     'description' => 'Enable advertising source modification for existing customers',
542     'type'       => 'checkbox',
543   },
544
545   {
546     'key'         => 'emailinvoiceonly',
547     'section'     => 'billing',
548     'description' => 'Disables postal mail invoices',
549     'type'       => 'checkbox',
550   },
551
552   {
553     'key'         => 'disablepostalinvoicedefault',
554     'section'     => 'billing',
555     '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>.',
556     'type'       => 'checkbox',
557   },
558
559   {
560     'key'         => 'emailinvoiceauto',
561     'section'     => 'billing',
562     'description' => 'Automatically adds new accounts to the email invoice list',
563     'type'       => 'checkbox',
564   },
565
566   {
567     'key'         => 'emailinvoiceautoalways',
568     'section'     => 'billing',
569     'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
570     'type'       => 'checkbox',
571   },
572
573   {
574     'key'         => 'exclude_ip_addr',
575     'section'     => '',
576     'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
577     'type'        => 'textarea',
578   },
579   
580   {
581     'key'         => 'erpcdmachines',
582     'section'     => 'deprecated',
583     '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\'',
584     'type'        => 'textarea',
585   },
586
587   {
588     'key'         => 'hidecancelledpackages',
589     'section'     => 'UI',
590     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
591     'type'        => 'checkbox',
592   },
593
594   {
595     'key'         => 'hidecancelledcustomers',
596     'section'     => 'UI',
597     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
598     'type'        => 'checkbox',
599   },
600
601   {
602     'key'         => 'home',
603     'section'     => 'required',
604     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
605     'type'        => 'text',
606   },
607
608   {
609     'key'         => 'icradiusmachines',
610     'section'     => 'deprecated',
611     '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>',
612     'type'        => [qw( checkbox textarea )],
613   },
614
615   {
616     'key'         => 'icradius_mysqldest',
617     'section'     => 'deprecated',
618     '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/".',
619     'type'        => 'text',
620   },
621
622   {
623     'key'         => 'icradius_mysqlsource',
624     'section'     => 'deprecated',
625     '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".',
626     'type'        => 'text',
627   },
628
629   {
630     'key'         => 'icradius_secrets',
631     'section'     => 'deprecated',
632     '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.',
633     'type'        => 'textarea',
634   },
635
636   {
637     'key'         => 'invoice_from',
638     'section'     => 'required',
639     'description' => 'Return address on email invoices',
640     'type'        => 'text',
641   },
642
643   {
644     'key'         => 'invoice_subject',
645     'section'     => 'billing',
646     'description' => 'Subject: header on email invoices.  Defaults to "Invoice".  The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
647     'type'        => 'text',
648   },
649
650   {
651     'key'         => 'invoice_template',
652     'section'     => 'required',
653     'description' => 'Required template file for invoices.  See the <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
654     'type'        => 'textarea',
655   },
656
657   {
658     'key'         => 'invoice_html',
659     'section'     => 'billing',
660     'description' => 'Optional HTML template for invoices.  See the <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
661
662     'type'        => 'textarea',
663   },
664
665   {
666     'key'         => 'invoice_htmlnotes',
667     'section'     => 'billing',
668     'description' => 'Notes section for HTML invoices.  Defaults to the same data in invoice_latexnotes if not specified.',
669     'type'        => 'textarea',
670   },
671
672   {
673     'key'         => 'invoice_htmlfooter',
674     'section'     => 'billing',
675     'description' => 'Footer for HTML invoices.  Defaults to the same data in invoice_latexfooter if not specified.',
676     'type'        => 'textarea',
677   },
678
679   {
680     'key'         => 'invoice_htmlreturnaddress',
681     'section'     => 'billing',
682     'description' => 'Return address for HTML invoices.  Defaults to the same data in invoice_latexreturnaddress if not specified.',
683     'type'        => 'textarea',
684   },
685
686   {
687     'key'         => 'invoice_latex',
688     'section'     => 'billing',
689     'description' => 'Optional LaTeX template for typeset PostScript invoices.  See the <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
690     'type'        => 'textarea',
691   },
692
693   {
694     'key'         => 'invoice_latexnotes',
695     'section'     => 'billing',
696     'description' => 'Notes section for LaTeX typeset PostScript invoices.',
697     'type'        => 'textarea',
698   },
699
700   {
701     'key'         => 'invoice_latexfooter',
702     'section'     => 'billing',
703     'description' => 'Footer for LaTeX typeset PostScript invoices.',
704     'type'        => 'textarea',
705   },
706
707   {
708     'key'         => 'invoice_latexcoupon',
709     'section'     => 'billing',
710     'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
711     'type'        => 'textarea',
712   },
713
714   {
715     'key'         => 'invoice_latexreturnaddress',
716     'section'     => 'billing',
717     'description' => 'Return address for LaTeX typeset PostScript invoices.',
718     'type'        => 'textarea',
719   },
720
721   {
722     'key'         => 'invoice_latexsmallfooter',
723     'section'     => 'billing',
724     'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
725     'type'        => 'textarea',
726   },
727
728   {
729     'key'         => 'invoice_email_pdf',
730     'section'     => 'billing',
731     '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.',
732     'type'        => 'checkbox'
733   },
734
735   {
736     'key'         => 'invoice_email_pdf_note',
737     'section'     => 'billing',
738     'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
739     'type'        => 'textarea'
740   },
741
742
743   { 
744     'key'         => 'invoice_default_terms',
745     'section'     => 'billing',
746     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
747     'type'        => 'select',
748     'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 30', 'Net 45', 'Net 60' ],
749   },
750
751   {
752     'key'         => 'invoice_send_receipts',
753     'section'     => 'deprecated',
754     'description' => '<b>DEPRECATED</b>, this used to send an invoice copy on payments and credits.  See the payment_receipt_email and XXXX instead.',
755     'type'        => 'checkbox',
756   },
757
758   {
759     'key'         => 'payment_receipt_email',
760     'section'     => 'billing',
761     '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/dist/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>',
762     'type'        => [qw( checkbox textarea )],
763   },
764
765   {
766     'key'         => 'lpr',
767     'section'     => 'required',
768     'description' => 'Print command for paper invoices, for example `lpr -h\'',
769     'type'        => 'text',
770   },
771
772   {
773     'key'         => 'maildisablecatchall',
774     'section'     => 'deprecated',
775     '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.',
776     'type'        => 'checkbox',
777   },
778
779   {
780     'key'         => 'lpr-postscript_prefix',
781     'section'     => 'billing',
782     'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
783     'type'        => 'text',
784   },
785
786   {
787     'key'         => 'lpr-postscript_suffix',
788     'section'     => 'billing',
789     'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
790     'type'        => 'text',
791   },
792
793   {
794     'key'         => 'money_char',
795     'section'     => '',
796     'description' => 'Currency symbol - defaults to `$\'',
797     'type'        => 'text',
798   },
799
800   {
801     'key'         => 'mxmachines',
802     'section'     => 'deprecated',
803     'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'',
804     'type'        => 'textarea',
805   },
806
807   {
808     'key'         => 'nsmachines',
809     'section'     => 'deprecated',
810     'description' => 'NS nameservers for new domains, one per line, with trailing `.\'',
811     'type'        => 'textarea',
812   },
813
814   {
815     'key'         => 'defaultrecords',
816     'section'     => 'BIND',
817     'description' => 'DNS entries to add automatically when creating a domain',
818     'type'        => 'editlist',
819     'editlist_parts' => [ { type=>'text' },
820                           { type=>'immutable', value=>'IN' },
821                           { type=>'select',
822                             select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS TXT)} },
823                           { type=> 'text' }, ],
824   },
825
826   {
827     'key'         => 'arecords',
828     'section'     => 'deprecated',
829     'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
830     'type'        => 'textarea',
831   },
832
833   {
834     'key'         => 'cnamerecords',
835     'section'     => 'deprecated',
836     'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
837     'type'        => 'textarea',
838   },
839
840   {
841     'key'         => 'nismachines',
842     'section'     => 'deprecated',
843     '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\'.',
844     'type'        => 'textarea',
845   },
846
847   {
848     'key'         => 'passwordmin',
849     'section'     => 'password',
850     'description' => 'Minimum password length (default 6)',
851     'type'        => 'text',
852   },
853
854   {
855     'key'         => 'passwordmax',
856     'section'     => 'password',
857     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
858     'type'        => 'text',
859   },
860
861   {
862     'key' => 'password-noampersand',
863     'section' => 'password',
864     'description' => 'Disallow ampersands in passwords',
865     'type' => 'checkbox',
866   },
867
868   {
869     'key' => 'password-noexclamation',
870     'section' => 'password',
871     'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
872     'type' => 'checkbox',
873   },
874
875   {
876     'key'         => 'qmailmachines',
877     'section'     => 'deprecated',
878     '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.',
879     'type'        => [qw( checkbox textarea )],
880   },
881
882   {
883     'key'         => 'radiusmachines',
884     'section'     => 'deprecated',
885     '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\'.',
886     'type'        => 'textarea',
887   },
888
889   {
890     'key'         => 'referraldefault',
891     'section'     => 'UI',
892     'description' => 'Default referral, specified by refnum',
893     'type'        => 'text',
894   },
895
896 #  {
897 #    'key'         => 'registries',
898 #    'section'     => 'required',
899 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
900 #  },
901
902   {
903     'key'         => 'report_template',
904     'section'     => 'deprecated',
905     'description' => 'Deprecated template file for reports.',
906     'type'        => 'textarea',
907   },
908
909
910   {
911     'key'         => 'maxsearchrecordsperpage',
912     'section'     => 'UI',
913     'description' => 'If set, number of search records to return per page.',
914     'type'        => 'text',
915   },
916
917   {
918     'key'         => 'sendmailconfigpath',
919     'section'     => 'deprecated',
920     '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\'.',
921     'type'        => 'text',
922   },
923
924   {
925     'key'         => 'sendmailmachines',
926     'section'     => 'deprecated',
927     '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\'.',
928     'type'        => 'textarea',
929   },
930
931   {
932     'key'         => 'sendmailrestart',
933     'section'     => 'deprecated',
934     '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.',
935     'type'        => 'text',
936   },
937
938   {
939     'key'         => 'session-start',
940     'section'     => 'session',
941     '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.',
942     'type'        => 'text',
943   },
944
945   {
946     'key'         => 'session-stop',
947     'section'     => 'session',
948     '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.',
949     'type'        => 'text',
950   },
951
952   {
953     'key'         => 'shellmachine',
954     'section'     => 'deprecated',
955     '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.',
956     'type'        => 'text',
957   },
958
959   {
960     'key'         => 'shellmachine-useradd',
961     'section'     => 'deprecated',
962     '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>.',
963     'type'        => [qw( checkbox text )],
964   },
965
966   {
967     'key'         => 'shellmachine-userdel',
968     'section'     => 'deprecated',
969     '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>.',
970     'type'        => [qw( checkbox text )],
971   },
972
973   {
974     'key'         => 'shellmachine-usermod',
975     'section'     => 'deprecated',
976     '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>.',
977     #'type'        => [qw( checkbox text )],
978     'type'        => 'text',
979   },
980
981   {
982     'key'         => 'shellmachines',
983     'section'     => 'deprecated',
984     '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.',
985      'type'        => 'textarea',
986  },
987
988   {
989     'key'         => 'shells',
990     'section'     => 'required',
991     '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.',
992     'type'        => 'textarea',
993   },
994
995   {
996     'key'         => 'showpasswords',
997     'section'     => 'UI',
998     'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
999     'type'        => 'checkbox',
1000   },
1001
1002   {
1003     'key'         => 'signupurl',
1004     'section'     => 'UI',
1005     'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:Self-Service_Installation">signup server CGI</a>, the customer view screen will display a customized link to the signup server with the appropriate customer as referral',
1006     'type'        => 'text',
1007   },
1008
1009   {
1010     'key'         => 'smtpmachine',
1011     'section'     => 'required',
1012     'description' => 'SMTP relay for Freeside\'s outgoing mail',
1013     'type'        => 'text',
1014   },
1015
1016   {
1017     'key'         => 'soadefaultttl',
1018     'section'     => 'BIND',
1019     'description' => 'SOA default TTL for new domains.',
1020     'type'        => 'text',
1021   },
1022
1023   {
1024     'key'         => 'soaemail',
1025     'section'     => 'BIND',
1026     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1027     'type'        => 'text',
1028   },
1029
1030   {
1031     'key'         => 'soaexpire',
1032     'section'     => 'BIND',
1033     'description' => 'SOA expire for new domains',
1034     'type'        => 'text',
1035   },
1036
1037   {
1038     'key'         => 'soamachine',
1039     'section'     => 'BIND',
1040     'description' => 'SOA machine for new domains, with trailing `.\'',
1041     'type'        => 'text',
1042   },
1043
1044   {
1045     'key'         => 'soarefresh',
1046     'section'     => 'BIND',
1047     'description' => 'SOA refresh for new domains',
1048     'type'        => 'text',
1049   },
1050
1051   {
1052     'key'         => 'soaretry',
1053     'section'     => 'BIND',
1054     'description' => 'SOA retry for new domains',
1055     'type'        => 'text',
1056   },
1057
1058   {
1059     'key'         => 'statedefault',
1060     'section'     => 'UI',
1061     'description' => 'Default state or province (if not supplied, the default is `CA\')',
1062     'type'        => 'text',
1063   },
1064
1065   {
1066     'key'         => 'radiusprepend',
1067     'section'     => 'deprecated',
1068     '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).',
1069     'type'        => 'textarea',
1070   },
1071
1072   {
1073     'key'         => 'textradiusprepend',
1074     'section'     => 'deprecated',
1075     '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.',
1076     'type'        => 'text',
1077   },
1078
1079   {
1080     'key'         => 'unsuspendauto',
1081     'section'     => 'billing',
1082     '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',
1083     'type'        => 'checkbox',
1084   },
1085
1086   {
1087     'key'         => 'unsuspend-always_adjust_next_bill_date',
1088     'section'     => 'billing',
1089     '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.',
1090     'type'        => 'checkbox',
1091   },
1092
1093   {
1094     'key'         => 'usernamemin',
1095     'section'     => 'username',
1096     'description' => 'Minimum username length (default 2)',
1097     'type'        => 'text',
1098   },
1099
1100   {
1101     'key'         => 'usernamemax',
1102     'section'     => 'username',
1103     'description' => 'Maximum username length',
1104     'type'        => 'text',
1105   },
1106
1107   {
1108     'key'         => 'username-ampersand',
1109     'section'     => 'username',
1110     '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.',
1111     'type'        => 'checkbox',
1112   },
1113
1114   {
1115     'key'         => 'username-letter',
1116     'section'     => 'username',
1117     'description' => 'Usernames must contain at least one letter',
1118     'type'        => 'checkbox',
1119   },
1120
1121   {
1122     'key'         => 'username-letterfirst',
1123     'section'     => 'username',
1124     'description' => 'Usernames must start with a letter',
1125     'type'        => 'checkbox',
1126   },
1127
1128   {
1129     'key'         => 'username-noperiod',
1130     'section'     => 'username',
1131     'description' => 'Disallow periods in usernames',
1132     'type'        => 'checkbox',
1133   },
1134
1135   {
1136     'key'         => 'username-nounderscore',
1137     'section'     => 'username',
1138     'description' => 'Disallow underscores in usernames',
1139     'type'        => 'checkbox',
1140   },
1141
1142   {
1143     'key'         => 'username-nodash',
1144     'section'     => 'username',
1145     'description' => 'Disallow dashes in usernames',
1146     'type'        => 'checkbox',
1147   },
1148
1149   {
1150     'key'         => 'username-uppercase',
1151     'section'     => 'username',
1152     'description' => 'Allow uppercase characters in usernames.  Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
1153     'type'        => 'checkbox',
1154   },
1155
1156   { 
1157     'key'         => 'username-percent',
1158     'section'     => 'username',
1159     'description' => 'Allow the percent character (%) in usernames.',
1160     'type'        => 'checkbox',
1161   },
1162
1163   {
1164     'key'         => 'username_policy',
1165     'section'     => 'deprecated',
1166     '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\'',
1167     'type'        => 'select',
1168     'select_enum' => [ 'prepend domsvc', 'append domsvc', 'append domain', 'append @domain' ],
1169     #'type'        => 'text',
1170   },
1171
1172   {
1173     'key'         => 'vpopmailmachines',
1174     'section'     => 'deprecated',
1175     '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',
1176     'type'        => 'textarea',
1177   },
1178
1179   {
1180     'key'         => 'vpopmailrestart',
1181     'section'     => 'deprecated',
1182     '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.',
1183     'type'        => 'textarea',
1184   },
1185
1186   {
1187     'key'         => 'safe-part_pkg',
1188     'section'     => 'deprecated',
1189     'description' => '<b>DEPRECATED</b>, obsolete.  Used to validate package definition setup and recur expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1190     'type'        => 'checkbox',
1191   },
1192
1193   { 
1194     'key'         => 'username-colon',
1195     'section'     => 'username',
1196     'description' => 'Allow the colon character (:) in usernames.',
1197     'type'        => 'checkbox',
1198   },
1199
1200   {
1201     'key'         => 'safe-part_bill_event',
1202     'section'     => 'UI',
1203     'description' => 'Validates invoice event expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1204     'type'        => 'checkbox',
1205   },
1206
1207   {
1208     'key'         => 'show_ss',
1209     'section'     => 'UI',
1210     'description' => 'Turns on display/collection of SS# in the web interface.',
1211     'type'        => 'checkbox',
1212   },
1213
1214   { 
1215     'key'         => 'show_stateid',
1216     'section'     => 'UI',
1217     'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface.  Sometimes required by electronic check (ACH) processors.",
1218     'type'        => 'checkbox',
1219   },
1220
1221   {
1222     'key'         => 'show_bankstate',
1223     'section'     => 'UI',
1224     'description' => "Turns on display/collection of state for bank accounts in the web interface.  Sometimes required by electronic check (ACH) processors.",
1225     'type'        => 'checkbox',
1226   },
1227
1228   { 
1229     'key'         => 'agent_defaultpkg',
1230     'section'     => 'UI',
1231     'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
1232     'type'        => 'checkbox',
1233   },
1234
1235   {
1236     'key'         => 'legacy_link',
1237     'section'     => 'UI',
1238     'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
1239     'type'        => 'checkbox',
1240   },
1241
1242   {
1243     'key'         => 'legacy_link-steal',
1244     'section'     => 'UI',
1245     'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
1246     'type'        => 'checkbox',
1247   },
1248
1249   {
1250     'key'         => 'queue_dangerous_controls',
1251     'section'     => 'UI',
1252     '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.',
1253     'type'        => 'checkbox',
1254   },
1255
1256   {
1257     'key'         => 'security_phrase',
1258     'section'     => 'password',
1259     'description' => 'Enable the tracking of a "security phrase" with each account.  Not recommended, as it is vulnerable to social engineering.',
1260     'type'        => 'checkbox',
1261   },
1262
1263   {
1264     'key'         => 'locale',
1265     'section'     => 'UI',
1266     'description' => 'Message locale',
1267     'type'        => 'select',
1268     'select_enum' => [ qw(en_US) ],
1269   },
1270
1271   {
1272     'key'         => 'selfservice_server-quiet',
1273     'section'     => 'deprecated',
1274     '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.',
1275     'type'        => 'checkbox',
1276   },
1277
1278   {
1279     'key'         => 'signup_server-quiet',
1280     'section'     => 'deprecated',
1281     '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.',
1282     'type'        => 'checkbox',
1283   },
1284
1285   {
1286     'key'         => 'signup_server-payby',
1287     'section'     => '',
1288     'description' => 'Acceptable payment types for the signup server',
1289     'type'        => 'selectmultiple',
1290     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
1291   },
1292
1293   {
1294     'key'         => 'signup_server-email',
1295     'section'     => 'deprecated',
1296     '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.',
1297     'type'        => 'text',
1298   },
1299
1300   {
1301     'key'         => 'signup_server-default_agentnum',
1302     'section'     => '',
1303     'description' => 'Default agent for the signup server',
1304     'type'        => 'select-sub',
1305     'options_sub' => sub { require FS::Record;
1306                            require FS::agent;
1307                            map { $_->agentnum => $_->agent }
1308                                FS::Record::qsearch('agent', { disabled=>'' } );
1309                          },
1310     'option_sub'  => sub { require FS::Record;
1311                            require FS::agent;
1312                            my $agent = FS::Record::qsearchs(
1313                              'agent', { 'agentnum'=>shift }
1314                            );
1315                            $agent ? $agent->agent : '';
1316                          },
1317   },
1318
1319   {
1320     'key'         => 'signup_server-default_refnum',
1321     'section'     => '',
1322     'description' => 'Default advertising source for the signup server',
1323     'type'        => 'select-sub',
1324     'options_sub' => sub { require FS::Record;
1325                            require FS::part_referral;
1326                            map { $_->refnum => $_->referral }
1327                                FS::Record::qsearch( 'part_referral', 
1328                                                     { 'disabled' => '' }
1329                                                   );
1330                          },
1331     'option_sub'  => sub { require FS::Record;
1332                            require FS::part_referral;
1333                            my $part_referral = FS::Record::qsearchs(
1334                              'part_referral', { 'refnum'=>shift } );
1335                            $part_referral ? $part_referral->referral : '';
1336                          },
1337   },
1338
1339   {
1340     'key'         => 'signup_server-default_pkgpart',
1341     'section'     => '',
1342     'description' => 'Default pakcage for the signup server',
1343     'type'        => 'select-sub',
1344     'options_sub' => sub { require FS::Record;
1345                            require FS::part_pkg;
1346                            map { $_->pkgpart => $_->pkg.' - '.$_->comment }
1347                                FS::Record::qsearch( 'part_pkg',
1348                                                     { 'disabled' => ''}
1349                                                   );
1350                          },
1351     'option_sub'  => sub { require FS::Record;
1352                            require FS::part_pkg;
1353                            my $part_pkg = FS::Record::qsearchs(
1354                              'part_pkg', { 'pkgpart'=>shift }
1355                            );
1356                            $part_pkg
1357                              ? $part_pkg->pkg.' - '.$part_pkg->comment
1358                              : '';
1359                          },
1360   },
1361
1362   {
1363     'key'         => 'show-msgcat-codes',
1364     'section'     => 'UI',
1365     'description' => 'Show msgcat codes in error messages.  Turn this option on before reporting errors to the mailing list.',
1366     'type'        => 'checkbox',
1367   },
1368
1369   {
1370     'key'         => 'signup_server-realtime',
1371     'section'     => '',
1372     'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
1373     'type'        => 'checkbox',
1374   },
1375   {
1376     'key'         => 'signup_server-classnum2',
1377     'section'     => '',
1378     'description' => 'Package Class for first optional purchase',
1379     'type'        => 'select-sub',
1380     'options_sub' => sub { require FS::Record;
1381                            require FS::pkg_class;
1382                            map { $_->classnum => $_->classname }
1383                                FS::Record::qsearch('pkg_class', {} );
1384                          },
1385     'option_sub'  => sub { require FS::Record;
1386                            require FS::pkg_class;
1387                            my $pkg_class = FS::Record::qsearchs(
1388                              'pkg_class', { 'classnum'=>shift }
1389                            );
1390                            $pkg_class ? $pkg_class->classname : '';
1391                          },
1392   },
1393
1394   {
1395     'key'         => 'signup_server-classnum3',
1396     'section'     => '',
1397     'description' => 'Package Class for second optional purchase',
1398     'type'        => 'select-sub',
1399     'options_sub' => sub { require FS::Record;
1400                            require FS::pkg_class;
1401                            map { $_->classnum => $_->classname }
1402                                FS::Record::qsearch('pkg_class', {} );
1403                          },
1404     'option_sub'  => sub { require FS::Record;
1405                            require FS::pkg_class;
1406                            my $pkg_class = FS::Record::qsearchs(
1407                              'pkg_class', { 'classnum'=>shift }
1408                            );
1409                            $pkg_class ? $pkg_class->classname : '';
1410                          },
1411   },
1412
1413   {
1414     'key'         => 'backend-realtime',
1415     'section'     => '',
1416     'description' => 'Run billing for backend signups immediately.',
1417     'type'        => 'checkbox',
1418   },
1419
1420   {
1421     'key'         => 'declinetemplate',
1422     'section'     => 'billing',
1423     'description' => 'Template file for credit card decline emails.',
1424     'type'        => 'textarea',
1425   },
1426
1427   {
1428     'key'         => 'emaildecline',
1429     'section'     => 'billing',
1430     'description' => 'Enable emailing of credit card decline notices.',
1431     'type'        => 'checkbox',
1432   },
1433
1434   {
1435     'key'         => 'emaildecline-exclude',
1436     'section'     => 'billing',
1437     'description' => 'List of error messages that should not trigger email decline notices, one per line.',
1438     'type'        => 'textarea',
1439   },
1440
1441   {
1442     'key'         => 'cancelmessage',
1443     'section'     => 'billing',
1444     'description' => 'Template file for cancellation emails.',
1445     'type'        => 'textarea',
1446   },
1447
1448   {
1449     'key'         => 'cancelsubject',
1450     'section'     => 'billing',
1451     'description' => 'Subject line for cancellation emails.',
1452     'type'        => 'text',
1453   },
1454
1455   {
1456     'key'         => 'emailcancel',
1457     'section'     => 'billing',
1458     'description' => 'Enable emailing of cancellation notices.',
1459     'type'        => 'checkbox',
1460   },
1461
1462   {
1463     'key'         => 'require_cardname',
1464     'section'     => 'billing',
1465     'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
1466     'type'        => 'checkbox',
1467   },
1468
1469   {
1470     'key'         => 'enable_taxclasses',
1471     'section'     => 'billing',
1472     'description' => 'Enable per-package tax classes',
1473     'type'        => 'checkbox',
1474   },
1475
1476   {
1477     'key'         => 'require_taxclasses',
1478     'section'     => 'billing',
1479     'description' => 'Require a taxclass to be entered for every package',
1480     'type'        => 'checkbox',
1481   },
1482
1483   {
1484     'key'         => 'welcome_email',
1485     'section'     => '',
1486     '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/dist/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>',
1487     'type'        => 'textarea',
1488   },
1489
1490   {
1491     'key'         => 'welcome_email-from',
1492     'section'     => '',
1493     'description' => 'From: address header for welcome email',
1494     'type'        => 'text',
1495   },
1496
1497   {
1498     'key'         => 'welcome_email-subject',
1499     'section'     => '',
1500     'description' => 'Subject: header for welcome email',
1501     'type'        => 'text',
1502   },
1503   
1504   {
1505     'key'         => 'welcome_email-mimetype',
1506     'section'     => '',
1507     'description' => 'MIME type for welcome email',
1508     'type'        => 'select',
1509     'select_enum' => [ 'text/plain', 'text/html' ],
1510   },
1511
1512   {
1513     'key'         => 'welcome_letter',
1514     'section'     => '',
1515     '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/dist/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>',
1516     'type'        => 'textarea',
1517   },
1518
1519   {
1520     'key'         => 'warning_email',
1521     'section'     => '',
1522     '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/dist/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>',
1523     'type'        => 'textarea',
1524   },
1525
1526   {
1527     'key'         => 'warning_email-from',
1528     'section'     => '',
1529     'description' => 'From: address header for warning email',
1530     'type'        => 'text',
1531   },
1532
1533   {
1534     'key'         => 'warning_email-cc',
1535     'section'     => '',
1536     'description' => 'Additional recipient(s) (comma separated) for warning email when remaining usage reaches zero.',
1537     'type'        => 'text',
1538   },
1539
1540   {
1541     'key'         => 'warning_email-subject',
1542     'section'     => '',
1543     'description' => 'Subject: header for warning email',
1544     'type'        => 'text',
1545   },
1546   
1547   {
1548     'key'         => 'warning_email-mimetype',
1549     'section'     => '',
1550     'description' => 'MIME type for warning email',
1551     'type'        => 'select',
1552     'select_enum' => [ 'text/plain', 'text/html' ],
1553   },
1554
1555   {
1556     'key'         => 'payby',
1557     'section'     => 'billing',
1558     'description' => 'Available payment types.',
1559     'type'        => 'selectmultiple',
1560     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP) ],
1561   },
1562
1563   {
1564     'key'         => 'payby-default',
1565     'section'     => 'UI',
1566     'description' => 'Default payment type.  HIDE disables display of billing information and sets customers to BILL.',
1567     'type'        => 'select',
1568     'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
1569   },
1570
1571   {
1572     'key'         => 'paymentforcedtobatch',
1573     'section'     => 'deprecated',
1574     '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.',
1575     'type'        => 'checkbox',
1576   },
1577
1578   {
1579     'key'         => 'svc_acct-notes',
1580     'section'     => 'UI',
1581     'description' => 'Extra HTML to be displayed on the Account View screen.',
1582     'type'        => 'textarea',
1583   },
1584
1585   {
1586     'key'         => 'radius-password',
1587     'section'     => '',
1588     'description' => 'RADIUS attribute for plain-text passwords.',
1589     'type'        => 'select',
1590     'select_enum' => [ 'Password', 'User-Password' ],
1591   },
1592
1593   {
1594     'key'         => 'radius-ip',
1595     'section'     => '',
1596     'description' => 'RADIUS attribute for IP addresses.',
1597     'type'        => 'select',
1598     'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
1599   },
1600
1601   #http://dev.coova.org/svn/coova-chilli/doc/dictionary.chillispot
1602   {
1603     'key'         => 'radius-chillispot-max',
1604     'section'     => '',
1605     'description' => 'Enable ChilliSpot (and CoovaChilli) Max attributes, specifically ChilliSpot-Max-{Input,Output,Total}-{Octets,Gigawords}.',
1606     'type'        => 'checkbox',
1607   },
1608
1609   {
1610     'key'         => 'svc_acct-alldomains',
1611     'section'     => '',
1612     '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.',
1613     'type'        => 'checkbox',
1614   },
1615
1616   {
1617     'key'         => 'dump-scpdest',
1618     'section'     => '',
1619     'description' => 'destination for scp database dumps: user@host:/path',
1620     'type'        => 'text',
1621   },
1622
1623   {
1624     'key'         => 'dump-pgpid',
1625     'section'     => '',
1626     '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.",
1627     'type'        => 'text',
1628   },
1629
1630   {
1631     'key'         => 'users-allow_comp',
1632     'section'     => 'deprecated',
1633     '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.',
1634     'type'        => 'textarea',
1635   },
1636
1637   {
1638     'key'         => 'credit_card-recurring_billing_flag',
1639     'section'     => 'billing',
1640     '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. ',
1641     'type'        => 'select',
1642     'select_hash' => [
1643                        'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
1644                        'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, irregardless of previous charges on the card.',
1645                      ],
1646   },
1647
1648   {
1649     'key'         => 'credit_card-recurring_billing_acct_code',
1650     'section'     => 'billing',
1651     'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill".  Useful for reporting purposes with supported gateways (PlugNPay, others?)',
1652     'type'        => 'checkbox',
1653   },
1654
1655   {
1656     'key'         => 'cvv-save',
1657     'section'     => 'billing',
1658     '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.',
1659     'type'        => 'selectmultiple',
1660     'select_enum' => \@card_types,
1661   },
1662
1663   {
1664     'key'         => 'allow_negative_charges',
1665     'section'     => 'billing',
1666     'description' => 'Allow negative charges.  Normally not used unless importing data from a legacy system that requires this.',
1667     'type'        => 'checkbox',
1668   },
1669   {
1670       'key'         => 'auto_unset_catchall',
1671       'section'     => '',
1672       '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.',
1673       'type'        => 'checkbox',
1674   },
1675
1676   {
1677     'key'         => 'system_usernames',
1678     'section'     => 'username',
1679     '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.',
1680     'type'        => 'textarea',
1681   },
1682
1683   {
1684     'key'         => 'cust_pkg-change_svcpart',
1685     'section'     => '',
1686     'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
1687     'type'        => 'checkbox',
1688   },
1689
1690   {
1691     'key'         => 'disable_autoreverse',
1692     'section'     => 'BIND',
1693     'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
1694     'type'        => 'checkbox',
1695   },
1696
1697   {
1698     'key'         => 'svc_www-enable_subdomains',
1699     'section'     => '',
1700     'description' => 'Enable selection of specific subdomains for virtual host creation.',
1701     'type'        => 'checkbox',
1702   },
1703
1704   {
1705     'key'         => 'svc_www-usersvc_svcpart',
1706     'section'     => '',
1707     'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
1708     'type'        => 'textarea',
1709   },
1710
1711   {
1712     'key'         => 'selfservice_server-primary_only',
1713     'section'     => '',
1714     'description' => 'Only allow primary accounts to access self-service functionality.',
1715     'type'        => 'checkbox',
1716   },
1717
1718   {
1719     'key'         => 'card_refund-days',
1720     'section'     => 'billing',
1721     'description' => 'After a payment, the number of days a refund link will be available for that payment.  Defaults to 120.',
1722     'type'        => 'text',
1723   },
1724
1725   {
1726     'key'         => 'agent-showpasswords',
1727     'section'     => '',
1728     'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
1729     'type'        => 'checkbox',
1730   },
1731
1732   {
1733     'key'         => 'global_unique-username',
1734     'section'     => 'username',
1735     '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.',
1736     'type'        => 'select',
1737     'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
1738   },
1739
1740   {
1741     'key'         => 'svc_external-skip_manual',
1742     'section'     => 'UI',
1743     '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).',
1744     'type'        => 'checkbox',
1745   },
1746
1747   {
1748     'key'         => 'svc_external-display_type',
1749     'section'     => 'UI',
1750     'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
1751     'type'        => 'select',
1752     'select_enum' => [ 'generic', 'artera_turbo', ],
1753   },
1754
1755   {
1756     'key'         => 'ticket_system',
1757     'section'     => '',
1758     'description' => 'Ticketing system integration.  <b>RT_Internal</b> uses the built-in RT ticketing system (see the <a href="http://www.sisd.com/mediawiki/index.php/Freeside:1.7:Documentation:RT_Installation">integrated ticketing installation instructions</a>).   <b>RT_External</b> accesses an external RT installation in a separate database (local or remote).',
1759     'type'        => 'select',
1760     #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
1761     'select_enum' => [ '', qw(RT_Internal RT_External) ],
1762   },
1763
1764   {
1765     'key'         => 'ticket_system-default_queueid',
1766     'section'     => '',
1767     'description' => 'Default queue used when creating new customer tickets.',
1768     'type'        => 'select-sub',
1769     'options_sub' => sub {
1770                            my $conf = new FS::Conf;
1771                            if ( $conf->config('ticket_system') ) {
1772                              eval "use FS::TicketSystem;";
1773                              die $@ if $@;
1774                              FS::TicketSystem->queues();
1775                            } else {
1776                              ();
1777                            }
1778                          },
1779     'option_sub'  => sub { 
1780                            my $conf = new FS::Conf;
1781                            if ( $conf->config('ticket_system') ) {
1782                              eval "use FS::TicketSystem;";
1783                              die $@ if $@;
1784                              FS::TicketSystem->queue(shift);
1785                            } else {
1786                              '';
1787                            }
1788                          },
1789   },
1790
1791   {
1792     'key'         => 'ticket_system-custom_priority_field',
1793     'section'     => '',
1794     'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
1795     'type'        => 'text',
1796   },
1797
1798   {
1799     'key'         => 'ticket_system-custom_priority_field-values',
1800     'section'     => '',
1801     'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
1802     'type'        => 'textarea',
1803   },
1804
1805   {
1806     'key'         => 'ticket_system-custom_priority_field_queue',
1807     'section'     => '',
1808     'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
1809     'type'        => 'text',
1810   },
1811
1812   {
1813     'key'         => 'ticket_system-rt_external_datasrc',
1814     'section'     => '',
1815     '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>',
1816     'type'        => 'text',
1817
1818   },
1819
1820   {
1821     'key'         => 'ticket_system-rt_external_url',
1822     'section'     => '',
1823     'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
1824     'type'        => 'text',
1825   },
1826
1827   {
1828     'key'         => 'company_name',
1829     'section'     => 'required',
1830     'description' => 'Your company name',
1831     'type'        => 'text',
1832   },
1833
1834   {
1835     'key'         => 'echeck-void',
1836     'section'     => 'deprecated',
1837     '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',
1838     'type'        => 'checkbox',
1839   },
1840
1841   {
1842     'key'         => 'cc-void',
1843     'section'     => 'deprecated',
1844     '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',
1845     'type'        => 'checkbox',
1846   },
1847
1848   {
1849     'key'         => 'unvoid',
1850     'section'     => 'deprecated',
1851     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable unvoiding of voided payments',
1852     'type'        => 'checkbox',
1853   },
1854
1855   {
1856     'key'         => 'address2-search',
1857     'section'     => 'UI',
1858     'description' => 'Enable a "Unit" search box which searches the second address field.  Useful for multi-tenant applications.  See also: cust_main-require_address2',
1859     'type'        => 'checkbox',
1860   },
1861
1862   {
1863     'key'         => 'cust_main-require_address2',
1864     'section'     => 'UI',
1865     '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',
1866     'type'        => 'checkbox',
1867   },
1868
1869   { 'key'         => 'referral_credit',
1870     'section'     => 'billing',
1871     'description' => "Enables one-time referral credits in the amount of one month <i>referred</i> customer's recurring fee (irregardless of frequency).",
1872     'type'        => 'checkbox',
1873   },
1874
1875   { 'key'         => 'selfservice_server-cache_module',
1876     'section'     => '',
1877     '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.',
1878     'type'        => 'select',
1879     'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
1880   },
1881
1882   {
1883     'key'         => 'hylafax',
1884     'section'     => 'billing',
1885     '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).',
1886     'type'        => [qw( checkbox textarea )],
1887   },
1888
1889   {
1890     'key'         => 'cust_bill-ftpformat',
1891     'section'     => 'billing',
1892     'description' => 'Enable FTP of raw invoice data - format.',
1893     'type'        => 'select',
1894     'select_enum' => [ '', 'default', 'billco', ],
1895   },
1896
1897   {
1898     'key'         => 'cust_bill-ftpserver',
1899     'section'     => 'billing',
1900     'description' => 'Enable FTP of raw invoice data - server.',
1901     'type'        => 'text',
1902   },
1903
1904   {
1905     'key'         => 'cust_bill-ftpusername',
1906     'section'     => 'billing',
1907     'description' => 'Enable FTP of raw invoice data - server.',
1908     'type'        => 'text',
1909   },
1910
1911   {
1912     'key'         => 'cust_bill-ftppassword',
1913     'section'     => 'billing',
1914     'description' => 'Enable FTP of raw invoice data - server.',
1915     'type'        => 'text',
1916   },
1917
1918   {
1919     'key'         => 'cust_bill-ftpdir',
1920     'section'     => 'billing',
1921     'description' => 'Enable FTP of raw invoice data - server.',
1922     'type'        => 'text',
1923   },
1924
1925   {
1926     'key'         => 'cust_bill-spoolformat',
1927     'section'     => 'billing',
1928     'description' => 'Enable spooling of raw invoice data - format.',
1929     'type'        => 'select',
1930     'select_enum' => [ '', 'default', 'billco', ],
1931   },
1932
1933   {
1934     'key'         => 'cust_bill-spoolagent',
1935     'section'     => 'billing',
1936     'description' => 'Enable per-agent spooling of raw invoice data.',
1937     'type'        => 'checkbox',
1938   },
1939
1940   {
1941     'key'         => 'svc_acct-usage_suspend',
1942     'section'     => 'billing',
1943     '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.',
1944     'type'        => 'checkbox',
1945   },
1946
1947   {
1948     'key'         => 'svc_acct-usage_unsuspend',
1949     'section'     => 'billing',
1950     '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.',
1951     'type'        => 'checkbox',
1952   },
1953
1954   {
1955     'key'         => 'svc_acct-usage_threshold',
1956     'section'     => 'billing',
1957     '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.',
1958     'type'        => 'text',
1959   },
1960
1961   {
1962     'key'         => 'cust-fields',
1963     'section'     => 'UI',
1964     'description' => 'Which customer fields to display on reports by default',
1965     'type'        => 'select',
1966     'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
1967   },
1968
1969   {
1970     'key'         => 'cust_pkg-display_times',
1971     'section'     => 'UI',
1972     'description' => 'Display full timestamps (not just dates) for customer packages.  Useful if you are doing real-time things like hourly prepaid.',
1973     'type'        => 'checkbox',
1974   },
1975
1976   {
1977     'key'         => 'svc_acct-edit_uid',
1978     'section'     => 'shell',
1979     'description' => 'Allow UID editing.',
1980     'type'        => 'checkbox',
1981   },
1982
1983   {
1984     'key'         => 'svc_acct-edit_gid',
1985     'section'     => 'shell',
1986     'description' => 'Allow GID editing.',
1987     'type'        => 'checkbox',
1988   },
1989
1990   {
1991     'key'         => 'zone-underscore',
1992     'section'     => 'BIND',
1993     'description' => 'Allow underscores in zone names.  As underscores are illegal characters in zone names, this option is not recommended.',
1994     'type'        => 'checkbox',
1995   },
1996
1997   #these should become per-user...
1998   {
1999     'key'         => 'vonage-username',
2000     'section'     => '',
2001     'description' => 'Vonage Click2Call username (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2002     'type'        => 'text',
2003   },
2004   {
2005     'key'         => 'vonage-password',
2006     'section'     => '',
2007     'description' => 'Vonage Click2Call username (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2008     'type'        => 'text',
2009   },
2010   {
2011     'key'         => 'vonage-fromnumber',
2012     'section'     => '',
2013     'description' => 'Vonage Click2Call number (see <a href="https://secure.click2callu.com/">https://secure.click2callu.com/</a>)',
2014     'type'        => 'text',
2015   },
2016
2017   {
2018     'key'         => 'echeck-nonus',
2019     'section'     => 'billing',
2020     'description' => 'Disable ABA-format account checking for Electronic Check payment info',
2021     'type'        => 'checkbox',
2022   },
2023
2024   {
2025     'key'         => 'voip-cust_cdr_spools',
2026     'section'     => '',
2027     'description' => 'Enable the per-customer option for individual CDR spools.',
2028     'type'        => 'checkbox',
2029   },
2030
2031   {
2032     'key'         => 'svc_forward-arbitrary_dst',
2033     'section'     => '',
2034     '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.",
2035     'type'        => 'checkbox',
2036   },
2037
2038   {
2039     'key'         => 'tax-ship_address',
2040     'section'     => 'billing',
2041     '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.',
2042     'type'        => 'checkbox',
2043   },
2044
2045   {
2046     'key'         => 'invoice-ship_address',
2047     'section'     => 'billing',
2048     'description' => 'Enable this switch to include the ship address on the invoice.',
2049     'type'        => 'checkbox',
2050   },
2051
2052   {
2053     'key'         => 'invoice-unitprice',
2054     'section'     => 'billing',
2055     'description' => 'This switch enables unit pricing on the invoice.',
2056     'type'        => 'checkbox',
2057   },
2058
2059   {
2060     'key'         => 'postal_invoice-fee_pkgpart',
2061     'section'     => 'billing',
2062     'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
2063     'type'        => 'select-sub',
2064     'options_sub' => sub { require FS::Record;
2065                            require FS::part_pkg;
2066                            map { $_->pkgpart => $_->pkg }
2067                                FS::Record::qsearch('part_pkg', { disabled=>'' } );
2068                          },
2069     'option_sub'  => sub { require FS::Record;
2070                            require FS::part_pkg;
2071                            my $part_pkg = FS::Record::qsearchs(
2072                              'part_pkg', { 'pkgpart'=>shift }
2073                            );
2074                            $part_pkg ? $part_pkg->pkg : '';
2075                          },
2076   },
2077
2078   {
2079     'key'         => 'postal_invoice-recurring_only',
2080     'section'     => 'billing',
2081     'description' => 'The postal invoice fee is omitted on invoices without recurring charges when this is set',
2082     'type'        => 'checkbox',
2083   },
2084
2085   {
2086     'key'         => 'batch-enable',
2087     'section'     => 'deprecated', #make sure batch-enable_payby is set for
2088                                    #everyone before removing
2089     'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
2090     'type'        => 'checkbox',
2091   },
2092
2093   {
2094     'key'         => 'batch-enable_payby',
2095     'section'     => 'billing',
2096     'description' => 'Enable batch processing for the specified payment types.',
2097     'type'        => 'selectmultiple',
2098     'select_enum' => [qw( CARD CHEK )],
2099   },
2100
2101   {
2102     'key'         => 'realtime-disable_payby',
2103     'section'     => 'billing',
2104     'description' => 'Disable realtime processing for the specified payment types.',
2105     'type'        => 'selectmultiple',
2106     'select_enum' => [qw( CARD CHEK )],
2107   },
2108
2109   {
2110     'key'         => 'batch-default_format',
2111     'section'     => 'billing',
2112     'description' => 'Default format for batches.',
2113     'type'        => 'select',
2114     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch',
2115                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP',
2116                        'ach-spiritone',
2117                     ]
2118   },
2119
2120   {
2121     'key'         => 'batch-fixed_format-CARD',
2122     'section'     => 'billing',
2123     'description' => 'Fixed (unchangeable) format for credit card batches.',
2124     'type'        => 'select',
2125     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP' ,
2126                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP' ]
2127   },
2128
2129   {
2130     'key'         => 'batch-fixed_format-CHEK',
2131     'section'     => 'billing',
2132     'description' => 'Fixed (unchangeable) format for electronic check batches.',
2133     'type'        => 'select',
2134     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
2135                        'ach-spiritone',
2136                      ]
2137   },
2138
2139   {
2140     'key'         => 'batch-increment_expiration',
2141     'section'     => 'billing',
2142     'description' => 'Increment expiration date years in batches until cards are current.  Make sure this is acceptable to your batching provider before enabling.',
2143     'type'        => 'checkbox'
2144   },
2145
2146   {
2147     'key'         => 'batchconfig-BoM',
2148     'section'     => 'billing',
2149     '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',
2150     'type'        => 'textarea',
2151   },
2152
2153   {
2154     'key'         => 'batchconfig-PAP',
2155     'section'     => 'billing',
2156     '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',
2157     'type'        => 'textarea',
2158   },
2159
2160   {
2161     'key'         => 'batchconfig-csv-chase_canada-E-xactBatch',
2162     'section'     => 'billing',
2163     'description' => 'Gateway ID for Chase Canada E-xact batching',
2164     'type'        => 'text',
2165   },
2166
2167   {
2168     'key'         => 'payment_history-years',
2169     'section'     => 'UI',
2170     'description' => 'Number of years of payment history to show by default.  Currently defaults to 2.',
2171     'type'        => 'text',
2172   },
2173
2174   {
2175     'key'         => 'cust_main-use_comments',
2176     'section'     => 'UI',
2177     'description' => 'Display free form comments on the customer edit screen.  Useful as a scratch pad.',
2178     'type'        => 'checkbox',
2179   },
2180
2181   {
2182     'key'         => 'cust_main-disable_notes',
2183     'section'     => 'UI',
2184     'description' => 'Disable new style customer notes - timestamped and user identified customer notes.  Useful in tracking who did what.',
2185     'type'        => 'checkbox',
2186   },
2187
2188   {
2189     'key'         => 'cust_main_note-display_times',
2190     'section'     => 'UI',
2191     'description' => 'Display full timestamps (not just dates) for customer notes.',
2192     'type'        => 'checkbox',
2193   },
2194
2195   {
2196     'key'         => 'cust_main-ticket_statuses',
2197     'section'     => 'UI',
2198     'description' => 'Show tickets with these statuses on the customer view page.',
2199     'type'        => 'selectmultiple',
2200     'select_enum' => [qw( new open stalled resolved rejected deleted )],
2201   },
2202
2203   {
2204     'key'         => 'cust_main-max_tickets',
2205     'section'     => 'UI',
2206     'description' => 'Maximum number of tickets to show on the customer view page.',
2207     'type'        => 'text',
2208   },
2209
2210   {
2211     'key'         => 'cust_main-skeleton_tables',
2212     'section'     => '',
2213     '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.',
2214     'type'        => 'textarea',
2215   },
2216
2217   {
2218     'key'         => 'cust_main-skeleton_custnum',
2219     'section'     => '',
2220     'description' => 'Customer number specifying the source data to copy into skeleton tables for new customers.',
2221     'type'        => 'text',
2222   },
2223
2224   {
2225     'key'         => 'cust_main-enable_birthdate',
2226     'section'     => 'UI',
2227     'descritpion' => 'Enable tracking of a birth date with each customer record',
2228     'type'        => 'checkbox',
2229   },
2230
2231   {
2232     'key'         => 'support-key',
2233     'section'     => '',
2234     '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.',
2235     'type'        => 'text',
2236   },
2237
2238   {
2239     'key'         => 'card-types',
2240     'section'     => 'billing',
2241     'description' => 'Select one or more card types to enable only those card types.  If no card types are selected, all card types are available.',
2242     'type'        => 'selectmultiple',
2243     'select_enum' => \@card_types,
2244   },
2245
2246   {
2247     'key'         => 'dashboard-toplist',
2248     'section'     => 'UI',
2249     'description' => 'List of items to display on the top of the front page',
2250     'type'        => 'textarea',
2251   },
2252
2253   {
2254     'key'         => 'impending_recur_template',
2255     'section'     => 'billing',
2256     'description' => 'Template file for alerts about looming first time recurrant billing.  See the <a href="http://search.cpan.org/dist/Text-Template/lib/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>',
2257 # <li><code>$payby</code> <li><code>$expdate</code> most likely only confuse
2258     'type'        => 'textarea',
2259   },
2260
2261   {
2262     'key'         => 'selfservice-session_timeout',
2263     'section'     => '',
2264     'description' => 'Self-service session timeout.  Defaults to 1 hour.',
2265     'type'        => 'select',
2266     'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
2267   },
2268
2269   {
2270     'key'         => 'disable_setup_suspended_pkgs',
2271     'section'     => 'billing',
2272     'description' => 'Disables charging of setup fees for suspended packages.',
2273     'type'       => 'checkbox',
2274   },
2275
2276   {
2277     'key' => 'password-generated-allcaps',
2278     'section' => 'password',
2279     'description' => 'Causes passwords automatically generated to consist entirely of capital letters',
2280     'type' => 'checkbox',
2281   },
2282
2283   {
2284     'key'         => 'datavolume-forcemegabytes',
2285     'section'     => 'UI',
2286     'description' => 'All data volumes are expressed in megabytes',
2287     'type'        => 'checkbox',
2288   },
2289
2290   {
2291     'key'         => 'datavolume-significantdigits',
2292     'section'     => 'UI',
2293     'description' => 'number of significant digits to use to represent data volumes',
2294     'type'        => 'text',
2295   },
2296
2297   {
2298     'key'         => 'disable_void_after',
2299     'section'     => 'billing',
2300     'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
2301     'type'        => 'text',
2302   },
2303
2304   {
2305     'key'         => 'disable_line_item_date_ranges',
2306     'section'     => 'billing',
2307     'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
2308     'type'        => 'checkbox',
2309   },
2310
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.  Note: You should manually remove stored paymasks if you change this value on an existing database, to avoid problems using stored cards.',
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, payment, and credit 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