Francois Gouget : testbot/CGI: Let FormPage::GenerateField() print the label as well as the input tag.
Alexandre Julliard
julliard at winehq.org
Mon Jun 16 04:17:04 CDT 2014
Module: tools
Branch: master
Commit: b49b22c6654e6699f04ceac3096ee8c8f0857427
URL: http://source.winehq.org/git/tools.git/?a=commit;h=b49b22c6654e6699f04ceac3096ee8c8f0857427
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Jun 13 18:27:10 2014 +0200
testbot/CGI: Let FormPage::GenerateField() print the label as well as the input tag.
---
testbot/lib/ObjectModel/CGI/FormPage.pm | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm
index 77c02b3..740b97e 100644
--- a/testbot/lib/ObjectModel/CGI/FormPage.pm
+++ b/testbot/lib/ObjectModel/CGI/FormPage.pm
@@ -148,14 +148,7 @@ sub GenerateFields($)
foreach my $PropertyDescriptor (@{$PropertyDescriptors})
{
my $Display = $self->DisplayProperty($PropertyDescriptor);
- if ($Display)
- {
- print "<div class='ItemProperty'><label>",
- $self->CGI->escapeHTML($self->GetDisplayName($PropertyDescriptor)) .
- "</label>";
- $self->GenerateField($PropertyDescriptor, $Display);
- print "</div>\n";
- }
+ $self->GenerateField($PropertyDescriptor, $Display) if ($Display);
}
}
@@ -231,6 +224,10 @@ sub GenerateField($$$)
{
my ($self, $PropertyDescriptor, $Display) = @_;
+ print "<div class='ItemProperty'><label>",
+ $self->CGI->escapeHTML($self->GetDisplayName($PropertyDescriptor)) .
+ "</label>";
+
my $Value = $self->GetDisplayValue($PropertyDescriptor);
if ($Display eq "rw")
{
@@ -303,6 +300,8 @@ sub GenerateField($$$)
print " ";
}
}
+
+ print "</div>\n";
}
sub GenerateRequired($$)
More information about the wine-cvs
mailing list