From 3050434f62122e73d748dac26a5e70193b444c0a Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 4 Oct 2006 21:22:08 +0000 Subject: DoB --- httemplate/edit/cust_main.cgi | 17 +++++++++++++++ httemplate/elements/tr-input-date-field.html | 32 ++++++++++++++++++++++++++++ httemplate/view/cust_main/misc.html | 6 ++++++ 3 files changed, 55 insertions(+) create mode 100644 httemplate/elements/tr-input-date-field.html (limited to 'httemplate') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 99f849fc8..e0dd3c8ea 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -160,6 +160,19 @@ % } + + + + +
+<% ntable("#cccccc", 2) %> +<% include ('/elements/tr-input-date-field.html', + 'birthdate', + $cust_main->birthdate, + 'Date of Birth', + $conf->config('date_format') || "%m/%d/%Y") +%> + @@ -247,6 +260,8 @@ Service address function bottomfixup(what) { var topvars = new Array( + 'birthdate', + 'custnum', 'agentnum', 'refnum', 'referral_custnum', 'last', 'first', 'ss', 'company', @@ -329,6 +344,8 @@ function copyelement(from, to) {
% foreach my $hidden ( +% 'birthdate', +% % 'custnum', 'agentnum', 'refnum', 'referral_custnum', % 'last', 'first', 'ss', 'company', % 'address1', 'address2', 'city', diff --git a/httemplate/elements/tr-input-date-field.html b/httemplate/elements/tr-input-date-field.html new file mode 100644 index 000000000..eb8eee450 --- /dev/null +++ b/httemplate/elements/tr-input-date-field.html @@ -0,0 +1,32 @@ + + + + + + + + <% $label %> + + + + + + + + + +<%init> +my($name, $value, $label, $format) = @_; + +$format = "%m/%d/%Y" unless $format; +$label = $name unless $label; + + + diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index fc033b970..b0fab0300 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -1,6 +1,7 @@ % % my( $cust_main ) = @_; % my $conf = new FS::Conf; +% my $date_format = ($conf->config('date_format') || "%m/%d/%Y"); % @@ -90,5 +91,10 @@ <% $cust_main->otaker %> + + Date of Birth + <% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %> + + -- cgit v1.2.1