usability: don't offer 'Select agent' choice if the dropdown already has a value
[freeside.git] / httemplate / edit / cust_main.cgi
index b081ad4..579d6cf 100755 (executable)
 <!-- 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
+             )
+   %>
 % }