Francois Gouget : testbot/web: Override the default form actions instead of appending.
Alexandre Julliard
julliard at winehq.org
Thu Mar 3 15:56:01 CST 2022
Module: tools
Branch: master
Commit: fab2daeeb946025602af122f7ff0d024cee52c3b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=fab2daeeb946025602af122f7ff0d024cee52c3b
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Mar 3 18:16:32 2022 +0100
testbot/web: Override the default form actions instead of appending.
Note that the parent FormPage class has no action anyway.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/Feedback.pl | 8 ++------
testbot/web/ForgotPassword.pl | 8 ++------
testbot/web/Login.pl | 5 +----
testbot/web/ResetPassword.pl | 8 ++------
testbot/web/Stats.pl | 7 ++-----
testbot/web/Submit.pl | 28 +++++-----------------------
testbot/web/admin/Log.pl | 8 ++------
testbot/web/admin/SpecialJobs.pl | 7 ++-----
8 files changed, 18 insertions(+), 61 deletions(-)
diff --git a/testbot/web/Feedback.pl b/testbot/web/Feedback.pl
index b43397f..9eba086 100644
--- a/testbot/web/Feedback.pl
+++ b/testbot/web/Feedback.pl
@@ -72,12 +72,8 @@ sub GetHeaderText($)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Send";
-
- return $Actions;
+ #my ($self) = @_;
+ return ["Send"];
}
sub OnSend($)
diff --git a/testbot/web/ForgotPassword.pl b/testbot/web/ForgotPassword.pl
index 4e1c508..cc0cd45 100644
--- a/testbot/web/ForgotPassword.pl
+++ b/testbot/web/ForgotPassword.pl
@@ -58,12 +58,8 @@ sub GetHeaderText($)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Reset password";
-
- return $Actions;
+ #my ($self) = @_;
+ return ["Reset password"];
}
sub OnResetPassword($)
diff --git a/testbot/web/Login.pl b/testbot/web/Login.pl
index 3c93dd8..ef3f4cb 100644
--- a/testbot/web/Login.pl
+++ b/testbot/web/Login.pl
@@ -89,10 +89,7 @@ sub GetActions($)
{
my ($self) = @_;
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Log in";
-
- return $Actions;
+ return ["Log in"];
}
sub OnLogIn($)
diff --git a/testbot/web/ResetPassword.pl b/testbot/web/ResetPassword.pl
index 1e2b94d..81655e0 100644
--- a/testbot/web/ResetPassword.pl
+++ b/testbot/web/ResetPassword.pl
@@ -73,12 +73,8 @@ sub GetInputType($$)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Change password";
-
- return $Actions;
+ #my ($self) = @_;
+ return ["Change password"];
}
sub Validate($)
diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl
index 803fc59..ab08697 100644
--- a/testbot/web/Stats.pl
+++ b/testbot/web/Stats.pl
@@ -394,11 +394,8 @@ sub GetDisplayValue($$)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Update";
- return $Actions;
+ #my ($self) = @_;
+ return ["Update"];
}
sub OnAction($$)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 76069bb..9a7ac0b 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -913,29 +913,11 @@ sub GetActions($)
{
my ($self) = @_;
- my $Actions = $self->SUPER::GetActions();
- if ($self->{Page} == 0)
- {
- push @$Actions, "OK";
- }
- elsif ($self->{Page} == 1)
- {
- push @$Actions, "Single Page", "Next >";
- }
- elsif ($self->{Page} == 2)
- {
- push @$Actions, "< Prev", "Next >";
- }
- elsif ($self->{Page} == 3)
- {
- push @$Actions, "< Prev", "Submit";
- }
- elsif ($self->{Page} == 4)
- {
- push @$Actions, "Submit";
- }
-
- return $Actions;
+ return ["Single Page", "Next >"] if ($self->{Page} == 1);
+ return ["< Prev", "Next >"] if ($self->{Page} == 2);
+ return ["< Prev", "Submit"] if ($self->{Page} == 3);
+ return ["Submit"] if ($self->{Page} == 4);
+ return ["OK"]; # Page == 0 (error case)
}
sub DisplayProperty($$)
diff --git a/testbot/web/admin/Log.pl b/testbot/web/admin/Log.pl
index f0ac524..cb253bd 100644
--- a/testbot/web/admin/Log.pl
+++ b/testbot/web/admin/Log.pl
@@ -64,12 +64,8 @@ sub GetHeaderText($)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Download";
-
- return $Actions;
+ #my ($self) = @_;
+ return ["Download"];
}
sub OnDownload($)
diff --git a/testbot/web/admin/SpecialJobs.pl b/testbot/web/admin/SpecialJobs.pl
index c5a8f65..534336c 100644
--- a/testbot/web/admin/SpecialJobs.pl
+++ b/testbot/web/admin/SpecialJobs.pl
@@ -145,11 +145,8 @@ sub GenerateFields($)
sub GetActions($)
{
- my ($self) = @_;
-
- my $Actions = $self->SUPER::GetActions();
- push @$Actions, "Submit";
- return $Actions;
+ #my ($self) = @_;
+ return ["Submit"];
}
More information about the wine-cvs
mailing list