late fee package class specified in the event action instead of a global finance_pkgc...
[freeside.git] / FS / FS / Conf.pm
1 package FS::Conf;
2
3 use vars qw($base_dir @config_items @base_items @card_types $DEBUG);
4 use Carp;
5 use IO::File;
6 use File::Basename;
7 use MIME::Base64;
8 use FS::ConfItem;
9 use FS::ConfDefaults;
10 use FS::Conf_compat17;
11 use FS::payby;
12 use FS::conf;
13 use FS::Record qw(qsearch qsearchs);
14 use FS::UID qw(dbh datasrc use_confcompat);
15
16 $base_dir = '%%%FREESIDE_CONF%%%';
17
18 $DEBUG = 0;
19
20 =head1 NAME
21
22 FS::Conf - Freeside configuration values
23
24 =head1 SYNOPSIS
25
26   use FS::Conf;
27
28   $conf = new FS::Conf;
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
50
51 Create a new configuration object.
52
53 =cut
54
55 sub new {
56   my($proto) = @_;
57   my($class) = ref($proto) || $proto;
58   my($self) = { 'base_dir' => $base_dir };
59   bless ($self, $class);
60 }
61
62 =item base_dir
63
64 Returns the base directory.  By default this is /usr/local/etc/freeside.
65
66 =cut
67
68 sub base_dir {
69   my($self) = @_;
70   my $base_dir = $self->{base_dir};
71   -e $base_dir or die "FATAL: $base_dir doesn't exist!";
72   -d $base_dir or die "FATAL: $base_dir isn't a directory!";
73   -r $base_dir or die "FATAL: Can't read $base_dir!";
74   -x $base_dir or die "FATAL: $base_dir not searchable (executable)!";
75   $base_dir =~ /^(.*)$/;
76   $1;
77 }
78
79 =item conf KEY [ AGENTNUM [ NODEFAULT ] ]
80
81 Returns the L<FS::conf> record for the key and agent.
82
83 =cut
84
85 sub conf {
86   my $self = shift;
87   $self->_config(@_);
88 }
89
90 =item config KEY [ AGENTNUM [ NODEFAULT ] ]
91
92 Returns the configuration value or values (depending on context) for key.
93 The optional agent number selects an agent specific value instead of the
94 global default if one is present.  If NODEFAULT is true only the agent
95 specific value(s) is returned.
96
97 =cut
98
99 sub _usecompat {
100   my ($self, $method) = (shift, shift);
101   carp "NO CONFIGURATION RECORDS FOUND -- USING COMPATIBILITY MODE"
102     if use_confcompat;
103   my $compat = new FS::Conf_compat17 ("$base_dir/conf." . datasrc);
104   $compat->$method(@_);
105 }
106
107 sub _config {
108   my($self,$name,$agentnum,$agentonly)=@_;
109   my $hashref = { 'name' => $name };
110   $hashref->{agentnum} = $agentnum;
111   local $FS::Record::conf = undef;  # XXX evil hack prevents recursion
112   my $cv = FS::Record::qsearchs('conf', $hashref);
113   if (!$agentonly && !$cv && defined($agentnum) && $agentnum) {
114     $hashref->{agentnum} = '';
115     $cv = FS::Record::qsearchs('conf', $hashref);
116   }
117   return $cv;
118 }
119
120 sub config {
121   my $self = shift;
122   return $self->_usecompat('config', @_) if use_confcompat;
123
124   carp "FS::Conf->config(". join(', ', @_). ") called"
125     if $DEBUG > 1;
126
127   my $cv = $self->_config(@_) or return;
128
129   if ( wantarray ) {
130     my $v = $cv->value;
131     chomp $v;
132     (split "\n", $v, -1);
133   } else {
134     (split("\n", $cv->value))[0];
135   }
136 }
137
138 =item config_binary KEY [ AGENTNUM [ NODEFAULT ] ]
139
140 Returns the exact scalar value for key.
141
142 =cut
143
144 sub config_binary {
145   my $self = shift;
146   return $self->_usecompat('config_binary', @_) if use_confcompat;
147
148   my $cv = $self->_config(@_) or return;
149   length($cv->value) ? decode_base64($cv->value) : '';
150 }
151
152 =item exists KEY [ AGENTNUM [ NODEFAULT ] ]
153
154 Returns true if the specified key exists, even if the corresponding value
155 is undefined.
156
157 =cut
158
159 sub exists {
160   my $self = shift;
161   return $self->_usecompat('exists', @_) if use_confcompat;
162
163   my($name, $agentnum)=@_;
164
165   carp "FS::Conf->exists(". join(', ', @_). ") called"
166     if $DEBUG > 1;
167
168   defined($self->_config(@_));
169 }
170
171 =item config_orbase KEY SUFFIX
172
173 Returns the configuration value or values (depending on context) for 
174 KEY_SUFFIX, if it exists, otherwise for KEY
175
176 =cut
177
178 # outmoded as soon as we shift to agentnum based config values
179 # well, mostly.  still useful for e.g. late notices, etc. in that we want
180 # these to fall back to standard values
181 sub config_orbase {
182   my $self = shift;
183   return $self->_usecompat('config_orbase', @_) if use_confcompat;
184
185   my( $name, $suffix ) = @_;
186   if ( $self->exists("${name}_$suffix") ) {
187     $self->config("${name}_$suffix");
188   } else {
189     $self->config($name);
190   }
191 }
192
193 =item key_orbase KEY SUFFIX
194
195 If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns
196 KEY.  Useful for determining which exact configuration option is returned by
197 config_orbase.
198
199 =cut
200
201 sub key_orbase {
202   my $self = shift;
203   #no compat for this...return $self->_usecompat('config_orbase', @_) if use_confcompat;
204
205   my( $name, $suffix ) = @_;
206   if ( $self->exists("${name}_$suffix") ) {
207     "${name}_$suffix";
208   } else {
209     $name;
210   }
211 }
212
213 =item invoice_templatenames
214
215 Returns all possible invoice template names.
216
217 =cut
218
219 sub invoice_templatenames {
220   my( $self ) = @_;
221
222   my %templatenames = ();
223   foreach my $item ( $self->config_items ) {
224     foreach my $base ( @base_items ) {
225       my( $main, $ext) = split(/\./, $base);
226       $ext = ".$ext" if $ext;
227       if ( $item->key =~ /^${main}_(.+)$ext$/ ) {
228       $templatenames{$1}++;
229       }
230     }
231   }
232   
233   sort keys %templatenames;
234
235 }
236
237 =item touch KEY [ AGENT ];
238
239 Creates the specified configuration key if it does not exist.
240
241 =cut
242
243 sub touch {
244   my $self = shift;
245   return $self->_usecompat('touch', @_) if use_confcompat;
246
247   my($name, $agentnum) = @_;
248   unless ( $self->exists($name, $agentnum) ) {
249     $self->set($name, '', $agentnum);
250   }
251 }
252
253 =item set KEY VALUE [ AGENTNUM ];
254
255 Sets the specified configuration key to the given value.
256
257 =cut
258
259 sub set {
260   my $self = shift;
261   return $self->_usecompat('set', @_) if use_confcompat;
262
263   my($name, $value, $agentnum) = @_;
264   $value =~ /^(.*)$/s;
265   $value = $1;
266
267   warn "[FS::Conf] SET $name\n" if $DEBUG;
268
269   my $old = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum});
270   my $new = new FS::conf { $old ? $old->hash 
271                                 : ('name' => $name, 'agentnum' => $agentnum)
272                          };
273   $new->value($value);
274
275   my $error;
276   if ($old) {
277     $error = $new->replace($old);
278   } else {
279     $error = $new->insert;
280   }
281
282   die "error setting configuration value: $error \n"
283     if $error;
284
285 }
286
287 =item set_binary KEY VALUE [ AGENTNUM ]
288
289 Sets the specified configuration key to an exact scalar value which
290 can be retrieved with config_binary.
291
292 =cut
293
294 sub set_binary {
295   my $self  = shift;
296   return if use_confcompat;
297
298   my($name, $value, $agentnum)=@_;
299   $self->set($name, encode_base64($value), $agentnum);
300 }
301
302 =item delete KEY [ AGENTNUM ];
303
304 Deletes the specified configuration key.
305
306 =cut
307
308 sub delete {
309   my $self = shift;
310   return $self->_usecompat('delete', @_) if use_confcompat;
311
312   my($name, $agentnum) = @_;
313   if ( my $cv = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum}) ) {
314     warn "[FS::Conf] DELETE $name\n";
315
316     my $oldAutoCommit = $FS::UID::AutoCommit;
317     local $FS::UID::AutoCommit = 0;
318     my $dbh = dbh;
319
320     my $error = $cv->delete;
321
322     if ( $error ) {
323       $dbh->rollback if $oldAutoCommit;
324       die "error setting configuration value: $error \n"
325     }
326
327     $dbh->commit or die $dbh->errstr if $oldAutoCommit;
328
329   }
330 }
331
332 =item import_config_item CONFITEM DIR 
333
334   Imports the item specified by the CONFITEM (see L<FS::ConfItem>) into
335 the database as a conf record (see L<FS::conf>).  Imports from the file
336 in the directory DIR.
337
338 =cut
339
340 sub import_config_item { 
341   my ($self,$item,$dir) = @_;
342   my $key = $item->key;
343   if ( -e "$dir/$key" && ! use_confcompat ) {
344     warn "Inserting $key\n" if $DEBUG;
345     local $/;
346     my $value = readline(new IO::File "$dir/$key");
347     if ($item->type =~ /^(binary|image)$/ ) {
348       $self->set_binary($key, $value);
349     }else{
350       $self->set($key, $value);
351     }
352   }else {
353     warn "Not inserting $key\n" if $DEBUG;
354   }
355 }
356
357 =item verify_config_item CONFITEM DIR 
358
359   Compares the item specified by the CONFITEM (see L<FS::ConfItem>) in
360 the database to the legacy file value in DIR.
361
362 =cut
363
364 sub verify_config_item { 
365   return '' if use_confcompat;
366   my ($self,$item,$dir) = @_;
367   my $key = $item->key;
368   my $type = $item->type;
369
370   my $compat = new FS::Conf_compat17 $dir;
371   my $error = '';
372   
373   $error .= "$key fails existential comparison; "
374     if $self->exists($key) xor $compat->exists($key);
375
376   if ( $type !~ /^(binary|image)$/ ) {
377
378     {
379       no warnings;
380       $error .= "$key fails scalar comparison; "
381         unless scalar($self->config($key)) eq scalar($compat->config($key));
382     }
383
384     my (@new) = $self->config($key);
385     my (@old) = $compat->config($key);
386     unless ( scalar(@new) == scalar(@old)) { 
387       $error .= "$key fails list comparison; ";
388     }else{
389       my $r=1;
390       foreach (@old) { $r=0 if ($_ cmp shift(@new)); }
391       $error .= "$key fails list comparison; "
392         unless $r;
393     }
394
395   } else {
396
397     $error .= "$key fails binary comparison; "
398       unless scalar($self->config_binary($key)) eq scalar($compat->config_binary($key));
399
400   }
401
402 #remove deprecated config on our own terms, not freeside-upgrade's
403 #  if ($error =~ /existential comparison/ && $item->section eq 'deprecated') {
404 #    my $proto;
405 #    for ( @config_items ) { $proto = $_; last if $proto->key eq $key;  }
406 #    unless ($proto->key eq $key) { 
407 #      warn "removed config item $error\n" if $DEBUG;
408 #      $error = '';
409 #    }
410 #  }
411
412   $error;
413 }
414
415 #item _orbase_items OPTIONS
416 #
417 #Returns all of the possible extensible config items as FS::ConfItem objects.
418 #See #L<FS::ConfItem>.  OPTIONS consists of name value pairs.  Possible
419 #options include
420 #
421 # dir - the directory to search for configuration option files instead
422 #       of using the conf records in the database
423 #
424 #cut
425
426 #quelle kludge
427 sub _orbase_items {
428   my ($self, %opt) = @_; 
429
430   my $listmaker = sub { my $v = shift;
431                         $v =~ s/_/!_/g;
432                         if ( $v =~ /\.(png|eps)$/ ) {
433                           $v =~ s/\./!_%./;
434                         }else{
435                           $v .= '!_%';
436                         }
437                         map { $_->name }
438                           FS::Record::qsearch( 'conf',
439                                                {},
440                                                '',
441                                                "WHERE name LIKE '$v' ESCAPE '!'"
442                                              );
443                       };
444
445   if (exists($opt{dir}) && $opt{dir}) {
446     $listmaker = sub { my $v = shift;
447                        if ( $v =~ /\.(png|eps)$/ ) {
448                          $v =~ s/\./_*./;
449                        }else{
450                          $v .= '_*';
451                        }
452                        map { basename $_ } glob($opt{dir}. "/$v" );
453                      };
454   }
455
456   ( map { 
457           my $proto;
458           my $base = $_;
459           for ( @config_items ) { $proto = $_; last if $proto->key eq $base;  }
460           die "don't know about $base items" unless $proto->key eq $base;
461
462           map { new FS::ConfItem { 
463                   'key'         => $_,
464                   'base_key'    => $proto->key,
465                   'section'     => $proto->section,
466                   'description' => 'Alternate ' . $proto->description . '  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">billing documentation</a> for details.',
467                   'type'        => $proto->type,
468                 };
469               } &$listmaker($base);
470         } @base_items,
471   );
472 }
473
474 =item config_items
475
476 Returns all of the possible global/default configuration items as
477 FS::ConfItem objects.  See L<FS::ConfItem>.
478
479 =cut
480
481 sub config_items {
482   my $self = shift; 
483   return $self->_usecompat('config_items', @_) if use_confcompat;
484
485   ( @config_items, $self->_orbase_items(@_) );
486 }
487
488 =back
489
490 =head1 SUBROUTINES
491
492 =over 4
493
494 =item init-config DIR
495
496 Imports the configuration items from DIR (1.7 compatible)
497 to conf records in the database.
498
499 =cut
500
501 sub init_config {
502   my $dir = shift;
503
504   {
505     local $FS::UID::use_confcompat = 0;
506     my $conf = new FS::Conf;
507     foreach my $item ( $conf->config_items(dir => $dir) ) {
508       $conf->import_config_item($item, $dir);
509       my $error = $conf->verify_config_item($item, $dir);
510       return $error if $error;
511     }
512   
513     my $compat = new FS::Conf_compat17 $dir;
514     foreach my $item ( $compat->config_items ) {
515       my $error = $conf->verify_config_item($item, $dir);
516       return $error if $error;
517     }
518   }
519
520   $FS::UID::use_confcompat = 0;
521   '';  #success
522 }
523
524 =back
525
526 =head1 BUGS
527
528 If this was more than just crud that will never be useful outside Freeside I'd
529 worry that config_items is freeside-specific and icky.
530
531 =head1 SEE ALSO
532
533 "Configuration" in the web interface (config/config.cgi).
534
535 =cut
536
537 #Business::CreditCard
538 @card_types = (
539   "VISA card",
540   "MasterCard",
541   "Discover card",
542   "American Express card",
543   "Diner's Club/Carte Blanche",
544   "enRoute",
545   "JCB",
546   "BankCard",
547   "Switch",
548   "Solo",
549 );
550
551 @base_items = qw (
552                    invoice_template
553                    invoice_latex
554                    invoice_latexreturnaddress
555                    invoice_latexfooter
556                    invoice_latexsmallfooter
557                    invoice_latexnotes
558                    invoice_latexcoupon
559                    invoice_html
560                    invoice_htmlreturnaddress
561                    invoice_htmlfooter
562                    invoice_htmlnotes
563                    logo.png
564                    logo.eps
565                  );
566
567 @config_items = map { new FS::ConfItem $_ } (
568
569   {
570     'key'         => 'address',
571     'section'     => 'deprecated',
572     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
573     'type'        => 'text',
574   },
575
576   {
577     'key'         => 'alert_expiration',
578     'section'     => 'billing',
579     'description' => 'Enable alerts about billing method expiration.',
580     'type'        => 'checkbox',
581     'per_agent'   => 1,
582   },
583
584   {
585     'key'         => 'alerter_template',
586     'section'     => 'billing',
587     'description' => 'Template file for billing method expiration alerts.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Credit_cards_and_Electronic_checks">billing documentation</a> for details.',
588     'type'        => 'textarea',
589     'per_agent'   => 1,
590   },
591
592   {
593     'key'         => 'apacheip',
594     #not actually deprecated yet
595     #'section'     => 'deprecated',
596     #'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',
597     'section'     => '',
598     'description' => 'IP address to assign to new virtual hosts',
599     'type'        => 'text',
600   },
601
602   {
603     'key'         => 'encryption',
604     'section'     => 'billing',
605     'description' => 'Enable encryption of credit cards.',
606     'type'        => 'checkbox',
607   },
608
609   {
610     'key'         => 'encryptionmodule',
611     'section'     => 'billing',
612     'description' => 'Use which module for encryption?',
613     'type'        => 'text',
614   },
615
616   {
617     'key'         => 'encryptionpublickey',
618     'section'     => 'billing',
619     'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
620     'type'        => 'textarea',
621   },
622
623   {
624     'key'         => 'encryptionprivatekey',
625     'section'     => 'billing',
626     '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.',
627     'type'        => 'textarea',
628   },
629
630   {
631     'key'         => 'billco-url',
632     'section'     => 'billing',
633     'description' => 'The url to use for performing uploads to the invoice mailing service.',
634     'type'        => 'text',
635     'per_agent'   => 1,
636   },
637
638   {
639     'key'         => 'billco-username',
640     'section'     => 'billing',
641     'description' => 'The login name to use for uploads to the invoice mailing service.',
642     'type'        => 'text',
643     'per_agent'   => 1,
644     'agentonly'   => 1,
645   },
646
647   {
648     'key'         => 'billco-password',
649     'section'     => 'billing',
650     'description' => 'The password to use for uploads to the invoice mailing service.',
651     'type'        => 'text',
652     'per_agent'   => 1,
653     'agentonly'   => 1,
654   },
655
656   {
657     'key'         => 'billco-clicode',
658     'section'     => 'billing',
659     'description' => 'The clicode to use for uploads to the invoice mailing service.',
660     'type'        => 'text',
661     'per_agent'   => 1,
662   },
663
664   {
665     'key'         => 'business-onlinepayment',
666     'section'     => 'billing',
667     '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.',
668     'type'        => 'textarea',
669   },
670
671   {
672     'key'         => 'business-onlinepayment-ach',
673     'section'     => 'billing',
674     '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.',
675     'type'        => 'textarea',
676   },
677
678   {
679     'key'         => 'business-onlinepayment-namespace',
680     'section'     => 'billing',
681     'description' => 'Specifies which perl module namespace (which group of collection routines) is used by default.',
682     'type'        => 'select',
683     'select_hash' => [
684                        'Business::OnlinePayment' => 'Direct API (Business::OnlinePayment)',
685                        'Business::OnlineThirdPartyPayment' => 'Web API (Business::ThirdPartyPayment)',
686                      ],
687   },
688
689   {
690     'key'         => 'business-onlinepayment-description',
691     'section'     => 'billing',
692     '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)',
693     'type'        => 'text',
694   },
695
696   {
697     'key'         => 'business-onlinepayment-email-override',
698     'section'     => 'billing',
699     'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
700     'type'        => 'text',
701   },
702
703   {
704     'key'         => 'business-onlinepayment-email_customer',
705     'section'     => 'billing',
706     'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
707     'type'        => 'checkbox',
708   },
709
710   {
711     'key'         => 'countrydefault',
712     'section'     => 'UI',
713     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
714     'type'        => 'text',
715   },
716
717   {
718     'key'         => 'date_format',
719     'section'     => 'UI',
720     'description' => 'Format for displaying dates',
721     'type'        => 'select',
722     'select_hash' => [
723                        '%m/%d/%Y' => 'MM/DD/YYYY',
724                        '%Y/%m/%d' => 'YYYY/MM/DD',
725                      ],
726   },
727
728   {
729     'key'         => 'deletecustomers',
730     'section'     => 'UI',
731     'description' => 'Enable customer deletions.  Be very careful!  Deleting a customer will remove all traces that the 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.',
732     'type'        => 'checkbox',
733   },
734
735   {
736     'key'         => 'deleteinvoices',
737     'section'     => 'UI',
738     'description' => 'Enable invoices deletions.  Be very careful!  Deleting an invoice will remove all traces that the invoice ever existed!  Normally, you would apply a credit against the invoice instead.',  #invoice voiding?
739     'type'        => 'checkbox',
740   },
741
742   {
743     'key'         => 'deletepayments',
744     'section'     => 'billing',
745     '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.',
746     'type'        => [qw( checkbox text )],
747   },
748
749   {
750     'key'         => 'deletecredits',
751     #not actually deprecated yet
752     #'section'     => 'deprecated',
753     #'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.',
754     'section'     => '',
755     'description' => 'One or more comma-separated email addresses to be notified when a credit is deleted.',
756     'type'        => [qw( checkbox text )],
757   },
758
759   {
760     'key'         => 'deleterefunds',
761     'section'     => 'billing',
762     'description' => 'Enable deletion of unclosed refunds.  Be very careful!  Only delete refunds that were data-entry errors, not adjustments.',
763     'type'        => 'checkbox',
764   },
765
766   {
767     'key'         => 'unapplypayments',
768     'section'     => 'deprecated',
769     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable "unapplication" of unclosed payments.',
770     'type'        => 'checkbox',
771   },
772
773   {
774     'key'         => 'unapplycredits',
775     'section'     => 'deprecated',
776     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to nable "unapplication" of unclosed credits.',
777     'type'        => 'checkbox',
778   },
779
780   {
781     'key'         => 'dirhash',
782     'section'     => 'shell',
783     '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>',
784     'type'        => 'text',
785   },
786
787   {
788     'key'         => 'disable_cust_attachment',
789     'section'     => '',
790     'description' => 'Disable customer file attachments',
791     'type'        => 'checkbox',
792   },
793
794   {
795     'key'         => 'max_attachment_size',
796     'section'     => '',
797     'description' => 'Maximum size for customer file attachments (leave blank for unlimited)',
798     'type'        => 'text',
799   },
800
801   {
802     'key'         => 'disable_customer_referrals',
803     'section'     => 'UI',
804     'description' => 'Disable new customer-to-customer referrals in the web interface',
805     'type'        => 'checkbox',
806   },
807
808   {
809     'key'         => 'editreferrals',
810     'section'     => 'UI',
811     'description' => 'Enable advertising source modification for existing customers',
812     'type'        => 'checkbox',
813   },
814
815   {
816     'key'         => 'emailinvoiceonly',
817     'section'     => 'billing',
818     'description' => 'Disables postal mail invoices',
819     'type'        => 'checkbox',
820   },
821
822   {
823     'key'         => 'disablepostalinvoicedefault',
824     'section'     => 'billing',
825     '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>.',
826     'type'        => 'checkbox',
827   },
828
829   {
830     'key'         => 'emailinvoiceauto',
831     'section'     => 'billing',
832     'description' => 'Automatically adds new accounts to the email invoice list',
833     'type'        => 'checkbox',
834   },
835
836   {
837     'key'         => 'emailinvoiceautoalways',
838     'section'     => 'billing',
839     'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
840     'type'        => 'checkbox',
841   },
842
843   {
844     'key'         => 'emailinvoice-apostrophe',
845     'section'     => 'billing',
846     'description' => 'Allows the apostrophe (single quote) character in the email addresses in the email invoice list.',
847     'type'        => 'checkbox',
848   },
849
850   {
851     'key'         => 'exclude_ip_addr',
852     'section'     => '',
853     'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
854     'type'        => 'textarea',
855   },
856   
857   {
858     'key'         => 'auto_router',
859     'section'     => '',
860     'description' => 'Automatically choose the correct router/block based on supplied ip address when possible while provisioning broadband services',
861     'type'        => 'checkbox',
862   },
863   
864   {
865     'key'         => 'hidecancelledpackages',
866     'section'     => 'UI',
867     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
868     'type'        => 'checkbox',
869   },
870
871   {
872     'key'         => 'hidecancelledcustomers',
873     'section'     => 'UI',
874     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
875     'type'        => 'checkbox',
876   },
877
878   {
879     'key'         => 'home',
880     'section'     => 'shell',
881     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
882     'type'        => 'text',
883   },
884
885   {
886     'key'         => 'invoice_from',
887     'section'     => 'required',
888     'description' => 'Return address on email invoices',
889     'type'        => 'text',
890     'per_agent'   => 1,
891   },
892
893   {
894     'key'         => 'invoice_subject',
895     'section'     => 'billing',
896     'description' => 'Subject: header on email invoices.  Defaults to "Invoice".  The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
897     'type'        => 'text',
898     'per_agent'   => 1,
899   },
900
901   {
902     'key'         => 'invoice_usesummary',
903     'section'     => 'billing',
904     'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
905     'type'        => 'checkbox',
906   },
907
908   {
909     'key'         => 'invoice_template',
910     'section'     => 'billing',
911     'description' => 'Text template file for invoices.  Used if no invoice_html template is defined, and also seen by users using non-HTML capable mail clients.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
912     'type'        => 'textarea',
913   },
914
915   {
916     'key'         => 'invoice_html',
917     'section'     => 'billing',
918     'description' => 'Optional HTML template for invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
919
920     'type'        => 'textarea',
921   },
922
923   {
924     'key'         => 'invoice_htmlnotes',
925     'section'     => 'billing',
926     'description' => 'Notes section for HTML invoices.  Defaults to the same data in invoice_latexnotes if not specified.',
927     'type'        => 'textarea',
928     'per_agent'   => 1,
929   },
930
931   {
932     'key'         => 'invoice_htmlfooter',
933     'section'     => 'billing',
934     'description' => 'Footer for HTML invoices.  Defaults to the same data in invoice_latexfooter if not specified.',
935     'type'        => 'textarea',
936     'per_agent'   => 1,
937   },
938
939   {
940     'key'         => 'invoice_htmlsummary',
941     'section'     => 'billing',
942     'description' => 'Summary initial page for HTML invoices.',
943     'type'        => 'textarea',
944     'per_agent'   => 1,
945   },
946
947   {
948     'key'         => 'invoice_htmlreturnaddress',
949     'section'     => 'billing',
950     'description' => 'Return address for HTML invoices.  Defaults to the same data in invoice_latexreturnaddress if not specified.',
951     'type'        => 'textarea',
952   },
953
954   {
955     'key'         => 'invoice_latex',
956     'section'     => 'billing',
957     'description' => 'Optional LaTeX template for typeset PostScript invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
958     'type'        => 'textarea',
959   },
960
961   {
962     'key'         => 'invoice_latexnotes',
963     'section'     => 'billing',
964     'description' => 'Notes section for LaTeX typeset PostScript invoices.',
965     'type'        => 'textarea',
966     'per_agent'   => 1,
967   },
968
969   {
970     'key'         => 'invoice_latexfooter',
971     'section'     => 'billing',
972     'description' => 'Footer for LaTeX typeset PostScript invoices.',
973     'type'        => 'textarea',
974     'per_agent'   => 1,
975   },
976
977   {
978     'key'         => 'invoice_latexsummary',
979     'section'     => 'billing',
980     'description' => 'Summary initial page for LaTeX typeset PostScript invoices.',
981     'type'        => 'textarea',
982     'per_agent'   => 1,
983   },
984
985   {
986     'key'         => 'invoice_latexcoupon',
987     'section'     => 'billing',
988     'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
989     'type'        => 'textarea',
990     'per_agent'   => 1,
991   },
992
993   {
994     'key'         => 'invoice_latexreturnaddress',
995     'section'     => 'billing',
996     'description' => 'Return address for LaTeX typeset PostScript invoices.',
997     'type'        => 'textarea',
998   },
999
1000   {
1001     'key'         => 'invoice_latexsmallfooter',
1002     'section'     => 'billing',
1003     'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
1004     'type'        => 'textarea',
1005     'per_agent'   => 1,
1006   },
1007
1008   {
1009     'key'         => 'invoice_email_pdf',
1010     'section'     => 'billing',
1011     '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.',
1012     'type'        => 'checkbox'
1013   },
1014
1015   {
1016     'key'         => 'invoice_email_pdf_note',
1017     'section'     => 'billing',
1018     'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
1019     'type'        => 'textarea'
1020   },
1021
1022
1023   { 
1024     'key'         => 'invoice_default_terms',
1025     'section'     => 'billing',
1026     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
1027     'type'        => 'select',
1028     'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 30', 'Net 45', 'Net 60' ],
1029   },
1030
1031   { 
1032     'key'         => 'invoice_show_prior_due_date',
1033     'section'     => 'billing',
1034     'description' => 'Show previous invoice due dates when showing prior balances.  Default is to show invoice date.',
1035     'type'        => 'checkbox',
1036   },
1037
1038   { 
1039     'key'         => 'invoice_include_aging',
1040     'section'     => 'billing',
1041     'description' => 'Show an aging line after the prior balance section.  Only valud when invoice_sections is enabled.',
1042     'type'        => 'checkbox',
1043   },
1044
1045   { 
1046     'key'         => 'invoice_sections',
1047     'section'     => 'billing',
1048     'description' => 'Split invoice into sections and label according to package category when enabled.',
1049     'type'        => 'checkbox',
1050   },
1051
1052   { 
1053     'key'         => 'usage_class_as_a_section',
1054     'section'     => 'billing',
1055     'description' => 'Split usage into sections and label according to usage class name when enabled.  Only valid when invoice_sections is enabled.',
1056     'type'        => 'checkbox',
1057   },
1058
1059   { 
1060     'key'         => 'svc_phone_sections',
1061     'section'     => 'billing',
1062     'description' => 'Create a section for each svc_phone when enabled.  Only valid when invoice_sections is enabled.',
1063     'type'        => 'checkbox',
1064   },
1065
1066   {
1067     'key'         => 'finance_pkgclass',
1068     'section'     => 'billing',
1069     'description' => 'The default package class for late fee charges, used if the fee event does not specify a package class itself.',
1070     'type'        => 'select-pkg_class',
1071   },
1072
1073   { 
1074     'key'         => 'separate_usage',
1075     'section'     => 'billing',
1076     'description' => 'Split the rated call usage into a separate line from the recurring charges.',
1077     'type'        => 'checkbox',
1078   },
1079
1080   {
1081     'key'         => 'invoice_send_receipts',
1082     'section'     => 'deprecated',
1083     'description' => '<b>DEPRECATED</b>, this used to send an invoice copy on payments and credits.  See the payment_receipt_email and XXXX instead.',
1084     'type'        => 'checkbox',
1085   },
1086
1087   {
1088     'key'         => 'payment_receipt_email',
1089     'section'     => 'billing',
1090     '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<li><code>$pkg</code> - Package (requires payment_receipt-trigger set to "when payment is applied".)</ul>',
1091     'type'        => [qw( checkbox textarea )],
1092   },
1093
1094   {
1095     'key'         => 'payment_receipt-trigger',
1096     'section'     => 'billing',
1097     'description' => 'When payment receipts are triggered.  Defaults to when payment is made.',
1098     'type'        => 'select',
1099     'select_hash' => [
1100                        'cust_pay'          => 'When payment is made.',
1101                        'cust_bill_pay_pkg' => 'When payment is applied.',
1102                      ],
1103   },
1104
1105   {
1106     'key'         => 'lpr',
1107     'section'     => 'required',
1108     'description' => 'Print command for paper invoices, for example `lpr -h\'',
1109     'type'        => 'text',
1110   },
1111
1112   {
1113     'key'         => 'lpr-postscript_prefix',
1114     'section'     => 'billing',
1115     'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1116     'type'        => 'text',
1117   },
1118
1119   {
1120     'key'         => 'lpr-postscript_suffix',
1121     'section'     => 'billing',
1122     'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1123     'type'        => 'text',
1124   },
1125
1126   {
1127     'key'         => 'money_char',
1128     'section'     => '',
1129     'description' => 'Currency symbol - defaults to `$\'',
1130     'type'        => 'text',
1131   },
1132
1133   {
1134     'key'         => 'defaultrecords',
1135     'section'     => 'BIND',
1136     'description' => 'DNS entries to add automatically when creating a domain',
1137     'type'        => 'editlist',
1138     'editlist_parts' => [ { type=>'text' },
1139                           { type=>'immutable', value=>'IN' },
1140                           { type=>'select',
1141                             select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS TXT)} },
1142                           { type=> 'text' }, ],
1143   },
1144
1145   {
1146     'key'         => 'passwordmin',
1147     'section'     => 'password',
1148     'description' => 'Minimum password length (default 6)',
1149     'type'        => 'text',
1150   },
1151
1152   {
1153     'key'         => 'passwordmax',
1154     'section'     => 'password',
1155     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
1156     'type'        => 'text',
1157   },
1158
1159   {
1160     'key'         => 'password-noampersand',
1161     'section'     => 'password',
1162     'description' => 'Disallow ampersands in passwords',
1163     'type'        => 'checkbox',
1164   },
1165
1166   {
1167     'key'         => 'password-noexclamation',
1168     'section'     => 'password',
1169     'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
1170     'type'        => 'checkbox',
1171   },
1172
1173   {
1174     'key'         => 'referraldefault',
1175     'section'     => 'UI',
1176     'description' => 'Default referral, specified by refnum',
1177     'type'        => 'text',
1178   },
1179
1180 #  {
1181 #    'key'         => 'registries',
1182 #    'section'     => 'required',
1183 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
1184 #  },
1185
1186   {
1187     'key'         => 'report_template',
1188     'section'     => 'deprecated',
1189     'description' => 'Deprecated template file for reports.',
1190     'type'        => 'textarea',
1191   },
1192
1193   {
1194     'key'         => 'maxsearchrecordsperpage',
1195     'section'     => 'UI',
1196     'description' => 'If set, number of search records to return per page.',
1197     'type'        => 'text',
1198   },
1199
1200   {
1201     'key'         => 'session-start',
1202     'section'     => 'session',
1203     '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.',
1204     'type'        => 'text',
1205   },
1206
1207   {
1208     'key'         => 'session-stop',
1209     'section'     => 'session',
1210     '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.',
1211     'type'        => 'text',
1212   },
1213
1214   {
1215     'key'         => 'shells',
1216     'section'     => 'shell',
1217     '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.',
1218     'type'        => 'textarea',
1219   },
1220
1221   {
1222     'key'         => 'showpasswords',
1223     'section'     => 'UI',
1224     'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
1225     'type'        => 'checkbox',
1226   },
1227
1228   {
1229     'key'         => 'signupurl',
1230     'section'     => 'UI',
1231     'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your <a href="http://www.freeside.biz/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',
1232     'type'        => 'text',
1233   },
1234
1235   {
1236     'key'         => 'smtpmachine',
1237     'section'     => 'required',
1238     'description' => 'SMTP relay for Freeside\'s outgoing mail',
1239     'type'        => 'text',
1240   },
1241
1242   {
1243     'key'         => 'soadefaultttl',
1244     'section'     => 'BIND',
1245     'description' => 'SOA default TTL for new domains.',
1246     'type'        => 'text',
1247   },
1248
1249   {
1250     'key'         => 'soaemail',
1251     'section'     => 'BIND',
1252     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1253     'type'        => 'text',
1254   },
1255
1256   {
1257     'key'         => 'soaexpire',
1258     'section'     => 'BIND',
1259     'description' => 'SOA expire for new domains',
1260     'type'        => 'text',
1261   },
1262
1263   {
1264     'key'         => 'soamachine',
1265     'section'     => 'BIND',
1266     'description' => 'SOA machine for new domains, with trailing `.\'',
1267     'type'        => 'text',
1268   },
1269
1270   {
1271     'key'         => 'soarefresh',
1272     'section'     => 'BIND',
1273     'description' => 'SOA refresh for new domains',
1274     'type'        => 'text',
1275   },
1276
1277   {
1278     'key'         => 'soaretry',
1279     'section'     => 'BIND',
1280     'description' => 'SOA retry for new domains',
1281     'type'        => 'text',
1282   },
1283
1284   {
1285     'key'         => 'statedefault',
1286     'section'     => 'UI',
1287     'description' => 'Default state or province (if not supplied, the default is `CA\')',
1288     'type'        => 'text',
1289   },
1290
1291   {
1292     'key'         => 'unsuspendauto',
1293     'section'     => 'billing',
1294     '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',
1295     'type'        => 'checkbox',
1296   },
1297
1298   {
1299     'key'         => 'unsuspend-always_adjust_next_bill_date',
1300     'section'     => 'billing',
1301     '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.',
1302     'type'        => 'checkbox',
1303   },
1304
1305   {
1306     'key'         => 'usernamemin',
1307     'section'     => 'username',
1308     'description' => 'Minimum username length (default 2)',
1309     'type'        => 'text',
1310   },
1311
1312   {
1313     'key'         => 'usernamemax',
1314     'section'     => 'username',
1315     'description' => 'Maximum username length',
1316     'type'        => 'text',
1317   },
1318
1319   {
1320     'key'         => 'username-ampersand',
1321     'section'     => 'username',
1322     '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.',
1323     'type'        => 'checkbox',
1324   },
1325
1326   {
1327     'key'         => 'username-letter',
1328     'section'     => 'username',
1329     'description' => 'Usernames must contain at least one letter',
1330     'type'        => 'checkbox',
1331     'per_agent'   => 1,
1332   },
1333
1334   {
1335     'key'         => 'username-letterfirst',
1336     'section'     => 'username',
1337     'description' => 'Usernames must start with a letter',
1338     'type'        => 'checkbox',
1339   },
1340
1341   {
1342     'key'         => 'username-noperiod',
1343     'section'     => 'username',
1344     'description' => 'Disallow periods in usernames',
1345     'type'        => 'checkbox',
1346   },
1347
1348   {
1349     'key'         => 'username-nounderscore',
1350     'section'     => 'username',
1351     'description' => 'Disallow underscores in usernames',
1352     'type'        => 'checkbox',
1353   },
1354
1355   {
1356     'key'         => 'username-nodash',
1357     'section'     => 'username',
1358     'description' => 'Disallow dashes in usernames',
1359     'type'        => 'checkbox',
1360   },
1361
1362   {
1363     'key'         => 'username-uppercase',
1364     'section'     => 'username',
1365     'description' => 'Allow uppercase characters in usernames.  Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
1366     'type'        => 'checkbox',
1367   },
1368
1369   { 
1370     'key'         => 'username-percent',
1371     'section'     => 'username',
1372     'description' => 'Allow the percent character (%) in usernames.',
1373     'type'        => 'checkbox',
1374   },
1375
1376   { 
1377     'key'         => 'username-colon',
1378     'section'     => 'username',
1379     'description' => 'Allow the colon character (:) in usernames.',
1380     'type'        => 'checkbox',
1381   },
1382
1383   {
1384     'key'         => 'safe-part_bill_event',
1385     'section'     => 'UI',
1386     'description' => 'Validates invoice event expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1387     'type'        => 'checkbox',
1388   },
1389
1390   {
1391     'key'         => 'show_ss',
1392     'section'     => 'UI',
1393     'description' => 'Turns on display/collection of social security numbers in the web interface.  Sometimes required by electronic check (ACH) processors.',
1394     'type'        => 'checkbox',
1395   },
1396
1397   {
1398     'key'         => 'show_stateid',
1399     'section'     => 'UI',
1400     'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface.  Sometimes required by electronic check (ACH) processors.",
1401     'type'        => 'checkbox',
1402   },
1403
1404   {
1405     'key'         => 'show_bankstate',
1406     'section'     => 'UI',
1407     'description' => "Turns on display/collection of state for bank accounts in the web interface.  Sometimes required by electronic check (ACH) processors.",
1408     'type'        => 'checkbox',
1409   },
1410
1411   { 
1412     'key'         => 'agent_defaultpkg',
1413     'section'     => 'UI',
1414     'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
1415     'type'        => 'checkbox',
1416   },
1417
1418   {
1419     'key'         => 'legacy_link',
1420     'section'     => 'UI',
1421     'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
1422     'type'        => 'checkbox',
1423   },
1424
1425   {
1426     'key'         => 'legacy_link-steal',
1427     'section'     => 'UI',
1428     'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
1429     'type'        => 'checkbox',
1430   },
1431
1432   {
1433     'key'         => 'queue_dangerous_controls',
1434     'section'     => 'UI',
1435     '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.',
1436     'type'        => 'checkbox',
1437   },
1438
1439   {
1440     'key'         => 'security_phrase',
1441     'section'     => 'password',
1442     'description' => 'Enable the tracking of a "security phrase" with each account.  Not recommended, as it is vulnerable to social engineering.',
1443     'type'        => 'checkbox',
1444   },
1445
1446   {
1447     'key'         => 'locale',
1448     'section'     => 'UI',
1449     'description' => 'Message locale',
1450     'type'        => 'select',
1451     'select_enum' => [ qw(en_US) ],
1452   },
1453
1454   {
1455     'key'         => 'signup_server-payby',
1456     'section'     => '',
1457     'description' => 'Acceptable payment types for the signup server',
1458     'type'        => 'selectmultiple',
1459     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
1460   },
1461
1462   {
1463     'key'         => 'signup_server-default_agentnum',
1464     'section'     => '',
1465     'description' => 'Default agent for the signup server',
1466     'type'        => 'select-sub',
1467     'options_sub' => sub { require FS::Record;
1468                            require FS::agent;
1469                            map { $_->agentnum => $_->agent }
1470                                FS::Record::qsearch('agent', { disabled=>'' } );
1471                          },
1472     'option_sub'  => sub { require FS::Record;
1473                            require FS::agent;
1474                            my $agent = FS::Record::qsearchs(
1475                              'agent', { 'agentnum'=>shift }
1476                            );
1477                            $agent ? $agent->agent : '';
1478                          },
1479   },
1480
1481   {
1482     'key'         => 'signup_server-default_refnum',
1483     'section'     => '',
1484     'description' => 'Default advertising source for the signup server',
1485     'type'        => 'select-sub',
1486     'options_sub' => sub { require FS::Record;
1487                            require FS::part_referral;
1488                            map { $_->refnum => $_->referral }
1489                                FS::Record::qsearch( 'part_referral', 
1490                                                     { 'disabled' => '' }
1491                                                   );
1492                          },
1493     'option_sub'  => sub { require FS::Record;
1494                            require FS::part_referral;
1495                            my $part_referral = FS::Record::qsearchs(
1496                              'part_referral', { 'refnum'=>shift } );
1497                            $part_referral ? $part_referral->referral : '';
1498                          },
1499   },
1500
1501   {
1502     'key'         => 'signup_server-default_pkgpart',
1503     'section'     => '',
1504     'description' => 'Default package for the signup server',
1505     'type'        => 'select-part_pkg',
1506   },
1507
1508   {
1509     'key'         => 'signup_server-default_svcpart',
1510     'section'     => '',
1511     'description' => 'Default service definition for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
1512     'type'        => 'select-part_svc',
1513   },
1514
1515   {
1516     'key'         => 'signup_server-mac_addr_svcparts',
1517     'section'     => '',
1518     'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).',
1519     'type'        => 'select-part_svc',
1520     'multiple'    => 1,
1521   },
1522
1523   {
1524     'key'         => 'signup_server-nomadix',
1525     'section'     => '',
1526     'description' => 'Signup page Nomadix integration',
1527     'type'        => 'checkbox',
1528   },
1529
1530   {
1531     'key'         => 'signup_server-service',
1532     'section'     => '',
1533     'description' => 'Service for the signup server - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup',
1534     'type'        => 'select',
1535     'select_hash' => [
1536                        'svc_acct'  => 'Account (svc_acct)',
1537                        'svc_phone' => 'Phone number (svc_phone)',
1538                      ],
1539   },
1540
1541   {
1542     'key'         => 'selfservice_server-base_url',
1543     'section'     => '',
1544     'description' => 'Base URL for the self-service web interface - necessary for some widgets to find their way, including retrieval of non-US state information and phone number provisioning.',
1545     'type'        => 'text',
1546   },
1547
1548   {
1549     'key'         => 'show-msgcat-codes',
1550     'section'     => 'UI',
1551     'description' => 'Show msgcat codes in error messages.  Turn this option on before reporting errors to the mailing list.',
1552     'type'        => 'checkbox',
1553   },
1554
1555   {
1556     'key'         => 'signup_server-realtime',
1557     'section'     => '',
1558     'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
1559     'type'        => 'checkbox',
1560   },
1561   {
1562     'key'         => 'signup_server-classnum2',
1563     'section'     => '',
1564     'description' => 'Package Class for first optional purchase',
1565     'type'        => 'select-pkg_class',
1566   },
1567
1568   {
1569     'key'         => 'signup_server-classnum3',
1570     'section'     => '',
1571     'description' => 'Package Class for second optional purchase',
1572     'type'        => 'select-pkg_class',
1573   },
1574
1575   {
1576     'key'         => 'backend-realtime',
1577     'section'     => '',
1578     'description' => 'Run billing for backend signups immediately.',
1579     'type'        => 'checkbox',
1580   },
1581
1582   {
1583     'key'         => 'declinetemplate',
1584     'section'     => 'billing',
1585     'description' => 'Template file for credit card decline emails.',
1586     'type'        => 'textarea',
1587   },
1588
1589   {
1590     'key'         => 'emaildecline',
1591     'section'     => 'billing',
1592     'description' => 'Enable emailing of credit card decline notices.',
1593     'type'        => 'checkbox',
1594   },
1595
1596   {
1597     'key'         => 'emaildecline-exclude',
1598     'section'     => 'billing',
1599     'description' => 'List of error messages that should not trigger email decline notices, one per line.',
1600     'type'        => 'textarea',
1601   },
1602
1603   {
1604     'key'         => 'cancelmessage',
1605     'section'     => 'billing',
1606     'description' => 'Template file for cancellation emails.',
1607     'type'        => 'textarea',
1608   },
1609
1610   {
1611     'key'         => 'cancelsubject',
1612     'section'     => 'billing',
1613     'description' => 'Subject line for cancellation emails.',
1614     'type'        => 'text',
1615   },
1616
1617   {
1618     'key'         => 'emailcancel',
1619     'section'     => 'billing',
1620     'description' => 'Enable emailing of cancellation notices.  Make sure to fill in the cancelmessage and cancelsubject configuration values as well.',
1621     'type'        => 'checkbox',
1622   },
1623
1624   {
1625     'key'         => 'bill_usage_on_cancel',
1626     'section'     => 'billing',
1627     'description' => 'Enable automatic generation of an invoice for usage when a package is cancelled.  Not all packages can do this.  Usage data must already be available.',
1628     'type'        => 'checkbox',
1629   },
1630
1631   {
1632     'key'         => 'require_cardname',
1633     'section'     => 'billing',
1634     'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
1635     'type'        => 'checkbox',
1636   },
1637
1638   {
1639     'key'         => 'enable_taxclasses',
1640     'section'     => 'billing',
1641     'description' => 'Enable per-package tax classes',
1642     'type'        => 'checkbox',
1643   },
1644
1645   {
1646     'key'         => 'require_taxclasses',
1647     'section'     => 'billing',
1648     'description' => 'Require a taxclass to be entered for every package',
1649     'type'        => 'checkbox',
1650   },
1651
1652   {
1653     'key'         => 'enable_taxproducts',
1654     'section'     => 'billing',
1655     'description' => 'Enable per-package mapping to vendor tax data from CCH or elsewhere.',
1656     'type'        => 'checkbox',
1657   },
1658
1659   {
1660     'key'         => 'taxdatadirectdownload',
1661     'section'     => 'billing',  #well
1662     'description' => 'Enable downloading tax data directly from the vendor site',
1663     'type'        => 'checkbox',
1664   },
1665
1666   {
1667     'key'         => 'ignore_incalculable_taxes',
1668     'section'     => 'billing',
1669     'description' => 'Prefer to invoice without tax over not billing at all',
1670     'type'        => 'checkbox',
1671   },
1672
1673   {
1674     'key'         => 'welcome_email',
1675     'section'     => '',
1676     '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>',
1677     'type'        => 'textarea',
1678     'per_agent'   => 1,
1679   },
1680
1681   {
1682     'key'         => 'welcome_email-from',
1683     'section'     => '',
1684     'description' => 'From: address header for welcome email',
1685     'type'        => 'text',
1686     'per_agent'   => 1,
1687   },
1688
1689   {
1690     'key'         => 'welcome_email-subject',
1691     'section'     => '',
1692     'description' => 'Subject: header for welcome email',
1693     'type'        => 'text',
1694     'per_agent'   => 1,
1695   },
1696   
1697   {
1698     'key'         => 'welcome_email-mimetype',
1699     'section'     => '',
1700     'description' => 'MIME type for welcome email',
1701     'type'        => 'select',
1702     'select_enum' => [ 'text/plain', 'text/html' ],
1703     'per_agent'   => 1,
1704   },
1705
1706   {
1707     'key'         => 'welcome_letter',
1708     'section'     => '',
1709     '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>',
1710     'type'        => 'textarea',
1711   },
1712
1713   {
1714     'key'         => 'warning_email',
1715     'section'     => '',
1716     '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>',
1717     'type'        => 'textarea',
1718   },
1719
1720   {
1721     'key'         => 'warning_email-from',
1722     'section'     => '',
1723     'description' => 'From: address header for warning email',
1724     'type'        => 'text',
1725   },
1726
1727   {
1728     'key'         => 'warning_email-cc',
1729     'section'     => '',
1730     'description' => 'Additional recipient(s) (comma separated) for warning email when remaining usage reaches zero.',
1731     'type'        => 'text',
1732   },
1733
1734   {
1735     'key'         => 'warning_email-subject',
1736     'section'     => '',
1737     'description' => 'Subject: header for warning email',
1738     'type'        => 'text',
1739   },
1740   
1741   {
1742     'key'         => 'warning_email-mimetype',
1743     'section'     => '',
1744     'description' => 'MIME type for warning email',
1745     'type'        => 'select',
1746     'select_enum' => [ 'text/plain', 'text/html' ],
1747   },
1748
1749   {
1750     'key'         => 'payby',
1751     'section'     => 'billing',
1752     'description' => 'Available payment types.',
1753     'type'        => 'selectmultiple',
1754     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP) ],
1755   },
1756
1757   {
1758     'key'         => 'payby-default',
1759     'section'     => 'UI',
1760     'description' => 'Default payment type.  HIDE disables display of billing information and sets customers to BILL.',
1761     'type'        => 'select',
1762     'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
1763   },
1764
1765   {
1766     'key'         => 'paymentforcedtobatch',
1767     'section'     => 'deprecated',
1768     '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.',
1769     'type'        => 'checkbox',
1770   },
1771
1772   {
1773     'key'         => 'svc_acct-notes',
1774     'section'     => 'UI',
1775     'description' => 'Extra HTML to be displayed on the Account View screen.',
1776     'type'        => 'textarea',
1777   },
1778
1779   {
1780     'key'         => 'radius-password',
1781     'section'     => '',
1782     'description' => 'RADIUS attribute for plain-text passwords.',
1783     'type'        => 'select',
1784     'select_enum' => [ 'Password', 'User-Password' ],
1785   },
1786
1787   {
1788     'key'         => 'radius-ip',
1789     'section'     => '',
1790     'description' => 'RADIUS attribute for IP addresses.',
1791     'type'        => 'select',
1792     'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
1793   },
1794
1795   #http://dev.coova.org/svn/coova-chilli/doc/dictionary.chillispot
1796   {
1797     'key'         => 'radius-chillispot-max',
1798     'section'     => '',
1799     'description' => 'Enable ChilliSpot (and CoovaChilli) Max attributes, specifically ChilliSpot-Max-{Input,Output,Total}-{Octets,Gigawords}.',
1800     'type'        => 'checkbox',
1801   },
1802
1803   {
1804     'key'         => 'svc_acct-alldomains',
1805     'section'     => '',
1806     '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.',
1807     'type'        => 'checkbox',
1808   },
1809
1810   {
1811     'key'         => 'dump-scpdest',
1812     'section'     => '',
1813     'description' => 'destination for scp database dumps: user@host:/path',
1814     'type'        => 'text',
1815   },
1816
1817   {
1818     'key'         => 'dump-pgpid',
1819     'section'     => '',
1820     '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.",
1821     'type'        => 'text',
1822   },
1823
1824   {
1825     'key'         => 'users-allow_comp',
1826     'section'     => 'deprecated',
1827     '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.',
1828     'type'        => 'textarea',
1829   },
1830
1831   {
1832     'key'         => 'credit_card-recurring_billing_flag',
1833     'section'     => 'billing',
1834     '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. ',
1835     'type'        => 'select',
1836     'select_hash' => [
1837                        'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
1838                        'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, irregardless of previous charges on the card.',
1839                      ],
1840   },
1841
1842   {
1843     'key'         => 'credit_card-recurring_billing_acct_code',
1844     'section'     => 'billing',
1845     'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill".  Useful for reporting purposes with supported gateways (PlugNPay, others?)',
1846     'type'        => 'checkbox',
1847   },
1848
1849   {
1850     'key'         => 'cvv-save',
1851     'section'     => 'billing',
1852     '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.',
1853     'type'        => 'selectmultiple',
1854     'select_enum' => \@card_types,
1855   },
1856
1857   {
1858     'key'         => 'manual_process-pkgpart',
1859     'section'     => 'billing',
1860     'description' => 'Package to add to each manual credit card and ACH payments entered from the backend.  Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option.',
1861     'type'        => 'select-part_pkg',
1862   },
1863
1864   {
1865     'key'         => 'manual_process-display',
1866     'section'     => 'billing',
1867     'description' => 'When using manual_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
1868     'type'        => 'select',
1869     'select_hash' => [
1870                        'add'      => 'Add fee to amount entered',
1871                        'subtract' => 'Subtract fee from amount entered',
1872                      ],
1873   },
1874
1875   {
1876     'key'         => 'manual_process-skip_first',
1877     'section'     => 'billing',
1878     'description' => "When using manual_process-pkgpart, omit the fee if it is the customer's first payment.",
1879     'type'        => 'checkbox',
1880   },
1881
1882   {
1883     'key'         => 'allow_negative_charges',
1884     'section'     => 'billing',
1885     'description' => 'Allow negative charges.  Normally not used unless importing data from a legacy system that requires this.',
1886     'type'        => 'checkbox',
1887   },
1888   {
1889       'key'         => 'auto_unset_catchall',
1890       'section'     => '',
1891       '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.',
1892       'type'        => 'checkbox',
1893   },
1894
1895   {
1896     'key'         => 'system_usernames',
1897     'section'     => 'username',
1898     '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.',
1899     'type'        => 'textarea',
1900   },
1901
1902   {
1903     'key'         => 'cust_pkg-change_svcpart',
1904     'section'     => '',
1905     'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
1906     'type'        => 'checkbox',
1907   },
1908
1909   {
1910     'key'         => 'cust_pkg-change_pkgpart-bill_now',
1911     'section'     => '',
1912     'description' => "When changing packages, bill the new package immediately.  Useful for prepaid situations with RADIUS where an Expiration attribute base don the package must be present at all times.",
1913     'type'        => 'checkbox',
1914   },
1915
1916   {
1917     'key'         => 'disable_autoreverse',
1918     'section'     => 'BIND',
1919     'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
1920     'type'        => 'checkbox',
1921   },
1922
1923   {
1924     'key'         => 'svc_www-enable_subdomains',
1925     'section'     => '',
1926     'description' => 'Enable selection of specific subdomains for virtual host creation.',
1927     'type'        => 'checkbox',
1928   },
1929
1930   {
1931     'key'         => 'svc_www-usersvc_svcpart',
1932     'section'     => '',
1933     'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
1934     'type'        => 'select-part_svc',
1935     'multiple'    => 1,
1936   },
1937
1938   {
1939     'key'         => 'selfservice_server-primary_only',
1940     'section'     => '',
1941     'description' => 'Only allow primary accounts to access self-service functionality.',
1942     'type'        => 'checkbox',
1943   },
1944
1945   {
1946     'key'         => 'selfservice_server-phone_login',
1947     'section'     => '',
1948     'description' => 'Allow login to self-service with phone number and PIN.',
1949     'type'        => 'checkbox',
1950   },
1951
1952   {
1953     'key'         => 'selfservice_server-single_domain',
1954     'section'     => '',
1955     'description' => 'If specified, only use this one domain for self-service access.',
1956     'type'        => 'text',
1957   },
1958
1959   {
1960     'key'         => 'card_refund-days',
1961     'section'     => 'billing',
1962     'description' => 'After a payment, the number of days a refund link will be available for that payment.  Defaults to 120.',
1963     'type'        => 'text',
1964   },
1965
1966   {
1967     'key'         => 'agent-showpasswords',
1968     'section'     => '',
1969     'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
1970     'type'        => 'checkbox',
1971   },
1972
1973   {
1974     'key'         => 'global_unique-username',
1975     'section'     => 'username',
1976     '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.',
1977     'type'        => 'select',
1978     'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
1979   },
1980
1981   {
1982     'key'         => 'global_unique-phonenum',
1983     'section'     => '',
1984     'description' => 'Global phone number uniqueness control: none (usual setting - check countrycode+phonenumun uniqueness per exports), or countrycode+phonenum (all countrycode+phonenum 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.',
1985     'type'        => 'select',
1986     'select_enum' => [ 'none', 'countrycode+phonenum', 'disabled' ],
1987   },
1988
1989   {
1990     'key'         => 'svc_external-skip_manual',
1991     'section'     => 'UI',
1992     '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).',
1993     'type'        => 'checkbox',
1994   },
1995
1996   {
1997     'key'         => 'svc_external-display_type',
1998     'section'     => 'UI',
1999     'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
2000     'type'        => 'select',
2001     'select_enum' => [ 'generic', 'artera_turbo', ],
2002   },
2003
2004   {
2005     'key'         => 'ticket_system',
2006     'section'     => '',
2007     'description' => 'Ticketing system integration.  <b>RT_Internal</b> uses the built-in RT ticketing system (see the <a href="http://www.freeside.biz/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).',
2008     'type'        => 'select',
2009     #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
2010     'select_enum' => [ '', qw(RT_Internal RT_External) ],
2011   },
2012
2013   {
2014     'key'         => 'ticket_system-default_queueid',
2015     'section'     => '',
2016     'description' => 'Default queue used when creating new customer tickets.',
2017     'type'        => 'select-sub',
2018     'options_sub' => sub {
2019                            my $conf = new FS::Conf;
2020                            if ( $conf->config('ticket_system') ) {
2021                              eval "use FS::TicketSystem;";
2022                              die $@ if $@;
2023                              FS::TicketSystem->queues();
2024                            } else {
2025                              ();
2026                            }
2027                          },
2028     'option_sub'  => sub { 
2029                            my $conf = new FS::Conf;
2030                            if ( $conf->config('ticket_system') ) {
2031                              eval "use FS::TicketSystem;";
2032                              die $@ if $@;
2033                              FS::TicketSystem->queue(shift);
2034                            } else {
2035                              '';
2036                            }
2037                          },
2038   },
2039
2040   {
2041     'key'         => 'ticket_system-priority_reverse',
2042     'section'     => '',
2043     'description' => 'Enable this to consider lower numbered priorities more important.  A bad habit we picked up somewhere.  You probably want to avoid it and use the default.',
2044     'type'        => 'checkbox',
2045   },
2046
2047   {
2048     'key'         => 'ticket_system-custom_priority_field',
2049     'section'     => '',
2050     'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
2051     'type'        => 'text',
2052   },
2053
2054   {
2055     'key'         => 'ticket_system-custom_priority_field-values',
2056     'section'     => '',
2057     'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
2058     'type'        => 'textarea',
2059   },
2060
2061   {
2062     'key'         => 'ticket_system-custom_priority_field_queue',
2063     'section'     => '',
2064     'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
2065     'type'        => 'text',
2066   },
2067
2068   {
2069     'key'         => 'ticket_system-rt_external_datasrc',
2070     'section'     => '',
2071     '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>',
2072     'type'        => 'text',
2073
2074   },
2075
2076   {
2077     'key'         => 'ticket_system-rt_external_url',
2078     'section'     => '',
2079     'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
2080     'type'        => 'text',
2081   },
2082
2083   {
2084     'key'         => 'company_name',
2085     'section'     => 'required',
2086     'description' => 'Your company name',
2087     'type'        => 'text',
2088     'per_agent'   => 1, #XXX just FS/FS/ClientAPI/Signup.pm
2089   },
2090
2091   {
2092     'key'         => 'company_address',
2093     'section'     => 'required',
2094     'description' => 'Your company address',
2095     'type'        => 'textarea',
2096     'per_agent'   => 1,
2097   },
2098
2099   {
2100     'key'         => 'echeck-void',
2101     'section'     => 'deprecated',
2102     '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',
2103     'type'        => 'checkbox',
2104   },
2105
2106   {
2107     'key'         => 'cc-void',
2108     'section'     => 'deprecated',
2109     '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',
2110     'type'        => 'checkbox',
2111   },
2112
2113   {
2114     'key'         => 'unvoid',
2115     'section'     => 'deprecated',
2116     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable unvoiding of voided payments',
2117     'type'        => 'checkbox',
2118   },
2119
2120   {
2121     'key'         => 'address1-search',
2122     'section'     => 'UI',
2123     'description' => 'Enable the ability to search the address1 field from customer search.',
2124     'type'        => 'checkbox',
2125   },
2126
2127   {
2128     'key'         => 'address2-search',
2129     'section'     => 'UI',
2130     'description' => 'Enable a "Unit" search box which searches the second address field.  Useful for multi-tenant applications.  See also: cust_main-require_address2',
2131     'type'        => 'checkbox',
2132   },
2133
2134   {
2135     'key'         => 'cust_main-require_address2',
2136     'section'     => 'UI',
2137     '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',
2138     'type'        => 'checkbox',
2139   },
2140
2141   {
2142     'key'         => 'agent-ship_address',
2143     'section'     => '',
2144     'description' => "Use the agent's master service address as the service address (only ship_address2 can be entered, if blank on the master address).  Useful for multi-tenant applications.",
2145     'type'        => 'checkbox',
2146   },
2147
2148   { 'key'         => 'referral_credit',
2149     'section'     => 'deprecated',
2150     'description' => "Used to enable one-time referral credits in the amount of one month <i>referred</i> customer's recurring fee (irregardless of frequency).  Replace with a billing event on appropriate packages.",
2151     'type'        => 'checkbox',
2152   },
2153
2154   { 'key'         => 'selfservice_server-cache_module',
2155     'section'     => '',
2156     '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.',
2157     'type'        => 'select',
2158     'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
2159   },
2160
2161   {
2162     'key'         => 'hylafax',
2163     'section'     => 'billing',
2164     '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).',
2165     'type'        => [qw( checkbox textarea )],
2166   },
2167
2168   {
2169     'key'         => 'cust_bill-ftpformat',
2170     'section'     => 'billing',
2171     'description' => 'Enable FTP of raw invoice data - format.',
2172     'type'        => 'select',
2173     'select_enum' => [ '', 'default', 'billco', ],
2174   },
2175
2176   {
2177     'key'         => 'cust_bill-ftpserver',
2178     'section'     => 'billing',
2179     'description' => 'Enable FTP of raw invoice data - server.',
2180     'type'        => 'text',
2181   },
2182
2183   {
2184     'key'         => 'cust_bill-ftpusername',
2185     'section'     => 'billing',
2186     'description' => 'Enable FTP of raw invoice data - server.',
2187     'type'        => 'text',
2188   },
2189
2190   {
2191     'key'         => 'cust_bill-ftppassword',
2192     'section'     => 'billing',
2193     'description' => 'Enable FTP of raw invoice data - server.',
2194     'type'        => 'text',
2195   },
2196
2197   {
2198     'key'         => 'cust_bill-ftpdir',
2199     'section'     => 'billing',
2200     'description' => 'Enable FTP of raw invoice data - server.',
2201     'type'        => 'text',
2202   },
2203
2204   {
2205     'key'         => 'cust_bill-spoolformat',
2206     'section'     => 'billing',
2207     'description' => 'Enable spooling of raw invoice data - format.',
2208     'type'        => 'select',
2209     'select_enum' => [ '', 'default', 'billco', ],
2210   },
2211
2212   {
2213     'key'         => 'cust_bill-spoolagent',
2214     'section'     => 'billing',
2215     'description' => 'Enable per-agent spooling of raw invoice data.',
2216     'type'        => 'checkbox',
2217   },
2218
2219   {
2220     'key'         => 'svc_acct-usage_suspend',
2221     'section'     => 'billing',
2222     '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.',
2223     'type'        => 'checkbox',
2224   },
2225
2226   {
2227     'key'         => 'svc_acct-usage_unsuspend',
2228     'section'     => 'billing',
2229     '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.',
2230     'type'        => 'checkbox',
2231   },
2232
2233   {
2234     'key'         => 'svc_acct-usage_threshold',
2235     'section'     => 'billing',
2236     '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.',
2237     'type'        => 'text',
2238   },
2239
2240   {
2241     'key'         => 'overlimit_groups',
2242     'section'     => '',
2243     'description' => 'RADIUS group (or comma-separated groups) to assign to svc_acct which has exceeded its bandwidth or time limit.',
2244     'type'        => 'text',
2245     'per_agent'   => 1,
2246   },
2247
2248   {
2249     'key'         => 'cust-fields',
2250     'section'     => 'UI',
2251     'description' => 'Which customer fields to display on reports by default',
2252     'type'        => 'select',
2253     'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
2254   },
2255
2256   {
2257     'key'         => 'cust_pkg-display_times',
2258     'section'     => 'UI',
2259     'description' => 'Display full timestamps (not just dates) for customer packages.  Useful if you are doing real-time things like hourly prepaid.',
2260     'type'        => 'checkbox',
2261   },
2262
2263   {
2264     'key'         => 'cust_pkg-always_show_location',
2265     'section'     => 'UI',
2266     'description' => "Always display package locations, even when they're all the default service address.",
2267     'type'        => 'checkbox',
2268   },
2269
2270   {
2271     'key'         => 'svc_acct-edit_uid',
2272     'section'     => 'shell',
2273     'description' => 'Allow UID editing.',
2274     'type'        => 'checkbox',
2275   },
2276
2277   {
2278     'key'         => 'svc_acct-edit_gid',
2279     'section'     => 'shell',
2280     'description' => 'Allow GID editing.',
2281     'type'        => 'checkbox',
2282   },
2283
2284   {
2285     'key'         => 'zone-underscore',
2286     'section'     => 'BIND',
2287     'description' => 'Allow underscores in zone names.  As underscores are illegal characters in zone names, this option is not recommended.',
2288     'type'        => 'checkbox',
2289   },
2290
2291   {
2292     'key'         => 'echeck-nonus',
2293     'section'     => 'billing',
2294     'description' => 'Disable ABA-format account checking for Electronic Check payment info',
2295     'type'        => 'checkbox',
2296   },
2297
2298   {
2299     'key'         => 'voip-cust_cdr_spools',
2300     'section'     => '',
2301     'description' => 'Enable the per-customer option for individual CDR spools.',
2302     'type'        => 'checkbox',
2303   },
2304
2305   {
2306     'key'         => 'voip-cust_cdr_squelch',
2307     'section'     => '',
2308     'description' => 'Enable the per-customer option for not printing CDR on invoices.',
2309     'type'        => 'checkbox',
2310   },
2311
2312   {
2313     'key'         => 'voip-cdr_email',
2314     'section'     => '',
2315     'description' => 'Include the call details on emailed invoices even if the customer is configured for not printing them on the invoices.',
2316     'type'        => 'checkbox',
2317   },
2318
2319   {
2320     'key'         => 'voip-cust_email_csv_cdr',
2321     'section'     => '',
2322     'description' => 'Enable the per-customer option for including CDR information as a CSV attachment on emailed invoices.',
2323     'type'        => 'checkbox',
2324   },
2325
2326   {
2327     'key'         => 'svc_forward-arbitrary_dst',
2328     'section'     => '',
2329     '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.",
2330     'type'        => 'checkbox',
2331   },
2332
2333   {
2334     'key'         => 'tax-ship_address',
2335     'section'     => 'billing',
2336     'description' => 'By default, tax calculations are done based on the billing address.  Enable this switch to calculate tax based on the shipping address instead.',
2337     'type'        => 'checkbox',
2338   }
2339 ,
2340   {
2341     'key'         => 'tax-pkg_address',
2342     'section'     => 'billing',
2343     'description' => 'By default, tax calculations are done based on the billing address.  Enable this switch to calculate tax based on the package address instead (when present).  Note that this option is currently incompatible with vendor data taxation enabled by enable_taxproducts.',
2344     'type'        => 'checkbox',
2345   },
2346
2347   {
2348     'key'         => 'invoice-ship_address',
2349     'section'     => 'billing',
2350     'description' => 'Include the shipping address on invoices.',
2351     'type'        => 'checkbox',
2352   },
2353
2354   {
2355     'key'         => 'invoice-unitprice',
2356     'section'     => 'billing',
2357     'description' => 'Enable unit pricing on invoices.',
2358     'type'        => 'checkbox',
2359   },
2360
2361   {
2362     'key'         => 'invoice-smallernotes',
2363     'section'     => 'billing',
2364     'description' => 'Display the notes section in a smaller font on invoices.',
2365     'type'        => 'checkbox',
2366   },
2367
2368   {
2369     'key'         => 'invoice-smallerfooter',
2370     'section'     => 'billing',
2371     'description' => 'Display footers in a smaller font on invoices.',
2372     'type'        => 'checkbox',
2373   },
2374
2375   {
2376     'key'         => 'postal_invoice-fee_pkgpart',
2377     'section'     => 'billing',
2378     'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
2379     'type'        => 'select-part_pkg',
2380   },
2381
2382   {
2383     'key'         => 'postal_invoice-recurring_only',
2384     'section'     => 'billing',
2385     'description' => 'The postal invoice fee is omitted on invoices without reucrring charges when this is set.',
2386     'type'        => 'checkbox',
2387   },
2388
2389   {
2390     'key'         => 'batch-enable',
2391     'section'     => 'deprecated', #make sure batch-enable_payby is set for
2392                                    #everyone before removing
2393     'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
2394     'type'        => 'checkbox',
2395   },
2396
2397   {
2398     'key'         => 'batch-enable_payby',
2399     'section'     => 'billing',
2400     'description' => 'Enable batch processing for the specified payment types.',
2401     'type'        => 'selectmultiple',
2402     'select_enum' => [qw( CARD CHEK )],
2403   },
2404
2405   {
2406     'key'         => 'realtime-disable_payby',
2407     'section'     => 'billing',
2408     'description' => 'Disable realtime processing for the specified payment types.',
2409     'type'        => 'selectmultiple',
2410     'select_enum' => [qw( CARD CHEK )],
2411   },
2412
2413   {
2414     'key'         => 'batch-default_format',
2415     'section'     => 'billing',
2416     'description' => 'Default format for batches.',
2417     'type'        => 'select',
2418     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch',
2419                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP',
2420                        'paymentech', 'ach-spiritone', 'RBC'
2421                     ]
2422   },
2423
2424   #lists could be auto-generated from pay_batch info
2425   {
2426     'key'         => 'batch-fixed_format-CARD',
2427     'section'     => 'billing',
2428     'description' => 'Fixed (unchangeable) format for credit card batches.',
2429     'type'        => 'select',
2430     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP' ,
2431                        'csv-chase_canada-E-xactBatch', 'paymentech' ]
2432   },
2433
2434   {
2435     'key'         => 'batch-fixed_format-CHEK',
2436     'section'     => 'billing',
2437     'description' => 'Fixed (unchangeable) format for electronic check batches.',
2438     'type'        => 'select',
2439     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
2440                        'paymentech', 'ach-spiritone', 'RBC'
2441                      ]
2442   },
2443
2444   {
2445     'key'         => 'batch-increment_expiration',
2446     'section'     => 'billing',
2447     'description' => 'Increment expiration date years in batches until cards are current.  Make sure this is acceptable to your batching provider before enabling.',
2448     'type'        => 'checkbox'
2449   },
2450
2451   {
2452     'key'         => 'batchconfig-BoM',
2453     'section'     => 'billing',
2454     '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',
2455     'type'        => 'textarea',
2456   },
2457
2458   {
2459     'key'         => 'batchconfig-PAP',
2460     'section'     => 'billing',
2461     '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',
2462     'type'        => 'textarea',
2463   },
2464
2465   {
2466     'key'         => 'batchconfig-csv-chase_canada-E-xactBatch',
2467     'section'     => 'billing',
2468     'description' => 'Gateway ID for Chase Canada E-xact batching',
2469     'type'        => 'text',
2470   },
2471
2472   {
2473     'key'         => 'batchconfig-paymentech',
2474     'section'     => 'billing',
2475     'description' => 'Configuration for Chase Paymentech batching, five lines: 1. BIN, 2. Terminal ID, 3. Merchant ID, 4. Username, 5. Password (for batch uploads)',
2476     'type'        => 'textarea',
2477   },
2478
2479   {
2480     'key'         => 'batchconfig-RBC',
2481     'section'     => 'billing',
2482     'description' => 'Configuration for Royal Bank of Canada PDS batching, four lines: 1. Client number, 2. Short name, 3. Long name, 4. Transaction code.',
2483     'type'        => 'textarea',
2484   },
2485
2486   {
2487     'key'         => 'payment_history-years',
2488     'section'     => 'UI',
2489     'description' => 'Number of years of payment history to show by default.  Currently defaults to 2.',
2490     'type'        => 'text',
2491   },
2492
2493   {
2494     'key'         => 'change_history-years',
2495     'section'     => 'UI',
2496     'description' => 'Number of years of change history to show by default.  Currently defaults to 0.5.',
2497     'type'        => 'text',
2498   },
2499
2500   {
2501     'key'         => 'cust_main-packages-years',
2502     'section'     => 'UI',
2503     'description' => 'Number of years to show old (cancelled and one-time charge) packages by default.  Currently defaults to 2.',
2504     'type'        => 'text',
2505   },
2506
2507   {
2508     'key'         => 'cust_main-use_comments',
2509     'section'     => 'UI',
2510     'description' => 'Display free form comments on the customer edit screen.  Useful as a scratch pad.',
2511     'type'        => 'checkbox',
2512   },
2513
2514   {
2515     'key'         => 'cust_main-disable_notes',
2516     'section'     => 'UI',
2517     'description' => 'Disable new style customer notes - timestamped and user identified customer notes.  Useful in tracking who did what.',
2518     'type'        => 'checkbox',
2519   },
2520
2521   {
2522     'key'         => 'cust_main_note-display_times',
2523     'section'     => 'UI',
2524     'description' => 'Display full timestamps (not just dates) for customer notes.',
2525     'type'        => 'checkbox',
2526   },
2527
2528   {
2529     'key'         => 'cust_main-ticket_statuses',
2530     'section'     => 'UI',
2531     'description' => 'Show tickets with these statuses on the customer view page.',
2532     'type'        => 'selectmultiple',
2533     'select_enum' => [qw( new open stalled resolved rejected deleted )],
2534   },
2535
2536   {
2537     'key'         => 'cust_main-max_tickets',
2538     'section'     => 'UI',
2539     'description' => 'Maximum number of tickets to show on the customer view page.',
2540     'type'        => 'text',
2541   },
2542
2543   {
2544     'key'         => 'cust_main-skeleton_tables',
2545     'section'     => '',
2546     '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.',
2547     'type'        => 'textarea',
2548   },
2549
2550   {
2551     'key'         => 'cust_main-skeleton_custnum',
2552     'section'     => '',
2553     'description' => 'Customer number specifying the source data to copy into skeleton tables for new customers.',
2554     'type'        => 'text',
2555   },
2556
2557   {
2558     'key'         => 'cust_main-enable_birthdate',
2559     'section'     => 'UI',
2560     'descritpion' => 'Enable tracking of a birth date with each customer record',
2561     'type'        => 'checkbox',
2562   },
2563
2564   {
2565     'key'         => 'support-key',
2566     'section'     => '',
2567     '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.',
2568     'type'        => 'text',
2569   },
2570
2571   {
2572     'key'         => 'card-types',
2573     'section'     => 'billing',
2574     'description' => 'Select one or more card types to enable only those card types.  If no card types are selected, all card types are available.',
2575     'type'        => 'selectmultiple',
2576     'select_enum' => \@card_types,
2577   },
2578
2579   {
2580     'key'         => 'disable-fuzzy',
2581     'section'     => 'UI',
2582     'description' => 'Disable fuzzy searching.  Speeds up searching for large sites, but only shows exact matches.',
2583     'type'        => 'checkbox',
2584   },
2585
2586   { 'key'         => 'pkg_referral',
2587     'section'     => '',
2588     'description' => 'Enable package-specific advertising sources.',
2589     'type'        => 'checkbox',
2590   },
2591
2592   { 'key'         => 'pkg_referral-multiple',
2593     'section'     => '',
2594     'description' => 'In addition, allow multiple advertising sources to be associated with a single package.',
2595     'type'        => 'checkbox',
2596   },
2597
2598   {
2599     'key'         => 'dashboard-install_welcome',
2600     'section'     => 'UI',
2601     'description' => 'New install welcome screen.',
2602     'type'        => 'select',
2603     'select_enum' => [ '', 'ITSP_fsinc_hosted', ],
2604   },
2605
2606   {
2607     'key'         => 'dashboard-toplist',
2608     'section'     => 'UI',
2609     'description' => 'List of items to display on the top of the front page',
2610     'type'        => 'textarea',
2611   },
2612
2613   {
2614     'key'         => 'impending_recur_template',
2615     'section'     => 'billing',
2616     '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>',
2617 # <li><code>$payby</code> <li><code>$expdate</code> most likely only confuse
2618     'type'        => 'textarea',
2619   },
2620
2621   {
2622     'key'         => 'logo.png',
2623     'section'     => 'billing',  #? 
2624     'description' => 'Company logo for HTML invoices and the backoffice interface, in PNG format.  Suggested size somewhere near 92x62.',
2625     'type'        => 'image',
2626     'per_agent'   => 1, #XXX just view/logo.cgi, which is for the global
2627                         #old-style editor anyway...?
2628   },
2629
2630   {
2631     'key'         => 'logo.eps',
2632     'section'     => 'billing',  #? 
2633     'description' => 'Company logo for printed and PDF invoices, in EPS format.',
2634     'type'        => 'image',
2635     'per_agent'   => 1, #XXX as above, kinda
2636   },
2637
2638   {
2639     'key'         => 'selfservice-ignore_quantity',
2640     'section'     => '',
2641     'description' => 'Ignores service quantity restrictions in self-service context.  Strongly not recommended - just set your quantities correctly in the first place.',
2642     'type'        => 'checkbox',
2643   },
2644
2645   {
2646     'key'         => 'selfservice-session_timeout',
2647     'section'     => '',
2648     'description' => 'Self-service session timeout.  Defaults to 1 hour.',
2649     'type'        => 'select',
2650     'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
2651   },
2652
2653   {
2654     'key'         => 'disable_setup_suspended_pkgs',
2655     'section'     => 'billing',
2656     'description' => 'Disables charging of setup fees for suspended packages.',
2657     'type'        => 'checkbox',
2658   },
2659
2660   {
2661     'key'         => 'password-generated-allcaps',
2662     'section'     => 'password',
2663     'description' => 'Causes passwords automatically generated to consist entirely of capital letters',
2664     'type'        => 'checkbox',
2665   },
2666
2667   {
2668     'key'         => 'datavolume-forcemegabytes',
2669     'section'     => 'UI',
2670     'description' => 'All data volumes are expressed in megabytes',
2671     'type'        => 'checkbox',
2672   },
2673
2674   {
2675     'key'         => 'datavolume-significantdigits',
2676     'section'     => 'UI',
2677     'description' => 'number of significant digits to use to represent data volumes',
2678     'type'        => 'text',
2679   },
2680
2681   {
2682     'key'         => 'disable_void_after',
2683     'section'     => 'billing',
2684     'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
2685     'type'        => 'text',
2686   },
2687
2688   {
2689     'key'         => 'disable_line_item_date_ranges',
2690     'section'     => 'billing',
2691     'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
2692     'type'        => 'checkbox',
2693   },
2694
2695   {
2696     'key'         => 'support_packages',
2697     'section'     => '',
2698     'description' => 'A list of packages eligible for RT ticket time transfer, one pkgpart per line.', #this should really be a select multiple, or specified in the packages themselves...
2699     'type'        => 'select-part_pkg',
2700     'multiple'    => 1,
2701   },
2702
2703   {
2704     'key'         => 'cust_main-require_phone',
2705     'section'     => '',
2706     'description' => 'Require daytime or night phone for all customer records.',
2707     'type'        => 'checkbox',
2708   },
2709
2710   {
2711     'key'         => 'cust_main-require_invoicing_list_email',
2712     'section'     => '',
2713     'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
2714     'type'        => 'checkbox',
2715   },
2716
2717   {
2718     'key'         => 'svc_acct-display_paid_time_remaining',
2719     'section'     => '',
2720     'description' => 'Show paid time remaining in addition to time remaining.',
2721     'type'        => 'checkbox',
2722   },
2723
2724   {
2725     'key'         => 'cancel_credit_type',
2726     'section'     => 'billing',
2727     'description' => 'The group to use for new, automatically generated credit reasons resulting from cancellation.',
2728     'type'        => 'select-sub',
2729     'options_sub' => sub { require FS::Record;
2730                            require FS::reason_type;
2731                            map { $_->typenum => $_->type }
2732                                FS::Record::qsearch('reason_type', { class=>'R' } );
2733                          },
2734     'option_sub'  => sub { require FS::Record;
2735                            require FS::reason_type;
2736                            my $reason_type = FS::Record::qsearchs(
2737                              'reason_type', { 'typenum' => shift }
2738                            );
2739                            $reason_type ? $reason_type->type : '';
2740                          },
2741   },
2742
2743   {
2744     'key'         => 'referral_credit_type',
2745     'section'     => 'deprecated',
2746     'description' => 'Used to be the group to use for new, automatically generated credit reasons resulting from referrals.  Now set in a package billing event for the referral.',
2747     'type'        => 'select-sub',
2748     'options_sub' => sub { require FS::Record;
2749                            require FS::reason_type;
2750                            map { $_->typenum => $_->type }
2751                                FS::Record::qsearch('reason_type', { class=>'R' } );
2752                          },
2753     'option_sub'  => sub { require FS::Record;
2754                            require FS::reason_type;
2755                            my $reason_type = FS::Record::qsearchs(
2756                              'reason_type', { 'typenum' => shift }
2757                            );
2758                            $reason_type ? $reason_type->type : '';
2759                          },
2760   },
2761
2762   {
2763     'key'         => 'signup_credit_type',
2764     'section'     => 'billing',
2765     'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
2766     'type'        => 'select-sub',
2767     'options_sub' => sub { require FS::Record;
2768                            require FS::reason_type;
2769                            map { $_->typenum => $_->type }
2770                                FS::Record::qsearch('reason_type', { class=>'R' } );
2771                          },
2772     'option_sub'  => sub { require FS::Record;
2773                            require FS::reason_type;
2774                            my $reason_type = FS::Record::qsearchs(
2775                              'reason_type', { 'typenum' => shift }
2776                            );
2777                            $reason_type ? $reason_type->type : '';
2778                          },
2779   },
2780
2781   {
2782     'key'         => 'cust_main-agent_custid-format',
2783     'section'     => '',
2784     'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
2785     'type'        => 'select',
2786     'select_hash' => [
2787                        ''      => 'Numeric only',
2788                        'ww?d+' => 'Numeric with one or two letter prefix',
2789                      ],
2790   },
2791
2792   {
2793     'key'         => 'card_masking_method',
2794     'section'     => 'UI',
2795     '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.',
2796     'type'        => 'select',
2797     'select_hash' => [
2798                        ''            => '123456xxxxxx1234',
2799                        'first6last2' => '123456xxxxxxxx12',
2800                        'first4last4' => '1234xxxxxxxx1234',
2801                        'first4last2' => '1234xxxxxxxxxx12',
2802                        'first2last4' => '12xxxxxxxxxx1234',
2803                        'first2last2' => '12xxxxxxxxxxxx12',
2804                        'first0last4' => 'xxxxxxxxxxxx1234',
2805                        'first0last2' => 'xxxxxxxxxxxxxx12',
2806                      ],
2807   },
2808
2809   {
2810     'key'         => 'disable_previous_balance',
2811     'section'     => 'billing',
2812     'description' => 'Disable inclusion of previous balancem payment, and credit lines on invoices',
2813     'type'        => 'checkbox',
2814   },
2815
2816   {
2817     'key'         => 'previous_balance-summary_only',
2818     'section'     => 'billing',
2819     'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.',
2820     'type'        => 'checkbox',
2821   },
2822
2823   {
2824     'key'         => 'usps_webtools-userid',
2825     'section'     => 'UI',
2826     'description' => 'Production UserID for USPS web tools.   Enables USPS address standardization.  See the <a href="http://www.usps.com/webtools/">USPS website</a>, register and agree not to use the tools for batch purposes.',
2827     'type'        => 'text',
2828   },
2829
2830   {
2831     'key'         => 'usps_webtools-password',
2832     'section'     => 'UI',
2833     'description' => 'Production password for USPS web tools.   Enables USPS address standardization.  See <a href="http://www.usps.com/webtools/">USPS website</a>, register and agree not to use the tools for batch purposes.',
2834     'type'        => 'text',
2835   },
2836
2837   {
2838     'key'         => 'cust_main-auto_standardize_address',
2839     'section'     => 'UI',
2840     'description' => 'When using USPS web tools, automatically standardize the address without asking.',
2841     'type'        => 'checkbox',
2842   },
2843
2844   {
2845     'key'         => 'cust_main-require_censustract',
2846     'section'     => 'UI',
2847     'description' => 'Customer is required to have a census tract.  Useful for FCC form 477 reports. See also: cust_main-auto_standardize_address',
2848     'type'        => 'checkbox',
2849   },
2850
2851   {
2852     'key'         => 'census_year',
2853     'section'     => 'UI',
2854     'description' => 'The year to use in census tract lookups',
2855     'type'        => 'select',
2856     'select_enum' => [ qw( 2009 2008 2007 2006 ) ],
2857   },
2858
2859   {
2860     'key'         => 'company_latitude',
2861     'section'     => 'UI',
2862     'description' => 'Your company latitude (-90 through 90)',
2863     'type'        => 'text',
2864   },
2865
2866   {
2867     'key'         => 'company_longitude',
2868     'section'     => 'UI',
2869     'description' => 'Your company longitude (-180 thru 180)',
2870     'type'        => 'text',
2871   },
2872
2873   {
2874     'key'         => 'disable_acl_changes',
2875     'section'     => '',
2876     'description' => 'Disable all ACL changes, for demos.',
2877     'type'        => 'checkbox',
2878   },
2879
2880   {
2881     'key'         => 'cust_main-edit_agent_custid',
2882     'section'     => 'UI',
2883     'description' => 'Enable editing of the agent_custid field.',
2884     'type'        => 'checkbox',
2885   },
2886
2887   {
2888     'key'         => 'cust_main-default_agent_custid',
2889     'section'     => 'UI',
2890     'description' => 'Display the agent_custid field when available instead of the custnum field.',
2891     'type'        => 'checkbox',
2892   },
2893
2894   {
2895     'key'         => 'cust_bill-default_agent_invid',
2896     'section'     => 'UI',
2897     'description' => 'Display the agent_invid field when available instead of the invnum field.',
2898     'type'        => 'checkbox',
2899   },
2900
2901   {
2902     'key'         => 'cust_main-auto_agent_custid',
2903     'section'     => 'UI',
2904     'description' => 'Automatically assign an agent_custid - select format',
2905     'type'        => 'select',
2906     'select_hash' => [ '' => 'No',
2907                        '1YMMXXXXXXXX' => '1YMMXXXXXXXX',
2908                      ],
2909   },
2910
2911   {
2912     'key'         => 'cust_main-default_areacode',
2913     'section'     => 'UI',
2914     'description' => 'Default area code for customers.',
2915     'type'        => 'text',
2916   },
2917
2918   {
2919     'key'         => 'mcp_svcpart',
2920     'section'     => '',
2921     'description' => 'Master Control Program svcpart.  Leave this blank.',
2922     'type'        => 'text', #select-part_svc
2923   },
2924
2925   {
2926     'key'         => 'cust_bill-max_same_services',
2927     'section'     => 'billing',
2928     '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.',
2929     'type'        => 'text',
2930   },
2931
2932   {
2933     'key'         => 'cust_bill-consolidate_services',
2934     'section'     => 'billing',
2935     'description' => 'Consolidate service display into fewer lines on invoices rather than one per service.',
2936     'type'        => 'checkbox',
2937   },
2938
2939   {
2940     'key'         => 'suspend_email_admin',
2941     'section'     => '',
2942     'description' => 'Destination admin email address to enable suspension notices',
2943     'type'        => 'text',
2944   },
2945
2946   {
2947     'key'         => 'email_report-subject',
2948     'section'     => '',
2949     'description' => 'Subject for reports emailed by freeside-fetch.  Defaults to "Freeside report".',
2950     'type'        => 'text',
2951   },
2952
2953   {
2954     'key'         => 'selfservice-head',
2955     'section'     => '',
2956     'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags',
2957     'type'        => 'textarea', #htmlarea?
2958     'per_agent'   => 1,
2959   },
2960
2961
2962   {
2963     'key'         => 'selfservice-body_header',
2964     'section'     => '',
2965     'description' => 'HTML header for the self-service interface',
2966     'type'        => 'textarea', #htmlarea?
2967     'per_agent'   => 1,
2968   },
2969
2970   {
2971     'key'         => 'selfservice-body_footer',
2972     'section'     => '',
2973     'description' => 'HTML header for the self-service interface',
2974     'type'        => 'textarea', #htmlarea?
2975     'per_agent'   => 1,
2976   },
2977
2978
2979   {
2980     'key'         => 'selfservice-body_bgcolor',
2981     'section'     => '',
2982     'description' => 'HTML background color for the self-service interface, for example, #FFFFFF',
2983     'type'        => 'text',
2984     'per_agent'   => 1,
2985   },
2986
2987   {
2988     'key'         => 'selfservice-box_bgcolor',
2989     'section'     => '',
2990     'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0"',
2991     'type'        => 'text',
2992     'per_agent'   => 1,
2993   },
2994
2995   {
2996     'key'         => 'selfservice-bulk_format',
2997     'section'     => '',
2998     'description' => 'Parameter arrangement for selfservice bulk features',
2999     'type'        => 'select',
3000     'select_enum' => [ '', 'izoom-soap', 'izoom-ftp' ],
3001     'per_agent'   => 1,
3002   },
3003
3004   {
3005     'key'         => 'selfservice-bulk_ftp_dir',
3006     'section'     => '',
3007     'description' => 'Enable bulk ftp provisioning in this folder',
3008     'type'        => 'text',
3009     'per_agent'   => 1,
3010   },
3011
3012   {
3013     'key'         => 'signup-no_company',
3014     'section'     => '',
3015     'description' => "Don't display a field for company name on signup.",
3016     'type'        => 'checkbox',
3017   },
3018
3019   {
3020     'key'         => 'signup-recommend_email',
3021     'section'     => '',
3022     'description' => 'Encourage the entry of an invoicing email address on signup.',
3023     'type'        => 'checkbox',
3024   },
3025
3026   {
3027     'key'         => 'signup-recommend_daytime',
3028     'section'     => '',
3029     'description' => 'Encourage the entry of a daytime phone number  invoicing email address on signup.',
3030     'type'        => 'checkbox',
3031   },
3032
3033   {
3034     'key'         => 'svc_phone-radius-default_password',
3035     'section'     => '',
3036     'description' => 'Default password when exporting svc_phone records to RADIUS',
3037     'type'        => 'text',
3038   },
3039
3040   {
3041     'key'         => 'svc_phone-allow_alpha_phonenum',
3042     'section'     => '',
3043     'description' => 'Allow letters in phone numbers.',
3044     'type'        => 'checkbox',
3045   },
3046
3047   {
3048     'key'         => 'default_phone_countrycode',
3049     'section'     => '',
3050     'description' => 'Default countrcode',
3051     'type'        => 'text',
3052   },
3053
3054   {
3055     'key'         => 'cdr-charged_party-accountcode',
3056     'section'     => '',
3057     'description' => 'Set the charged_party field of CDRs to the accountcode.',
3058     'type'        => 'checkbox',
3059   },
3060
3061   {
3062     'key'         => 'cdr-charged_party-accountcode-trim_leading_0s',
3063     'section'     => '',
3064     'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros.',
3065     'type'        => 'checkbox',
3066   },
3067
3068 #  {
3069 #    'key'         => 'cdr-charged_party-truncate_prefix',
3070 #    'section'     => '',
3071 #    'description' => 'If the charged_party field has this prefix, truncate it to the length in cdr-charged_party-truncate_length.',
3072 #    'type'        => 'text',
3073 #  },
3074 #
3075 #  {
3076 #    'key'         => 'cdr-charged_party-truncate_length',
3077 #    'section'     => '',
3078 #    'description' => 'If the charged_party field has the prefix in cdr-charged_party-truncate_prefix, truncate it to this length.',
3079 #    'type'        => 'text',
3080 #  },
3081
3082   {
3083     'key'         => 'cdr-charged_party_rewrite',
3084     'section'     => '',
3085     'description' => 'Do charged party rewriting in the freeside-cdrrewrited daemon; useful if CDRs are being dropped off directly in the database and require special charged_party processing such as cdr-charged_party-accountcode or cdr-charged_party-truncate*.',
3086     'type'        => 'checkbox',
3087   },
3088
3089   {
3090     'key'         => 'cdr-taqua-da_rewrite',
3091     'section'     => '',
3092     'description' => 'For the Taqua CDR format, a comma-separated list of directory assistance 800 numbers.  Any CDRs with these numbers as "BilledNumber" will be rewritten to the "CallingPartyNumber" (and CallType "12") on import.',
3093     'type'        => 'text',
3094   },
3095
3096   {
3097     'key'         => 'cust_pkg-show_autosuspend',
3098     'section'     => 'UI',
3099     'description' => 'Show package auto-suspend dates.  Use with caution for now; can slow down customer view for large insallations.',
3100     'type'        => 'checkbox',
3101   },
3102
3103   {
3104     'key'         => 'cdr-asterisk_forward_rewrite',
3105     'section'     => '',
3106     'description' => 'Enable special processing for CDRs representing forwarded calls: For CDRs that have a dcontext that starts with "Local/" but does not match dst, set charged_party to dst, parse a new dst from dstchannel, and set amaflags to "2" ("BILL"/"BILLING").',
3107     'type'        => 'checkbox',
3108   },
3109
3110   {
3111     'key'         => 'sg-multicustomer_hack',
3112     'section'     => '',
3113     'description' => "Don't use this.",
3114     'type'        => 'checkbox',
3115   },
3116
3117   {
3118     'key'         => 'sg-ping_username',
3119     'section'     => '',
3120     'description' => "Don't use this.",
3121     'type'        => 'text',
3122   },
3123
3124   {
3125     'key'         => 'sg-ping_password',
3126     'section'     => '',
3127     'description' => "Don't use this.",
3128     'type'        => 'text',
3129   },
3130
3131   {
3132     'key'         => 'sg-login_username',
3133     'section'     => '',
3134     'description' => "Don't use this.",
3135     'type'        => 'text',
3136   },
3137
3138   {
3139     'key'         => 'disable-cust-pkg_class',
3140     'section'     => 'UI',
3141     'description' => 'Disable the two-step dropdown for selecting package class and package, and return to the classic single dropdown.',
3142     'type'        => 'checkbox',
3143   },
3144
3145   {
3146     'key'         => 'queued-max_kids',
3147     'section'     => '',
3148     'description' => 'Maximum number of queued processes.  Defaults to 10.',
3149     'type'        => 'text',
3150   },
3151
3152   {
3153     'key'         => 'cancelled_cust-noevents',
3154     'section'     => 'billing',
3155     'description' => "Don't run events for cancelled customers",
3156     'type'        => 'checkbox',
3157   },
3158
3159   {
3160     'key'         => 'agent-invoice_template',
3161     'section'     => 'billing',
3162     'description' => 'Enable display/edit of old-style per-agent invoice template selection',
3163     'type'        => 'checkbox',
3164   },
3165
3166   {
3167     'key'         => 'svc_broadband-manage_link',
3168     'section'     => 'UI',
3169     'description' => 'URL for svc_broadband "Manage Device" link.  The following substitutions are available: $ip_addr.',
3170     'type'        => 'text',
3171   },
3172
3173   #more fine-grained, service def-level control could be useful eventually?
3174   {
3175     'key'         => 'svc_broadband-allow_null_ip_addr',
3176     'section'     => '',
3177     'description' => '',
3178     'type'        => 'checkbox',
3179   },
3180
3181   {
3182     'key'         => 'tax-report_groups',
3183     'section'     => '',
3184     'description' => 'List of grouping possibilities for tax names on reports, one per line, "label op value" (op can be = or !=).',
3185     'type'        => 'textarea',
3186   },
3187
3188   {
3189     'key'         => 'tax-cust_exempt-groups',
3190     'section'     => '',
3191     'description' => 'List of grouping possibilities for tax names, for per-customer exemption purposes, one tax name per line.  For example, "GST" would indicate the ability to exempt customers individually from taxes named "GST" (but not other taxes).',
3192     'type'        => 'textarea',
3193   },
3194
3195   {
3196     'key'         => 'cust_main-default_view',
3197     'section'     => 'UI',
3198     'description' => 'Default customer view, for users who have not selected a default view in their preferences.',
3199     'type'        => 'select',
3200     'select_hash' => [
3201       #false laziness w/view/cust_main.cgi and pref/pref.html
3202       'basics'          => 'Basics',
3203       'notes'           => 'Notes',
3204       'tickets'         => 'Tickets',
3205       'packages'        => 'Packages',
3206       'payment_history' => 'Payment History',
3207       'change_history'  => 'Change History',
3208       'jumbo'           => 'Jumbo',
3209     ],
3210   },
3211
3212   {
3213     'key'         => 'enable_tax_adjustments',
3214     'section'     => 'billing',
3215     'description' => 'Enable the ability to add manual tax adjustments.',
3216     'type'        => 'checkbox',
3217   },
3218
3219   {
3220     'key'         => 'rt-crontool',
3221     'section'     => '',
3222     'description' => 'Enable the RT CronTool extension.',
3223     'type'        => 'checkbox',
3224   },
3225
3226   {
3227     'key'         => 'pkg-balances',
3228     'section'     => 'billing',
3229     'description' => 'Enable experimental package balances.  Not recommended for general use.',
3230     'type'        => 'checkbox',
3231   },
3232
3233   {
3234     'key'         => 'cust_main-edit_signupdate',
3235     'section'     => 'UI',
3236     'descritpion' => 'Enable manual editing of the signup date.',
3237     'type'        => 'checkbox',
3238   },
3239
3240   {
3241     'key'         => 'svc_acct-disable_access_number',
3242     'section'     => 'UI',
3243     'descritpion' => 'Disable access number selection.',
3244     'type'        => 'checkbox',
3245   },
3246
3247   {
3248     'key'         => 'breakage-days',
3249     'section'     => 'billing',
3250     'description' => 'If set to a number of days, after an account goes that long without activity, recognizes any outstanding payments and credits as "breakage" by creating a breakage charge and invoice.',
3251     'type'        => 'text',
3252     'per_agent'   => 1,
3253   },
3254
3255   {
3256     'key'         => 'breakage-pkg_class',
3257     'section'     => 'billing',
3258     'description' => 'Package class to use for breakage reconciliation.',
3259     'type'        => 'select-pkg_class',
3260   },
3261
3262   {
3263     'key'         => 'disable_cron_billing',
3264     'section'     => 'billing',
3265     'description' => 'Disable billing and collection from being run by freeside-daily and freeside-monthly, while still allowing other actions to run, such as notifications and backup.',
3266     'type'        => 'checkbox',
3267   },
3268
3269   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3270   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3271   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3272   { key => "bindprimary", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3273   { key => "bindsecondaries", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3274   { key => "bsdshellmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3275   { key => "cyrus", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3276   { key => "cp_app", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3277   { key => "erpcdmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3278   { key => "icradiusmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3279   { key => "icradius_mysqldest", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3280   { key => "icradius_mysqlsource", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3281   { key => "icradius_secrets", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3282   { key => "maildisablecatchall", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3283   { key => "mxmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3284   { key => "nsmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3285   { key => "arecords", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3286   { key => "cnamerecords", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3287   { key => "nismachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3288   { key => "qmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3289   { key => "radiusmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3290   { key => "sendmailconfigpath", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3291   { key => "sendmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3292   { key => "sendmailrestart", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3293   { key => "shellmachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3294   { key => "shellmachine-useradd", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3295   { key => "shellmachine-userdel", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3296   { key => "shellmachine-usermod", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3297   { key => "shellmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3298   { key => "radiusprepend", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3299   { key => "textradiusprepend", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3300   { key => "username_policy", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3301   { key => "vpopmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3302   { key => "vpopmailrestart", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3303   { key => "safe-part_pkg", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3304   { key => "selfservice_server-quiet", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3305   { key => "signup_server-quiet", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3306   { key => "signup_server-email", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3307   { key => "vonage-username", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3308   { key => "vonage-password", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3309   { key => "vonage-fromnumber", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
3310
3311 );
3312
3313 1;
3314