UI spring cleaning: customer edit
authorIvan Kohler <ivan@freeside.biz>
Sun, 14 Jun 2015 20:59:11 +0000 (13:59 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sun, 14 Jun 2015 20:59:11 +0000 (13:59 -0700)
12 files changed:
httemplate/edit/cust_main.cgi
httemplate/edit/cust_main/basics.html
httemplate/edit/cust_main/company.html
httemplate/edit/cust_main/fax.html
httemplate/edit/cust_main/name.html
httemplate/edit/cust_main/phones.html
httemplate/elements/freeside.css
httemplate/elements/location.html
httemplate/elements/tr-select-agent.html
httemplate/elements/tr-select-cust_class.html
httemplate/elements/tr-select-cust_tag.html
httemplate/elements/tr-td-label.html

index b6f6b0d..38bae4f 100755 (executable)
@@ -40,7 +40,7 @@
 % }
 <BR>
 <TABLE> <TR>
-  <TD STYLE="width:650px">
+  <TD>
 %#; padding-right:2px; vertical-align:top">
     <FONT CLASS="fsinnerbox-title"><% mt('Billing address') |h %></FONT>
     <TABLE CLASS="fsinnerbox" WIDTH="100%">
@@ -58,7 +58,7 @@
 </TR>
 <TR><TD STYLE="height:14px"></TD></TR>
 <TR>
-  <TD STYLE="width:650px">
+  <TD>
     <FONT CLASS="fsinnerbox-title"><% mt('Service address') |h %></FONT>
     <INPUT TYPE="checkbox" 
            NAME="same"
index 1c5023d..2ca6f65 100644 (file)
     <INPUT TYPE="hidden" NAME="agentnum"      ID="agentnum" 
       VALUE="<% $agentnum %>">
     <TR>
-      <TD ALIGN="right"><% mt('Agent') |h %></TD>
+      <TH ALIGN="right"><% mt('Agent') |h %></TD>
       <TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
     </TR>
 
 
   <& /elements/tr-select-agent.html, 
                 'curr_value'    => $cust_main->agentnum,
-                'label'         => "<B>${r}".emt('Agent')."</B>",
+                'label'         => $r. emt('Agent'),
                 'empty_label'   => emt('Select agent'),
                 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
                 'viewall_right' => emt('None'), 
 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
 
     <TR>
-      <TD ALIGN="right"><% mt('Customer identifier') |h %></TD>
+      <TH ALIGN="right"><% mt('Customer identifier') |h %></TD>
       <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
     </TR>
 
 %#sales person
 <& /elements/tr-select-sales.html,
      'curr_value' => $cust_main->salesnum,
+     'th' => 1,
 &>
 
 %# referral (advertising source)
 
   <& /elements/tr-select-part_referral.html,
                 'curr_value' => $refnum,
-                'label'      => "<B>${r}".emt('Advertising source')."</B>"
+                'label'      => $r. emt('Advertising source'),
   &>
 % } 
 
 %) {
 
   <TR>
-    <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
+    <TH ALIGN="right"><% mt('Referring customer') |h %></TD>
     <TD>
       <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %></A>
     </TD>
 % } elsif ( ! $conf->exists('disable_customer_referrals') ) { 
 
   <TR>
-    <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
+    <TH ALIGN="right"><% mt('Referring customer') |h %></TD>
     <TD>
       <& /elements/search-cust_main.html,
                     'field_name' => 'referral_custnum',
index 8a6ed0b..50c4f70 100644 (file)
@@ -1,6 +1,6 @@
 % my $cust_main = shift;
 <TR ID="company_row" <% $cust_main->company ? '' : 'STYLE="display:none"' %>>
-  <TD ALIGN="right"><% mt('Company') |h %></TD>
+  <TH ALIGN="right"><% mt('Company') |h %></TD>
   <TD COLSPAN=6><INPUT TYPE="text" NAME="company" ID="company" SIZE=60
              VALUE="<% $cust_main->company |h %>">
   </TD>
index 237d4be..c3e9917 100644 (file)
@@ -1,5 +1,5 @@
 % my $cust_main = shift;
 <TR>
-  <TD ALIGN="right"><% mt('Fax') |h %></TD>
+  <TH ALIGN="right"><% mt('Fax') |h %></TD>
   <TD><INPUT TYPE="text" NAME="fax" VALUE="<% $cust_main->fax %>" SIZE=18></TD>
 </TR>
index 74b2a7b..bc55801 100644 (file)
@@ -2,12 +2,12 @@
 % my ($field, $value, $label, $extra) = @_;
 <DIV STYLE="display: inline-block">
   <INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>>
-  <BR><FONT SIZE=-1><% mt($label) %></FONT>
+  <BR><FONT SIZE="-1" COLOR="#333333"><% mt($label) %></FONT>
 </DIV>
 </%def>
 
 <TR>
-  <TD CLASS="required label"><% mt('Contact name') |h %></TD>
+  <TH CLASS="required label" ALIGN="right"><% mt('Contact name') |h %></TD>
   <TD COLSPAN=6 STYLE="vertical-align:top">
         <& .namepart, 'last', $cust_main->last, 'Last', ',' &>
         <& .namepart, 'first', $cust_main->first, 'First' &>
@@ -21,7 +21,7 @@
 </TR>
 % if ( $conf->exists('cust_main-enable_spouse') ) {
 <TR ID="spouse_row">
-  <TD CLASS="label"><% mt('Spouse\'s name') |h %></TD>
+  <TH CLASS="label"><% mt('Spouse\'s name') |h %></TD>
   <TD COLSPAN=6>
         <& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &>
         <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &>
@@ -31,7 +31,7 @@
 
 % if ( $conf->exists('cust-email-high-visibility') ) {
 <TR>
-  <TD ALIGN="right" CLASS="
+  <TH ALIGN="right" CLASS="
     <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
         ? 'required label'
         : 'label' %>">Email address(es)
index 9b23e07..fa915f5 100644 (file)
@@ -1,5 +1,5 @@
 <TR>
-  <TD VALIGN="top" ALIGN="right"><% mt('Phones') |h %></TD>
+  <TH VALIGN="top" ALIGN="right"><% mt('Phones') |h %></TD>
   <TD COLSPAN=6>
     <TABLE CELLSPACING=0 CELLPADDING=0>
       <TR>
@@ -10,7 +10,7 @@
                  VALUE="<% $cust_main->get($phone) %>"
                  SIZE=18
           >
-          <BR><FONT SIZE=-1><% mt($phone_label{$phone}) |h %></FONT>
+          <BR><FONT SIZE=-1 COLOR="#333333"><% mt($phone_label{$phone}) |h %></FONT>
         </TD>
         <TD>&nbsp;</TD>
 % }
index 8e493eb..ece57a0 100644 (file)
@@ -228,13 +228,13 @@ div.fstabcontainer {
 .fsinnerbox {
   /* background-color:#cccccc; */
   padding:2px;
-  border: 1px solid #cccccc;
+  border: 1px solid #999999;
   border-radius: 2px;
 }
 
 .fsinnerbox th {
   font-weight:normal;
-  font-size:75%;
+  font-size:80%;
   valign: bottom;
   color: #666666;
 }
index 357a91d..a7803c8 100644 (file)
@@ -44,7 +44,7 @@ Example:
 % if ( $label_prefix eq '_location' ) {
 
     <TR>
-      <TD ALIGN="right" ><% $opt{'locationname_label'} || emt('Location ID') %></TD>
+      <TH ALIGN="right" ><% $opt{'locationname_label'} || emt('Location ID') %></TD>
       <TD COLSPAN=7>
         <INPUT TYPE     = "text"
                NAME     = "<%$pre%>locationname"
@@ -81,7 +81,7 @@ Example:
 % if ( ! $opt{'alt_format'} ) { #regular format
 
 <TR>
-      <TD ALIGN="right"><FONT ID="<% $pre %>address2_required" color="#ff0000" <% $address2_label_style %>>*</FONT>&nbsp;<FONT ID="<% $pre %>address2_label" <% $address2_label_style %>><B>Unit&nbsp;#</B></FONT></TD>
+      <TH ALIGN="right"><FONT ID="<% $pre %>address2_required" color="#ff0000" <% $address2_label_style %>>*</FONT>&nbsp;<FONT ID="<% $pre %>address2_label" <% $address2_label_style %>><B>Unit&nbsp;#</B></FONT></TD>
       <TD COLSPAN=7>
         <INPUT TYPE     = "text"
                NAME     = "<%$pre%>address2"
@@ -203,7 +203,7 @@ Example:
 
 % if ( $opt{enable_coords} ) {
 <TR>
-  <TD ALIGN="right"><% mt('Latitude') |h %></TD>
+  <TH ALIGN="right"><% mt('Latitude') |h %></TD>
   <TD COLSPAN=7>
     <INPUT TYPE  = "text"
            NAME  = "<%$pre%>latitude"
@@ -212,7 +212,7 @@ Example:
            <% $disabled %>
            <% $style %>
     >
-    <% mt('Longitude') |h %>
+    <FONT SIZE="-1" COLOR="#666666"><% mt('Longitude') |h %></FONT>
     <INPUT TYPE  = "text"
            NAME  = "<%$pre%>longitude"
            ID    = "<%$pre%>longitude"
@@ -234,13 +234,13 @@ Example:
 %
 % if ( $opt{enable_censustract} ) {
 <TR>
-  <TD ALIGN="right">Census&nbsp;tract</TD>
+  <TH ALIGN="right">Census&nbsp;tract</TD>
   <TD COLSPAN=8>
     <INPUT TYPE="text" SIZE=15
            ID="<% $pre %>enter_censustract" 
            NAME="<% $pre %>enter_censustract" 
            VALUE="<% $object->censustract |h %>">
-    <% '(automatic)' %>
+    <FONT SIZE="-1" COLOR="#333333"><% '(automatic)' %></FONT>
   </TD>
 </TR>
 % }
index 321bd6b..04600fa 100644 (file)
@@ -32,7 +32,7 @@ Example:
 
 %   if ( scalar(@agents) != 1 ) {
       <TR>
-        <TD ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
+        <TH ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
         <TD BGCOLOR="#dddddd" <% $colspan %>>
 %         my $agent = qsearchs('agent', { 'agentnum' => $agentnum });
           <% $agent ? $agent->agent : '(all)' |h %>
@@ -47,7 +47,7 @@ Example:
 % } else { 
 
   <TR>
-    <TD ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
+    <TH ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
     <TD <% $colspan %>>
       <& /elements/select-agent.html,
                      'curr_value' => $agentnum,
index 54a11d7..7a23215 100644 (file)
@@ -5,7 +5,7 @@
 % } else { 
 
   <TR>
-    <TD ALIGN="right"><% $opt{'label'} || 'Customer class' %></TD>
+    <TH ALIGN="right"><% $opt{'label'} || 'Customer class' %></TD>
     <TD>
       <% include( '/elements/select-cust_class.html',
                     'curr_value' => $classnum,
index 76b1b71..b133dcc 100644 (file)
@@ -1,7 +1,7 @@
 % if ( ($curuser->access_right('Edit customer tags') && @part_tag) || $is_report ) {
 
   <TR>
-    <TD ALIGN="right"><% $opt{'label'} || 'Tags' %></TD>
+    <TH ALIGN="right"><% $opt{'label'} || 'Tags' %></TD>
     <TD>
       <% include( '/elements/select-cust_tag.html',
                      'curr_value' => \@curr_tagnum,
index c318722..78690f1 100644 (file)
@@ -1,6 +1,11 @@
+<%doc>
+
+Actually <TR> <TH> $label </TH>
+
+</%doc>
 <TR>
 
-  <TD ALIGN  = "right"
+  <TH ALIGN  = "right"
       VALIGN = "<% $opt{'valign'} || 'top' %>"
       STYLE  = "<% $style %>"
       ID     = "<% $opt{label_id} || $opt{id}. '_label0' %>"