diff options
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r-- | httemplate/edit/elements/edit.html | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index f79cc0b24..c40a00492 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -15,7 +15,9 @@ # 'fields' => [ # 'columname', # { 'field' => 'another_columname', - # 'type' => 'text', #text, fixed, hidden + # 'type' => 'text', #text, fixed, hidden, checkbox + # #eventually more for <SELECT>, etc. + # 'value' => 'Y', #only for checkbox # }, # ] # @@ -150,14 +152,17 @@ %> </TD> - <% - #eventually more options for <SELECT>, etc. fields - if ( $type eq 'fixed' ) { - %> + <% if ( $type eq 'fixed' ) { %> <TD BGCOLOR="#dddddd"><%= $f->{'value'} %></TD> <INPUT TYPE="hidden" NAME="<%= $field %>" VALUE="<%= $f->{'value'} %>"> + <% } elsif ( $type eq 'checkbox' ) { %> + + <TD> + <INPUT TYPE="checkbox" NAME="<%= $field %>" VALUE="<%= $f->{'value'} %>" <%= $object->$field() eq $f->{'value'} ? ' CHECKED' : '' %>> + </TD> + <% } else { %> <TD> |