From 263a8097a88a1808e354cbd3062f21c91fe305c0 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 26 Dec 2000 23:51:40 +0000 Subject: [PATCH] statedefault & referraldefault config files --- CREDITS | 3 +++ TODO | 9 ++++++++- htdocs/docs/config.html | 2 ++ htdocs/edit/cust_main.cgi | 13 +++++++++---- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CREDITS b/CREDITS index 79b95b370..cdfaedc87 100644 --- a/CREDITS +++ b/CREDITS @@ -66,5 +66,8 @@ low-level DBI stuff. Jason Spence contributed admin.html, autocapnames javascript, bugfixes & other neat stuff I can't remember. +Brad Dameron contributed code to do configurable state +and referral defaults. + Everything else is my (Ivan Kohler ) fault. diff --git a/TODO b/TODO index a1d3bdaa4..54a00a111 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -$Id: TODO,v 1.55 2000-12-11 01:30:11 ivan Exp $ +$Id: TODO,v 1.56 2000-12-26 23:51:40 ivan Exp $ If you are interested in helping with any of these, please join the *development* mailing list (send a blank message to @@ -6,6 +6,13 @@ ivan-freeside-devel-subscribe@sisd.com) to avoid duplication of effort. --- +Use this for email checking: +libemail-valid-perl - Check validity of Internet email addresses +. +This module determines whether an email address is well-formed, and +optionally, whether a mail host exists for the domain. + + wishlist from drenalin@ultimanet.com: * delete button for customers - 15th of the month billing diff --git a/htdocs/docs/config.html b/htdocs/docs/config.html index fb744bff7..bc6da6bf3 100644 --- a/htdocs/docs/config.html +++ b/htdocs/docs/config.html @@ -52,6 +52,7 @@ All further configuration files and directories are located in
  • passwordmin - Minimum password length (default 6);
  • qmailmachines - Your qmail machines, one per line. This enables export of `/var/qmail/control/virtualdomains', `/var/qmail/control/recipientmap', and `/var/qmail/control/rcpthosts'. The existance of this file (even if empty) also turns on user `.qmail-extension' file maintenance in conjunction with `shellmachine'.
  • radiusmachines - Your RADIUS authentication machines, one per line. This enables export of `/etc/raddb/users'. +
  • referraldefault - Default referral, specified by refnum.
  • registries - Directory which contains domain registry information. Each registry is a directory.
    • registries/internic - Currently the only supported registry @@ -82,6 +83,7 @@ All further configuration files and directories are located in
    • soamachine - SOA machine for new domains, with trailing `.'
    • soarefresh - SOA refresh for new domains
    • soaretry - SOA retry for new domains +
    • statedefault - Default state or province (if not supplied, the default is `CA')
    • textradiusprepend - The contents of this file will be prepended to the first line of a user's RADIUS entry in text exports. If necessary, usually `Auth-Type = Local, '.
    • usernamemin - Minimum username length (default 2);
    • usernamemax - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run) diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi index cb8ec83ee..b3d9f0d80 100755 --- a/htdocs/edit/cust_main.cgi +++ b/htdocs/edit/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.27 2000-12-03 13:45:15 ivan Exp $ +# $Id: cust_main.cgi,v 1.28 2000-12-26 23:51:40 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum @@ -38,7 +38,10 @@ # fixed one missed day->daytime ivan@sisd.com 98-jul-13 # # $Log: cust_main.cgi,v $ -# Revision 1.27 2000-12-03 13:45:15 ivan +# Revision 1.28 2000-12-26 23:51:40 ivan +# statedefault & referraldefault config files +# +# Revision 1.27 2000/12/03 13:45:15 ivan # patch from Jason Spence : admin.html doc, autocapgen # # Revision 1.26 2000/06/27 12:15:50 ivan @@ -269,7 +272,7 @@ if ( scalar(@agents) == 1 ) { #referral -$refnum = $cust_main->refnum || 0; +$refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; if ( $custnum && ! $conf->exists('editreferrals') ) { print qq!!; } else { @@ -331,6 +334,8 @@ END $cust_main->country( $conf->config('countrydefault') || 'US' ) unless $cust_main->country; +$cust_main->state( $conf->config('statedefault') || 'CA' ) + unless $cust_main->state; foreach ( qsearch('cust_main_county',{}) ) { print "state eq $_->state @@ -380,7 +385,7 @@ sub expselect { $return .= ">$_"; } $return .= qq!/