[interchange-cvs] interchange - heins modified lib/Vend/Form.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sat May 10 14:39:53 UTC 2008
User: heins
Date: 2008-05-10 14:39:53 GMT
Modified: lib/Vend Form.pm
Log:
* Make date widget formatting shorthand apply to time widget as well.
* User widgets called time* are unaffected if they don't use a non-word
character in the callout.
* Examples:
time.ampm { type => 'time', ampm => 1 }
time.blank { type => 'time', blank => 1 }
time.8-23 { type => 'time', start_hour => 8, end_hour => 23 }
time.half { type => 'time', minutes => 'half_hourly' }
Revision Changes Path
2.76 interchange/lib/Vend/Form.pm
rev 2.76, prev_rev 2.75
Index: Form.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Form.pm,v
retrieving revision 2.75
retrieving revision 2.76
diff -u -r2.75 -r2.76
--- Form.pm 25 Mar 2008 17:13:21 -0000 2.75
+++ Form.pm 10 May 2008 14:39:53 -0000 2.76
@@ -1,6 +1,6 @@
# Vend::Form - Generate Form widgets
#
-# $Id: Form.pm,v 2.75 2008-03-25 17:13:21 jon Exp $
+# $Id: Form.pm,v 2.76 2008-05-10 14:39:53 mheins Exp $
#
# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -39,7 +39,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.75 $, 10);
+$VERSION = substr(q$Revision: 2.76 $, 10);
@EXPORT = qw (
display
@@ -1409,9 +1409,9 @@
$opt->{type} = 'text';
}
}
- elsif($type =~ /^date(.*)/i) {
- $opt->{type} = 'date';
- my $extra = $1;
+ elsif($type =~ /^(date|time)(.*)/i) {
+ $opt->{type} = lc $1;
+ my $extra = $2;
if ($extra) {
$opt->{time} = 1 if $extra =~ /time/i;
$opt->{ampm} = 1 if $extra =~ /ampm/i;
More information about the interchange-cvs
mailing list