summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorjeff <jeff>2006-10-04 21:22:08 +0000
committerjeff <jeff>2006-10-04 21:22:08 +0000
commit3050434f62122e73d748dac26a5e70193b444c0a (patch)
treedb86ba39f602dcd2dcbf9520002cc1703363583e /httemplate
parent30c3ff2acf90e1386fae00759078899c859faf36 (diff)
DoB
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/cust_main.cgi17
-rw-r--r--httemplate/elements/tr-input-date-field.html32
-rw-r--r--httemplate/view/cust_main/misc.html6
3 files changed, 55 insertions, 0 deletions
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
@@ -162,6 +162,19 @@
</TABLE>
+<!-- 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")
+%>
+
+</TABLE>
+
<!-- contact info -->
<BR><BR>
@@ -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) {
<FORM ACTION="<% popurl(1) %>process/cust_main.cgi" METHOD=POST NAME="bottomform" onSubmit="document.bottomform.submit.disabled=true; bottomfixup(this.form);" STYLE="margin-top: 0; margin-bottom: 0">
% 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 @@
+
+<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
+
+<TR>
+ <TD ALIGN="right"><% $label %></TD>
+ <TD>
+ <INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% time2str($format, $value) %>">
+ <IMG SRC="../images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="Select date">
+ </TD>
+</TR>
+
+<SCRIPT TYPE="text/javascript">
+ Calendar.setup({
+ inputField: "<% $name %>_text",
+ ifFormat: "<% $format %>",
+ button: "<% $name %>_button",
+ align: "BR"
+ });
+</SCRIPT>
+
+
+<%init>
+my($name, $value, $label, $format) = @_;
+
+$format = "%m/%d/%Y" unless $format;
+$label = $name unless $label;
+
+</%init>
+
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 @@
<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>
+
</TABLE></TD></TR></TABLE>