Author: jfthomps
Date: Wed May 23 18:53:54 2012
New Revision: 1341976

URL: http://svn.apache.org/viewvc?rev=1341976&view=rev
Log:
VCL-576
Finalizing for 2.3 release

computers.php:
-modified editOrAddComputer - fixed bug where 'available' could get removed 
from state options if invalid data submitted when adding a computer
-modified bulkAddComputer - allow 'available' to be selected by default in some 
cases

vm.php: modified editVMInfo - changed Image field to not be required

Modified:
    incubator/vcl/trunk/web/.ht-inc/computers.php
    incubator/vcl/trunk/web/.ht-inc/vm.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=1341976&r1=1341975&r2=1341976&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Wed May 23 18:53:54 2012
@@ -737,10 +737,11 @@ function editOrAddComputer($state) {
        print "  <TR>\n";
        print "    <TH align=right>State:</TH>\n";
        print "    <TD>\n";
-       if($state == 1 ||
-               ($state == 0 && ($computers[$data['compid']]['provisioning'] == 
'None' ||
-               ($data['type'] == 'virtualmachine' && $data['stateid'] != 2)) ||
-               ($data['type'] == 'virtualmachine' && 
$computers[$data['compid']]['vmhostid'] == '')))
+       if(($state == 1 && ($data['provisioningid'] == '' ||
+          $provisioning[$data['provisioningid']]['name'] == 'none')) ||
+          ($state == 0 && ($computers[$data['compid']]['provisioning'] == 
'None' ||
+          ($data['type'] == 'virtualmachine' && $data['stateid'] != 2)) ||
+          ($data['type'] == 'virtualmachine' && 
$computers[$data['compid']]['vmhostid'] == '')))
                unset_by_val('available', $states);
        if($state == 0 && $computers[$data['compid']]['type'] == 
'virtualmachine')
                unset_by_val('vmhostinuse', $states);
@@ -1865,7 +1866,8 @@ function bulkAddComputer() {
        print "    <TD>\n";
        if($submitErr && $data['type'] == 'virtualmachine')
                $states = array('10' => 'maintenance');
-       unset_by_val('available', $states);
+       if($data['provisioningid'] == '' || 
$provisioning[$data['provisioningid']]['name'] == 'none')
+               unset_by_val('available', $states);
        printSelectInput('stateid', $states, $data['stateid'], 0, 0, 'stateid', 
'dojoType="dijit.form.Select" onChange="editComputerSelectState();"');
        print "    </TD>\n";
        print "  </TR>\n";

Modified: incubator/vcl/trunk/web/.ht-inc/vm.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/vm.php?rev=1341976&r1=1341975&r2=1341976&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/vm.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/vm.php Wed May 23 18:53:54 2012
@@ -211,8 +211,8 @@ function editVMInfo() {
        print "    <td><span id=pname dojoType=\"dijit.InlineEditBox\" 
onChange=\"updateProfile('pname', 'profilename');\"></span></td>\n";
        print "  </tr>\n";
        print "  <tr>\n";
-       print "    <th align=right>Image:*</th>\n";
-       print "    <td><span id=pimage dojoType=\"dijit.form.FilteringSelect\" 
searchAttr=\"name\" onchange=\"updateProfile('pimage', 'imageid');\" 
style=\"width: 420px\"></span></td>\n";
+       print "    <th align=right>Image:</th>\n";
+       print "    <td><span id=pimage dojoType=\"dijit.form.FilteringSelect\" 
searchAttr=\"name\" onchange=\"updateProfile('pimage', 'imageid');\" 
style=\"width: 420px\" required=\"false\"></span></td>\n";
        print "  </tr>\n";
        print "  <tr>\n";
        print "    <th align=right>Resource Path:</th>\n";


Reply via email to