testbot/web: Uncheck maintenance and offline VMs for jobs submitted through the web.

Francois Gouget fgouget at codeweavers.com
Thu Apr 18 12:20:45 CDT 2013


Developers will still be able to schedule jobs on them but they will do so knowingly.
---
 testbot/web/Submit.pl |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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'";
         }
-- 
1.7.10.4




More information about the wine-patches mailing list