statedefault & referraldefault config files
authorivan <ivan>
Tue, 26 Dec 2000 23:51:40 +0000 (23:51 +0000)
committerivan <ivan>
Tue, 26 Dec 2000 23:51:40 +0000 (23:51 +0000)
CREDITS
TODO
htdocs/docs/config.html
htdocs/edit/cust_main.cgi

diff --git a/CREDITS b/CREDITS
index 79b95b3..cdfaedc 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -66,5 +66,8 @@ low-level DBI stuff.
 Jason Spence <thalakan@frys.com> contributed admin.html, autocapnames
 javascript, bugfixes & other neat stuff I can't remember.
 
+Brad Dameron <bdameron@tscnet.com> contributed code to do configurable state
+and referral defaults.
+
 Everything else is my (Ivan Kohler <ivan@420.am>) fault.
 
diff --git a/TODO b/TODO
index a1d3bda..54a00a1 100644 (file)
--- 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
index fb744bf..bc6da6b 100644 (file)
@@ -52,6 +52,7 @@ All further configuration files and directories are located in
   <li><a name="passwordmin">passwordmin</a> - Minimum password length (default 6);
   <li><a name="qmailmachines">qmailmachines</a> - 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'.
   <li><a name="radiusmachines">radiusmachines</a> - Your RADIUS authentication machines, one per line.  This enables export of `/etc/raddb/users'.
+  <li><a name="referraldefault">referraldefault</a> - Default referral, specified by refnum.
   <li><a name="registries">registries</a> - Directory which contains domain registry information.  Each registry is a directory.
     <ul>
       <li>registries/internic - Currently the only supported registry
@@ -82,6 +83,7 @@ All further configuration files and directories are located in
   <li><a name="soamachine">soamachine</a> - SOA machine for new domains, with trailing `.'
   <li><a name="soarefresh">soarefresh</a> - SOA refresh for new domains
   <li><a name="soaretry">soaretry</a> - SOA retry for new domains
+  <li><a name="statedefault">statedefault</a> - Default state or province (if not supplied, the default is `CA')
   <li><a name="textradiusprepend">textradiusprepend</a> - 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, '.
   <li><a name="usernamemin">usernamemin</a> - Minimum username length (default 2);
   <li><a name="usernamemax">usernamemax</a> - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run)
index cb8ec83..b3d9f0d 100755 (executable)
@@ -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
 # 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 <thalakan@frys.com>: 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!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!;
 } 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 "<OPTION";
   print " SELECTED" if ( $cust_main->state eq $_->state
@@ -380,7 +385,7 @@ sub expselect {
     $return .= ">$_";
   }
   $return .= qq!</SELECT>/<SELECT NAME="$prefix!. qq!_year" SIZE="1">!;
-  for ( 1999 .. 2037 ) {
+  for ( 2001 .. 2037 ) {
     $return .= "<OPTION";
     $return .= " SELECTED" if $_ == $y;
     $return .= ">$_";