summaryrefslogtreecommitdiff
path: root/httemplate/edit/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r--httemplate/edit/elements/edit.html16
1 files changed, 13 insertions, 3 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index 17c5ad3eb..22143a3f0 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -187,12 +187,20 @@
</TD>
% } elsif ( $type eq 'select' ) {
+%
+% my $aref = $f->{'value'}{'values'};
+% my $vkey = $f->{'value'}{'vcolumn'};
+% my $ckey = $f->{'value'}{'ccolumn'};
+%
+% if (scalar(@$aref) == 1) {
+
+ <TD BGCOLOR="#dddddd"><% @$aref[0]->$ckey %></TD>
+ <INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% @$aref[0]->$vkey %>">
+
+% }else{
<TD>
<SELECT NAME="<% $field %>"
-% my $aref = $f->{'value'}{'values'};
-% my $vkey = $f->{'value'}{'vcolumn'};
-% my $ckey = $f->{'value'}{'ccolumn'};
% foreach my $v (@$aref) {
<OPTION <% ($object->$field() eq $v->$vkey) ? 'SELECTED' : '' %>
VALUE="<% $v->$vkey %>"><% $v->$ckey %></OPTION>
@@ -200,6 +208,8 @@
</SELECT>
</TD>
+% }
+
% } else {
<TD>