summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-torrus_serviceid.html
diff options
context:
space:
mode:
authorivan <ivan>2011-01-24 02:59:48 +0000
committerivan <ivan>2011-01-24 02:59:48 +0000
commit407fe3e7c401c7d2a7d6c3d9a0b22415a6d0a095 (patch)
tree5296abae175abf64ceba90f32cfc8635072bab42 /httemplate/elements/select-torrus_serviceid.html
parent69b3b149f2a83cf280022388b1cd37e62990c721 (diff)
torrus, RT#10574
Diffstat (limited to 'httemplate/elements/select-torrus_serviceid.html')
-rw-r--r--httemplate/elements/select-torrus_serviceid.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/httemplate/elements/select-torrus_serviceid.html b/httemplate/elements/select-torrus_serviceid.html
index a8cfca8..34e8e93 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;