diff options
author | ivan <ivan> | 2011-01-24 02:59:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-01-24 02:59:48 +0000 |
commit | 407fe3e7c401c7d2a7d6c3d9a0b22415a6d0a095 (patch) | |
tree | 5296abae175abf64ceba90f32cfc8635072bab42 /httemplate/elements/select-torrus_serviceid.html | |
parent | 69b3b149f2a83cf280022388b1cd37e62990c721 (diff) |
torrus, RT#10574
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; |