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 2012/04/26 18:53:10 UTC

svn commit: r1330961 - in /incubator/vcl/trunk/web: .ht-inc/computers.php js/computers.js

Author: jfthomps
Date: Thu Apr 26 16:53:10 2012
New Revision: 1330961

URL: http://svn.apache.org/viewvc?rev=1330961&view=rev
Log:
VCL-311
add more fields to edit computer page

computers.php: modified editOrAddComputer and bulkAddComputer - always allow location to be set instead of only for physical machines

computers.js: modified editComputerSelectType - always allow location to be set instead of only for physical machines

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

Modified: incubator/vcl/trunk/web/.ht-inc/computers.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/computers.php?rev=1330961&r1=1330960&r2=1330961&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Thu Apr 26 16:53:10 2012
@@ -829,10 +829,7 @@ function editOrAddComputer($state) {
 	print "  <TR>\n";
 	print "    <TH align=right>Physical Location:</TH>\n";
 	print "    <TD><INPUT type=text name=location id=location value=";
-	if($state == 0 && $data['type'] == 'virtualmachine')
-		print "\"{$data["location"]}\" disabled=\"true\"></TD>\n";
-	else
-		print "\"{$data["location"]}\"></TD>\n";
+	print "\"{$data["location"]}\"></TD>\n";
 	print "    <TD></TD>\n";
 	print "  </TR>\n";
 	print "</TABLE>\n";
@@ -1956,10 +1953,7 @@ function bulkAddComputer() {
 	print "  <TR>\n";
 	print "    <TH align=right>Physical Location:</TH>\n";
 	print "    <TD><INPUT type=text name=location id=location value=";
-	if($data['type'] == 'virtualmachine')
-		print "\"{$data["location"]}\" disabled=\"true\"></TD>\n";
-	else
-		print "\"{$data["location"]}\"></TD>\n";
+	print "\"{$data["location"]}\"></TD>\n";
 	print "    <TD></TD>\n";
 	print "  </TR>\n";
 	print "</TABLE>\n";

Modified: incubator/vcl/trunk/web/js/computers.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/computers.js?rev=1330961&r1=1330960&r2=1330961&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/computers.js (original)
+++ incubator/vcl/trunk/web/js/computers.js Thu Apr 26 16:53:10 2012
@@ -293,12 +293,6 @@ function editComputerSelectType(skipprov
 			pobj.addOption({value: allowedprovs[type][i].id, label: allowedprovs[type][i].name});
 		}
 	}
-	if(dojo.byId('location')) {
-		if(type == 'virtualmachine')
-			dojo.byId('location').disabled = true;
-		else
-			dojo.byId('location').disabled = false;
-	}
 }
 
 function editComputerSelectState() {