Module: tools Branch: master Commit: 92a374fa4ad5d8aea20eb021cc0126d06734ca04 URL: http://source.winehq.org/git/tools.git/?a=commit;h=92a374fa4ad5d8aea20eb021c...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 18 19:20:45 2013 +0200
testbot/web: Uncheck maintenance and offline VMs for jobs submitted through the web.
Developers will still be able to schedule jobs on them but they will do so knowingly.
---
testbot/web/Submit.pl | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index bbab0e0..42ca77a 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -256,16 +256,20 @@ sub GenerateFields { print " (", $self->CGI->escapeHTML($VM->Description), ")"; } + my $Checked = 1; if ($VM->Status eq 'offline') { print " [offline]"; + $Checked = undef; } elsif ($VM->Status eq 'maintenance') { print " [maintenance]"; + $Checked = undef; } print "</label><div class='ItemValue'><input type='checkbox' name='$FieldName'"; - if ($self->GetParam("Page") == 1 || $self->GetParam($FieldName)) + if ($Checked and + ($self->GetParam("Page") == 1 || $self->GetParam($FieldName))) { print " checked='checked'"; }