[interchange-cvs] interchange - heins modified lib/Vend/Form.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Mon Oct 14 16:06:03 2002
User: heins
Date: 2002-10-14 20:05:34 GMT
Modified: lib/Vend Form.pm
Log:
* Make option_format widget honor height.
Revision Changes Path
2.19 +5 -3 interchange/lib/Vend/Form.pm
rev 2.19, prev_rev 2.18
Index: Form.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Form.pm,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -r2.18 -r2.19
--- Form.pm 27 Jun 2002 22:24:10 -0000 2.18
+++ Form.pm 14 Oct 2002 20:05:33 -0000 2.19
@@ -1,6 +1,6 @@
# Vend::Form - Generate Form widgets
#=20
-# $Id: Form.pm,v 2.18 2002/06/27 22:24:10 jon Exp $
+# $Id: Form.pm,v 2.19 2002/10/14 20:05:33 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -37,7 +37,7 @@
require Exporter;
@ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.18 $, 10);
+$VERSION =3D substr(q$Revision: 2.19 $, 10);
=20
@EXPORT =3D qw (
display
@@ -499,6 +499,8 @@
my @opts =3D split /\s*,\s*/, $val;
my $out =3D "<TABLE CELLPADDING=3D0 CELLSPACING=3D0><TR><TH><SMALL>Value<=
/SMALL></TH><TH ALIGN=3DLEFT COLSPAN=3D2><SMALL>Label</SMALL></TH></TR>";
my $done;
+ my $height =3D $opt->{height} || 5;
+ $height -=3D 2;
for(@opts) {
my ($v,$l) =3D split /\s*=3D\s*/, $_, 2;
next unless $l || length($v);
@@ -508,7 +510,7 @@
and $default =3D 1;
$out .=3D option_widget_box($name, $v, $l, $default, $width);
}
- while($done++ < 3) {
+ while($done++ < $height) {
$out .=3D option_widget_box($name, '', '', '', $width);
}
$out .=3D option_widget_box($name, '', '', '', $width);