X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=6f7b2d6d89ae60104e4306d25cb03ff66a37e9ae;hb=77f1799506c467803042ee89bb82c080b21db179;hp=3cddc20feb1900ee904c389ca7052acc53107901;hpb=a5be013b9a08af7adc28b56b45c04bb5c7592343;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 3cddc20fe..6f7b2d6d8 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -108,6 +108,22 @@ sub exists { -e "$dir/$file"; } +=item config_orbase KEY SUFFIX + +Returns the configuration value or values (depending on context) for +KEY_SUFFIX, if it exists, otherwise for KEY + +=cut + +sub config_orbase { + my( $self, $file, $suffix ) = @_; + if ( $self->exists("${file}_$suffix") ) { + $self->config("${file}_$suffix"); + } else { + $self->config($file); + } +} + =item touch KEY Creates the specified configuration key if it does not exist. @@ -197,6 +213,18 @@ sub config_items { 'type' => 'textarea', } } glob($self->dir. '/invoice_latex_*') + ), + ( map { + my $basename = basename($_); + $basename =~ /^(.*)$/; + $basename = $1; + new FS::ConfItem { + 'key' => $basename, + 'section' => 'billing', + 'description' => 'Alternate Notes section for LaTeX typeset PostScript invoices. See the billing documentation for details.', + 'type' => 'textarea', + } + } glob($self->dir. '/invoice_latexnotes_*') ); } @@ -630,8 +658,8 @@ httemplate/docs/config.html { 'key' => 'report_template', - 'section' => 'required', - 'description' => 'Required template file for reports. See the billing documentation for details.', + 'section' => 'deprecated', + 'description' => 'Deprecated template file for reports.', 'type' => 'textarea', }, @@ -1220,6 +1248,15 @@ httemplate/docs/config.html 'type' => 'textarea', }, + { + 'key' => 'selfservice_server-primary_only', + 'section' => '', + 'description' => 'Only allow primary accounts to access self-service functionality.', + 'type' => 'checkbox', + }, + + + ); 1;