[Bps-public-commit] r12969 - in RT-FormTools: .
falcone at bestpractical.com
falcone at bestpractical.com
Fri Jun 6 11:48:27 EDT 2008
Author: falcone
Date: Fri Jun 6 11:48:23 2008
New Revision: 12969
Modified:
RT-FormTools/ (props changed)
RT-FormTools/html/FormTools/Field
Log:
r33859 at ketch: falcone | 2008-06-06 11:44:24 -0400
* handle default values for Dates
Modified: RT-FormTools/html/FormTools/Field
==============================================================================
--- RT-FormTools/html/FormTools/Field (original)
+++ RT-FormTools/html/FormTools/Field Fri Jun 6 11:48:23 2008
@@ -30,6 +30,7 @@
$field_label ||= $cf->Name;
}
+
unless ( $default ) {
my $request_args = $m->request_args();
if ( $field_type eq 'core' && $request_args->{$name} ) {
@@ -100,7 +101,8 @@
% }
% } elsif ($render_as =~ /^date/i) {
-<& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0 &>
+<& /Elements/SelectDate, Name => $NamePrefix.$cf->Id."-Values", current => 0,
+ ($default ? (Default => $default) : ()) &>
% } else {
% die "'$render_as' isn't a valid rendering option for field '$name'";
%}
More information about the Bps-public-commit
mailing list