[freeside-commits] freeside/httemplate/edit/cust_main contact.html, 1.6, 1.6.2.1

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Apr 24 15:36:26 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail:/tmp/cvs-serv9590/httemplate/edit/cust_main

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	contact.html 
Log Message:
1528 add driver's license field, mask it and ssn (backport)

Index: contact.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/contact.html,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- contact.html	27 Dec 2006 02:37:17 -0000	1.6
+++ contact.html	24 Apr 2007 22:36:24 -0000	1.6.2.1
@@ -9,10 +9,10 @@
 % if ( $conf->exists('show_ss') && !$pre ) { 
 
   <TD ALIGN="right">SS#</TD>
-  <TD><INPUT TYPE="text" NAME="ss" VALUE="<% $cust_main->ss %>" SIZE=11></TD>
+  <TD><INPUT TYPE="text" NAME="ss" VALUE="<% $opt{ss} %>" SIZE=11></TD>
 % } elsif ( !$pre ) { 
 
-  <TD><INPUT TYPE="hidden" NAME="ss" VALUE="<% $cust_main->ss %>"></TD>
+  <TD><INPUT TYPE="hidden" NAME="ss" VALUE="<% $opt{ss} %>"></TD>
 % } 
 
 
@@ -84,14 +84,35 @@
   </TD>
 </TR>
 
+% if ( $conf->exists('show_stateid') && !$pre ) {
+
+<TR>
+  <TD ALIGN="right"><% $stateid_label %></TD>
+  <TD><INPUT TYPE="text" NAME="stateid" VALUE="<% $opt{stateid} %>" SIZE=12 onChange="<% $onchange %>" <% $disabled %>></TD>
+  <TD ALIGN="right"><% $stateid_state_label %></TD>
+  <TD><% include('select-state.html', 'state'    => $cust_main->stateid_state,
+                                      'country'  => $cust_main->country,
+                                      'prefix'   => 'stateid_',
+                                      'onchange' => $onchange,
+                                      'disabled' => $disabled) %></TD>
+</TR>
+% } elsif (!$pre) {
+  <TD><INPUT TYPE="hidden" NAME="stateid" VALUE="<% $opt{stateid} %>"></TD>
+  <TD><INPUT TYPE="hidden" NAME="stateid_state" VALUE="<% $cust_main->stateid_state %>"></TD>
+% }
+
 </TABLE>
 <%$r%>required fields<BR>
 
 <%init>
 
-my( $cust_main, $pre, $onchange, $disabled ) = @_;
+my( $cust_main, $pre, $onchange, $disabled, %opt ) = @_;
 my $conf = new FS::Conf;
 
+foreach (qw(ss stateid)) {
+  $opt{$_} = $cust_main->masked($_) unless exists $opt{$_};
+}
+
 #false laziness with ship state
 my $countrydefault = $conf->config('countrydefault') || 'US';
 $cust_main->set($pre.'country', $countrydefault )
@@ -103,6 +124,9 @@
   unless $cust_main->get($pre.'state')
          || $cust_main->get($pre.'country') ne $countrydefault;
 
+$cust_main->set('stateid_state', $cust_main->state )
+  unless $pre || $cust_main->get('stateid_state');
+
 #my($county_html, $state_html, $country_html) =
 #  FS::cust_main_county::regionselector( $cust_main->get($pre.'county'),
 #                                        $cust_main->get($pre.'state'),
@@ -128,6 +152,8 @@
 
 my $daytime_label = FS::Msgcat::_gettext('daytime') || 'Day Phone';
 my $night_label = FS::Msgcat::_gettext('night') || 'Night Phone';
+my $stateid_label = FS::Msgcat::_gettext('stateid') || 'Driver&rsquo;s License';
+my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') || 'Driver&rsquo;s License State';
 
 my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
 



More information about the freeside-commits mailing list