diff options
Diffstat (limited to 'httemplate/elements/select-torrus_serviceid.html')
-rw-r--r-- | httemplate/elements/select-torrus_serviceid.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/httemplate/elements/select-torrus_serviceid.html b/httemplate/elements/select-torrus_serviceid.html new file mode 100644 index 000000000..e13a6e80d --- /dev/null +++ b/httemplate/elements/select-torrus_serviceid.html @@ -0,0 +1,24 @@ +<SELECT NAME="<% $opt{'field'} || 'serviceid' %>"> + +% unless ( $opt{'multiple'} || $opt{'disable_empty'} ) { + <OPTION VALUE="">Select serviceid</OPTION> +% } + +% foreach my $serviceid ( @serviceids ) { + <OPTION VALUE="<%$serviceid%>" + <% $serviceid eq $value ? 'SELECTED' : '' %> + ><% $serviceid %></OPTION> +% } + +</SELECT> + +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $nms = new FS::NetworkMonitoringSystem; +my @serviceids = $nms->torrus_serviceids; + +</%init> |