From 7c0ec6fb521584a93a93e456dbb923870f059308 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Oct 2006 17:10:46 +0000 Subject: [PATCH] add a conf checkbox to turn DOB on --- FS/FS/Conf.pm | 6 +++++- httemplate/edit/cust_main.cgi | 22 +++++++++++++--------- httemplate/view/cust_main/misc.html | 12 ++++++++---- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index fe5d5e1cd..706a42225 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1827,7 +1827,11 @@ httemplate/docs/config.html 'type' => 'text', }, - + { + 'key' => 'cust_main-enable_birthdate', + 'section' => 'UI', + 'descritpion' => 'Enable tracking of a birth date with each customer record', + 'type' => 'checkbox', ); 1; diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 23254b6a8..6f4c98ea5 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -164,16 +164,20 @@ -
-<% ntable("#cccccc", 2) %> -<% include ('/elements/tr-input-date-field.html', - 'birthdate', - $cust_main->birthdate, - 'Date of Birth', - $conf->config('date_format') || "%m/%d/%Y") -%> +<% if ( $conf->exists('cust_main-enable_birthdate') ) { - +
+ <% ntable("#cccccc", 2) %> + <% include ('/elements/tr-input-date-field.html', + 'birthdate', + $cust_main->birthdate, + 'Date of Birth', + $conf->config('date_format') || "%m/%d/%Y") + %> + + + +<% } %> diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index b0fab0300..b6c028e16 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -91,10 +91,14 @@ <% $cust_main->otaker %> - - Date of Birth - <% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %> - +<% if ( $conf->exists('cust_main-enable_birthdate') ) { + + + Date of Birth + <% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %> + + +<% } %> -- 2.11.0