configurable alternate field order for cust edit, RT13102
authorlevinse <levinse>
Fri, 3 Jun 2011 04:36:48 +0000 (04:36 +0000)
committerlevinse <levinse>
Fri, 3 Jun 2011 04:36:48 +0000 (04:36 +0000)
FS/FS/Conf.pm
httemplate/edit/cust_main/contact.html

index 66616a0..186d828 100644 (file)
@@ -4451,6 +4451,13 @@ and customer address. Include units.',
     'description' => 'Move the invoicing e-mail address field to the top of the billing address section and highlight it.',
     'type'        => 'checkbox',
   },
+  
+  {
+    'key'         => 'cust-edit-alt-field-order',
+    'section'     => 'UI',
+    'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
+    'type'        => 'checkbox',
+  },
 
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
index a53c789..3dd24aa 100644 (file)
@@ -29,6 +29,7 @@
     </TR>
 % }
 
+% unless ( $conf->exists('cust-edit-alt-field-order') ) {
 <TR>
   <TD ALIGN="right"><% mt('Company') |h %></TD>
   <TD COLSPAN=7>
   </TD>
 </TR>
 
+% } else {
+
+<TR>
+  <TD ALIGN="right"><% $daytime_label %></TD>
+  <TD COLSPAN=5>
+    <INPUT TYPE="text" NAME="<%$pre%>daytime" VALUE="<% $cust_main->get($pre.'daytime') %>" SIZE=18 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+  </TD>
+</TR>
+
+<TR>
+  <TD ALIGN="right"><% $night_label %></TD>
+  <TD COLSPAN=5>
+    <INPUT TYPE="text" NAME="<%$pre%>night" VALUE="<% $cust_main->get($pre.'night') %>" SIZE=18 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+  </TD>
+</TR>
+
+<& /elements/location.html,
+             'prefix'       => $pre,
+             'object'       => $cust_main,
+             'onchange'     => $onchange,
+             'disabled'     => $disabled,
+             'style'        => \@style,
+             'same_checked' => $opt{'same_checked'},
+             'geocode'      => $opt{'geocode'},
+             'censustract'  => $opt{'censustract'},
+&>
+
+<TR>
+  <TD ALIGN="right"><% mt('Fax') |h %></TD>
+  <TD COLSPAN=5>
+    <INPUT TYPE="text" NAME="<%$pre%>fax" VALUE="<% $cust_main->get($pre.'fax') %>" SIZE=12 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+  </TD>
+</TR>
+
+<TR>
+  <TD ALIGN="right"><% mt('Company') |h %></TD>
+  <TD COLSPAN=7>
+    <INPUT TYPE="text" NAME="<%$pre%>company" VALUE="<% $cust_main->get($pre.'company') |h %>" SIZE=70 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+  </TD>
+</TR>
+
+% }
+
 % if ( $conf->exists('show_stateid') && !$pre ) { 
 
 <TR>