[tools 1/2] testbot/web: Use the property descriptors in the Activity page.
The whole point is to pass them to _initialize() so FormPage::Validate() can then do its job. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- testbot/web/Activity.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl index 272215f95..d98f50a6c 100644 --- a/testbot/web/Activity.pl +++ b/testbot/web/Activity.pl @@ -45,7 +45,7 @@ sub _initialize($$$) my @PropertyDescriptors = ( CreateBasicPropertyDescriptor("Hours", "Hours", !1, 1, "N", 3), ); - $self->SUPER::_initialize($Request, $RequiredRole); + $self->SUPER::_initialize($Request, $RequiredRole, \@PropertyDescriptors); $self->{Method} = "get"; if (!$self->GetParam("Hours") or !$self->Validate() or -- 2.30.2
Note that this requires the list of property descriptors to always be set. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- Part of this patch escaped it and ended up in the FormPage reorganisation that caused trouble last week. --- testbot/lib/ObjectModel/CGI/FormPage.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm index 9e34a736d..2565c077b 100644 --- a/testbot/lib/ObjectModel/CGI/FormPage.pm +++ b/testbot/lib/ObjectModel/CGI/FormPage.pm @@ -117,8 +117,7 @@ sub GetPropertyDescriptorByName($$) { my ($self, $Name) = @_; - my $PropertyDescriptors = $self->GetPropertyDescriptors(); - foreach my $PropertyDescriptor (@{$PropertyDescriptors}) + foreach my $PropertyDescriptor (@{$self->GetPropertyDescriptors()}) { if ($PropertyDescriptor->GetName() eq $Name) { -- 2.30.2
participants (1)
-
Francois Gouget