[freeside-commits]
freeside/httemplate/edit/elements edit.html, 1.9, 1.10
Ivan,,,
ivan at wavetail.420.am
Thu Dec 28 23:23:23 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail:/tmp/cvs-serv1756
Modified Files:
edit.html
Log Message:
document field types
Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- edit.html 18 Oct 2006 23:07:07 -0000 1.9
+++ edit.html 29 Dec 2006 07:23:21 -0000 1.10
@@ -15,9 +15,13 @@
% # 'fields' => [
% # 'columname',
% # { 'field' => 'another_columname',
-% # 'type' => 'text', #text, fixed, hidden, checkbox
-% # #eventually more for <SELECT>, etc.
-% # 'value' => 'Y', #only for checkbox
+% # 'type' => 'text', #text
+% # #checkbox
+% # #select
+% # #hidden - hidden value from object
+% # #fixed - display fixed value from here
+% # #fixedhidden - hidden value from here
+% # 'value' => 'Y', #for checkbox, fixed, fixedhidden
% # },
% # ]
% #
@@ -156,22 +160,24 @@
: $field
%>
</TD>
-% 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 'fixedhidden' ) {
+% } elsif ( $type eq 'fixedhidden' ) {
<INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% $f->{'value'} %>">
-% } elsif ( $type eq 'checkbox' ) {
+% } elsif ( $type eq 'checkbox' ) {
<TD>
<INPUT TYPE="checkbox" NAME="<% $field %>" VALUE="<% $f->{'value'} %>" <% $object->$field() eq $f->{'value'} ? ' CHECKED' : '' %>>
</TD>
+
% } elsif ( $type eq 'select' ) {
+
<TD>
<SELECT NAME="<% $field %>"
% my $aref = $f->{'value'}{'values'};
@@ -183,18 +189,18 @@
% }
</SELECT>
</TD>
-% } else {
+% } else {
<TD>
<INPUT TYPE="<% $type %>" NAME="<% $field %>" VALUE="<% $object->$field() %>">
<TD>
-% }
+% }
</TR>
-% }
+% }
<% ref( $opt{'html_table_bottom'} )
? &{ $opt{'html_table_bottom'} }( $object )
More information about the freeside-commits
mailing list