Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / elements / select-torrus_serviceid.html
1 <SELECT NAME="<% $opt{'field'} || 'serviceid' %>">
2
3 % unless ( $opt{'multiple'} || $opt{'disable_empty'} ) {
4   <OPTION VALUE="">Select serviceid</OPTION>
5 % }
6
7 % foreach my $serviceid ( @serviceids ) {
8     <OPTION VALUE="<%$serviceid%>"
9             <% $serviceid eq $value ? 'SELECTED' : '' %>
10     ><% $serviceid %></OPTION>
11 % } 
12
13 </SELECT>
14
15 <%init>
16
17 my %opt = @_;
18
19 my $value = $opt{'curr_value'} || $opt{'value'};
20
21 my $nms = new FS::NetworkMonitoringSystem;
22 my @serviceids = $nms->torrus_serviceids;
23
24 </%init>