Commit c410b3aa authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix up javascript so that it works for netscape (which is more

pedantic than either opera or IE, or more likely just stupid).
parent 632ae0d2
...@@ -119,19 +119,20 @@ function SPITFORM($formfields, $errors) ...@@ -119,19 +119,20 @@ function SPITFORM($formfields, $errors)
echo "<SCRIPT LANGUAGE=JavaScript> echo "<SCRIPT LANGUAGE=JavaScript>
function SetPrefix(theform) function SetPrefix(theform)
{ {
if (theform['formfields[pid]'].value == '') { var idx = theform['formfields[pid]'].selectedIndex;
var pid = theform['formfields[pid]'].options[idx].value;
if (pid == '') {
theform['formfields[path]'].value = '/proj/'; theform['formfields[path]'].value = '/proj/';
} }
else if (theform['formfields[imagename]'].value == '') { else if (theform['formfields[imagename]'].value == '') {
theform['formfields[imagename]'].defaultValue = ''; theform['formfields[imagename]'].defaultValue = '';
theform['formfields[path]'].value = theform['formfields[path]'].value =
'/proj/' + '/proj/' + pid + '/images/';
theform['formfields[pid]'].value + '/images/';
} }
else if (theform['formfields[imagename]'].value != '') { else if (theform['formfields[imagename]'].value != '') {
theform['formfields[path]'].value = theform['formfields[path]'].value =
'/proj/' + '/proj/' + pid + '/images/' +
theform['formfields[pid]'].value + '/images/' +
theform['formfields[imagename]'].value + '.ndz'; theform['formfields[imagename]'].value + '.ndz';
} }
} }
...@@ -785,7 +786,7 @@ if (isset($node)) { ...@@ -785,7 +786,7 @@ if (isset($node)) {
echo "This will take 10 minutes or more; you will receive email echo "This will take 10 minutes or more; you will receive email
notification when the image is complete. In the meantime, notification when the image is complete. In the meantime,
<b>PLEASE DO NOT</b> delete the imageid or the experiment <b>PLEASE DO NOT</b> delete the imageid or the experiment
$node is in. In fact, it is best if you do not mess the with $node is in. In fact, it is best if you do not mess with
the node at all!<br>\n"; the node at all!<br>\n";
} }
......
...@@ -20,7 +20,6 @@ $isadmin = ISADMIN($uid); ...@@ -20,7 +20,6 @@ $isadmin = ISADMIN($uid);
$featurelist = array(); $featurelist = array();
$featurelist["ping"] = "ping"; $featurelist["ping"] = "ping";
$featurelist["ssh"] = "ssh"; $featurelist["ssh"] = "ssh";
$featurelist["ipod"] = "ipod";
# #
# Default OS strings. Needs to move someplace else! # Default OS strings. Needs to move someplace else!
...@@ -79,19 +78,20 @@ function SPITFORM($formfields, $errors) ...@@ -79,19 +78,20 @@ function SPITFORM($formfields, $errors)
echo "<SCRIPT LANGUAGE=JavaScript> echo "<SCRIPT LANGUAGE=JavaScript>
function SetPrefix(theform) function SetPrefix(theform)
{ {
if (theform['formfields[pid]'].value == '') { var idx = theform['formfields[pid]'].selectedIndex;
var pid = theform['formfields[pid]'].options[idx].value;
if (pid == '') {
theform['formfields[path]'].value = '/proj/'; theform['formfields[path]'].value = '/proj/';
} }
else if (theform['formfields[imagename]'].value == '') { else if (theform['formfields[imagename]'].value == '') {
theform['formfields[imagename]'].defaultValue = ''; theform['formfields[imagename]'].defaultValue = '';
theform['formfields[path]'].value = theform['formfields[path]'].value =
'/proj/' + '/proj/' + pid + '/images/';
theform['formfields[pid]'].value + '/images/';
} }
else if (theform['formfields[imagename]'].value != '') { else if (theform['formfields[imagename]'].value != '') {
theform['formfields[path]'].value = theform['formfields[path]'].value =
'/proj/' + '/proj/' + pid + '/images/' +
theform['formfields[pid]'].value + '/images/' +
theform['formfields[imagename]'].value + '.ndz'; theform['formfields[imagename]'].value + '.ndz';
} }
} }
...@@ -642,7 +642,7 @@ if (isset($node)) { ...@@ -642,7 +642,7 @@ if (isset($node)) {
echo "This will take 10 minutes or more; you will receive email echo "This will take 10 minutes or more; you will receive email
notification when the image is complete. In the meantime, notification when the image is complete. In the meantime,
<b>PLEASE DO NOT</b> delete the imageid or the experiment <b>PLEASE DO NOT</b> delete the imageid or the experiment
$node is in. In fact, it is best if you do not mess the with $node is in. In fact, it is best if you do not mess with
the node at all!<br>\n"; the node at all!<br>\n";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment