summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2000-12-26 23:51:40 +0000
committerivan <ivan>2000-12-26 23:51:40 +0000
commit263a8097a88a1808e354cbd3062f21c91fe305c0 (patch)
tree3cc7d5984104e44b8641daf0007a798db3e693fe
parentc661868d1119af8a911c47982b52a2c89776c752 (diff)
statedefault & referraldefault config files
-rw-r--r--CREDITS3
-rw-r--r--TODO9
-rw-r--r--htdocs/docs/config.html2
-rwxr-xr-xhtdocs/edit/cust_main.cgi13
4 files changed, 22 insertions, 5 deletions
diff --git a/CREDITS b/CREDITS
index 79b95b3..cdfaedc 100644
--- 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
--- 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 fb744bf..bc6da6b 100644
--- a/htdocs/docs/config.html
+++ b/htdocs/docs/config.html
@@ -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)
diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi
index cb8ec83..b3d9f0d 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 <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 .= ">$_";