diff options
Diffstat (limited to 'httemplate/elements/select-torrus_serviceid.html')
-rw-r--r-- | httemplate/elements/select-torrus_serviceid.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/httemplate/elements/select-torrus_serviceid.html b/httemplate/elements/select-torrus_serviceid.html index a8cfca8b8..34e8e930f 100644 --- a/httemplate/elements/select-torrus_serviceid.html +++ b/httemplate/elements/select-torrus_serviceid.html @@ -5,7 +5,9 @@ % } % foreach my $serviceid ( keys %serviceid ) { - <OPTION VALUE="<%$serviceid%>"><% $serviceid %></OPTION> + <OPTION VALUE="<%$serviceid%>" + <% $serviceid eq $value ? 'SELECTED' : '' %> + ><% $serviceid %></OPTION> % } </SELECT> @@ -14,6 +16,8 @@ my %opt = @_; +my $value = $opt{'curr_value'} || $opt{'value'}; + #is this going to get too slow or will the index make it okay? my $sth = dbh->prepare("SELECT DISTINCT(serviceid) FROM srvexport") or die dbh->errstr; |