[freeside-commits] freeside/httemplate/edit/elements edit.html, 1.17, 1.18
Jeff Finucane,420,,
jeff at wavetail.420.am
Sun Apr 6 09:12:48 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv8622/httemplate/edit/elements
Modified Files:
edit.html
Log Message:
new tax rating engine
Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- edit.html 10 Jan 2008 21:53:49 -0000 1.17
+++ edit.html 6 Apr 2008 16:12:46 -0000 1.18
@@ -97,6 +97,9 @@
#run when adding
'new_callback' => sub { my( $cgi, $object, $fields_listref ) = @_; },
+ #run before display to return a different value
+ 'value_callback' => sub { my( $columname, $value } ) = @_; },
+
#XXX describe
'field_callback' => sub { },
@@ -273,7 +276,10 @@
% #$field .= $fieldnum;
% $onchange .= "\nspawn_$field(what);";
% } else {
-% $curr_value = $object->$field();
+% $curr_value =
+% ($opt{'value_callback'} && $mode ne 'error')
+% ? &{ $opt{'value_callback'} }( $f->{'field'}, $object->$field() )
+% : $object->$field();
% }
%
% my @include = &{ $include_sub }(
More information about the freeside-commits
mailing list