add a conf checkbox to turn DOB on
authorivan <ivan>
Mon, 16 Oct 2006 17:10:46 +0000 (17:10 +0000)
committerivan <ivan>
Mon, 16 Oct 2006 17:10:46 +0000 (17:10 +0000)
FS/FS/Conf.pm
httemplate/edit/cust_main.cgi
httemplate/view/cust_main/misc.html

index fe5d5e1..706a422 100644 (file)
@@ -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;
index 23254b6..6f4c98e 100755 (executable)
 
 <!-- birthdate -->
 
-<BR>
-<% 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') ) {
 
-</TABLE>
+  <BR>
+  <% ntable("#cccccc", 2) %>
+  <% include ('/elements/tr-input-date-field.html',
+              'birthdate',
+              $cust_main->birthdate,
+              'Date of Birth',
+              $conf->config('date_format') || "%m/%d/%Y")
+  %>
+
+  </TABLE>
+
+<% } %>
 
 <!-- contact info -->
 
index b0fab03..b6c028e 100644 (file)
   <TD BGCOLOR="#ffffff"><% $cust_main->otaker %></TD>
 </TR>
 
-<TR>
-  <TD ALIGN="right">Date of Birth</TD>
-  <TD BGCOLOR="#ffffff"><% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %></TD>
-</TR>
+<% if ( $conf->exists('cust_main-enable_birthdate') ) {
+
+  <TR>
+    <TD ALIGN="right">Date of Birth</TD>
+    <TD BGCOLOR="#ffffff"><% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %></TD>
+  </TR>
+
+<% } %>
 
 </TABLE></TD></TR></TABLE>