[interchange-cvs] interchange - heins modified lib/Vend/Form.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun Jun 6 23:18:20 EDT 2004
User: heins
Date: 2004-06-07 03:18:19 GMT
Modified: lib/Vend Form.pm
Log:
* Make hidden_text widget honor display_filter attribute, which allows
a listed value like a timestamp to be filtered for a human readable
date display.
Revision Changes Path
2.44 +10 -3 interchange/lib/Vend/Form.pm
rev 2.44, prev_rev 2.43
Index: Form.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Form.pm,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -r2.43 -r2.44
--- Form.pm 22 Feb 2004 19:28:37 -0000 2.43
+++ Form.pm 7 Jun 2004 03:18:19 -0000 2.44
@@ -1,6 +1,6 @@
# Vend::Form - Generate Form widgets
#
-# $Id: Form.pm,v 2.43 2004/02/22 19:28:37 mheins Exp $
+# $Id: Form.pm,v 2.44 2004/06/07 03:18:19 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -38,7 +38,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.43 $, 10);
+$VERSION = substr(q$Revision: 2.44 $, 10);
@EXPORT = qw (
display
@@ -162,7 +162,7 @@
.
qq({EXTRA?} {EXTRA}{/EXTRA?})
.
- qq(>{ENCODED}{APPEND})
+ qq(>{FILTERED?}{FILTERED}{/FILTERED?}{FILTERED:}{ENCODED}{/FILTERED:}{APPEND})
,
boxstd =>
qq(<input type="{VARIANT}" name="{NAME}" value="{TVALUE}")
@@ -1212,6 +1212,13 @@
}
$opt->{encoded} = encode($opt->{value}, $ESCAPE_CHARS::std);
+ if($opt->{display_filter}) {
+ my $newv = Vend::Interpolate::filter_value(
+ $opt->{display_filter},
+ $opt->{value},
+ );
+ $opt->{filtered} = encode($newv, $ESCAPE_CHARS::std);
+ }
$opt->{value} =~ s/[/\[/g if $opt->{enable_itl};
if($opt->{class}) {
More information about the interchange-cvs
mailing list