[freeside-commits]
freeside/httemplate/edit/elements edit.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Sun May 14 09:47:32 PDT 2006
- Previous message: [freeside-commits] freeside/httemplate autohandler, 1.3,
1.4 index.html, 1.98, 1.99
- Next message: [freeside-commits] freeside/httemplate/browse access_group.html,
NONE, 1.1 access_user.html, NONE, 1.1 agent_type.cgi, 1.14,
1.15 cust_main_county.cgi, 1.13, 1.14 msgcat.cgi, 1.3,
1.4 part_pkg.cgi, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail:/tmp/cvs-serv14201/httemplate/edit/elements
Modified Files:
edit.html
Log Message:
first part of ACL and re-skinning work and some other small stuff
Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- edit.html 22 Apr 2006 00:58:39 -0000 1.2
+++ edit.html 14 May 2006 16:47:30 -0000 1.3
@@ -17,6 +17,13 @@
# 'menubar' => '', #menubar arrayref
#
# 'viewall_dir' => '', #'search' or 'browse', defaults to 'search'
+ #
+ # 'html_bottom' => '', #string
+ # 'html_bottom' => sub {
+ # my $object = shift;
+ # # ...
+ # "html_string";
+ # },
my(%opt) = @_;
@@ -27,6 +34,7 @@
my $fields = $opt{'fields'}
#|| [ grep { $_ ne $pkey } dbdef->table($table)->columns ];
|| [ grep { $_ ne $pkey } fields($table) ];
+ #my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields;
my $object;
if ( $cgi->param('error') ) {
@@ -63,10 +71,7 @@
);
}
-%>
-
-
-<%= include("/elements/header.html", $title,
+%><%= include("/elements/header.html", $title,
include( '/elements/menubar.html', @menubar )
)
%>
@@ -86,7 +91,18 @@
<%= ntable("#cccccc",2) %>
-<% foreach my $field ( @$fields ) { %>
+<% foreach my $f ( @$fields ) {
+
+ my( $field, $type);
+ if ( ref($f) ) {
+ $field = $f->{'field'},
+ $type = $f->{'type'} || 'text',
+ } else {
+ $field = $f;
+ $type = 'text';
+ }
+
+%>
<TR>
@@ -98,12 +114,11 @@
</TD>
<%
- #just text in one size for now... eventually more options for
- # uneditable, hidden, <SELECT>, etc. fields
+ #eventually more options for <SELECT>, etc. fields
%>
<TD>
- <INPUT TYPE="text" NAME="<%= $field %>" VALUE="<%= $object->$field() %>">
+ <INPUT TYPE="<%= $type %>" NAME="<%= $field %>" VALUE="<%= $object->$field() %>">
<TD>
</TR>
@@ -112,6 +127,11 @@
</TABLE>
+<%= ref( $opt{'html_bottom'} )
+ ? &{ $opt{'html_bottom'} }( $object )
+ : $opt{'html_bottom'}
+%>
+
<BR>
<INPUT TYPE="submit" VALUE="<%= $object->$pkey() ? "Apply changes" : "Add $opt{'name'}" %>">
- Previous message: [freeside-commits] freeside/httemplate autohandler, 1.3,
1.4 index.html, 1.98, 1.99
- Next message: [freeside-commits] freeside/httemplate/browse access_group.html,
NONE, 1.1 access_user.html, NONE, 1.1 agent_type.cgi, 1.14,
1.15 cust_main_county.cgi, 1.13, 1.14 msgcat.cgi, 1.3,
1.4 part_pkg.cgi, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list