usability: don't offer 'Select agent' choice if the dropdown already has a value
[freeside.git] / httemplate / edit / cust_main.cgi
index d13732a..579d6cf 100755 (executable)
 % if ( $custnum ) { 
 
   Customer #<B><% $custnum %></B> - 
-  <B><FONT COLOR="<% $cust_main->statuscolor %>">
+  <B><FONT COLOR="#<% $cust_main->statuscolor %>">
     <% ucfirst($cust_main->status) %>
   </FONT></B>
   <BR><BR>
 <!-- agent -->
 
 <% include('/elements/tr-select-agent.html', 
-              'curr_value'  => $cust_main->agentnum,
-              'label'       => "<B>${r}Agent</B>",
-              'empty_label' => 'Select agent',
+              'curr_value'    => $cust_main->agentnum,
+              'label'         => "<B>${r}Agent</B>",
+              'empty_label'   => 'Select agent',
+              'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
            )
 %>
 
 % } else { 
 
 
-   <% include('/elements/tr-select-part_referral.html', $refnum ) %>
+   <% include('/elements/tr-select-part_referral.html',
+                'curr_value' => $refnum
+             )
+   %>
 % }