You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2011/10/26 18:30:30 UTC

svn commit: r1189298 - /incubator/vcl/trunk/web/.ht-inc/computers.php

Author: jfthomps
Date: Wed Oct 26 16:30:30 2011
New Revision: 1189298

URL: http://svn.apache.org/viewvc?rev=1189298&view=rev
Log:
VCL-492
edit computer info for VM in maintenance state

modified processComputerInput - check for virtualmachine stateid not being maintenance only if mode is confirmAddComputer

Modified:
    incubator/vcl/trunk/web/.ht-inc/computers.php

Modified: incubator/vcl/trunk/web/.ht-inc/computers.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/computers.php?rev=1189298&r1=1189297&r2=1189298&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Wed Oct 26 16:30:30 2011
@@ -3141,7 +3141,8 @@ function processComputerInput($checks=1)
 	   $submitErr |= OWNERERR;
 	   $submitErrMsg[OWNERERR] = "Submitted ID is not valid";
 	}
-	if($return['type'] == 'virtualmachine' && $return['stateid'] == 2) {
+	if($mode == 'confirmAddComputer' &&
+	   $return['type'] == 'virtualmachine' && $return['stateid'] != 10) {
 	   $submitErr |= VMAVAILERR;
 	   $submitErrMsg[VMAVAILERR] = "Virtual machines can only be added in the maintenance state.";
 	}