[interchange-cvs] interchange - jon modified lib/Vend/Form.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Tue Sep 19 14:48:43 EDT 2006


User:      jon
Date:      2006-09-19 18:48:43 GMT
Modified:  lib/Vend Form.pm
Log:
Allow year_end to be less than year_begin so that years in the date widget
can be shown in reverse order.

Patch from Bill Carr. Thanks!

Revision  Changes    Path
2.68      +3 -3      interchange/lib/Vend/Form.pm


rev 2.68, prev_rev 2.67
Index: Form.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Form.pm,v
retrieving revision 2.67
retrieving revision 2.68
diff -u -u -r2.67 -r2.68
--- Form.pm	8 Mar 2006 18:22:08 -0000	2.67
+++ Form.pm	19 Sep 2006 18:48:43 -0000	2.68
@@ -1,6 +1,6 @@
 # Vend::Form - Generate Form widgets
 # 
-# $Id: Form.pm,v 2.67 2006/03/08 18:22:08 jon Exp $
+# $Id: Form.pm,v 2.68 2006/09/19 18:48:43 jon Exp $
 #
 # Copyright (C) 2002-2006 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -39,7 +39,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.67 $, 10);
+$VERSION = substr(q$Revision: 2.68 $, 10);
 
 @EXPORT = qw (
 	display
@@ -506,7 +506,7 @@
 		if($ey < 100) {
 			$ey += $cy;
 		}
-		@Years = ($by .. $ey);
+		@Years = $by <= $ey ? ($by .. $ey) : reverse ($ey .. $by);
 	}
 	if ($opt->{blank}) {
 		$out .= qq{<option value="0000"$opt_extra>----</option>};








More information about the interchange-cvs mailing list