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

Protect the user from him/herself; Add a "confirm" button.

parent 250b0d83
......@@ -35,6 +35,16 @@ $exp_eid = strstr($exp_pideid, "\$\$");
$exp_eid = substr($exp_eid, 2);
$exp_pid = substr($exp_pideid, 0, strpos($exp_pideid, "\$\$", 0));
#
# Stop now if the Confirm box was not Depressed
#
if (!isset($confirm) ||
strcmp($confirm, "yes")) {
USERERROR("The \"Confirm\" button was not depressed! If you really ".
"want to end experiment '$exp_eid' in project '$exp_pid', ".
"please go back and try again.", 1);
}
#
# Check to make sure thats this is a valid PID/EID tuple.
#
......
......@@ -72,15 +72,36 @@ echo "<tr></tr>";
# experiments as an option list.
#
echo "<tr>";
echo " <td><select name=\"exp_pideid\">";
echo " <td align=\"center\"><select name=\"exp_pideid\">";
echo " $experiments";
echo " </select>";
echo " </td>
</tr>\n";
?>
<td align="center">
<b><input type="submit" value="Submit"></b></td></tr>
<tr>
<td height=25></td>
</tr>
<tr>
<td align="center" height=50>
<em>Do you really want to do this?<br>
(Depress the Confirm button)</em></td>
</tr>
<tr>
<td heght=25 align="center">
<input type="checkbox" name="confirm" value="yes"></td>
</tr>
<tr>
<td height=25></td>
</tr>
<tr>
<td align="center">
<b><input type="submit" value="Submit"></b></td>
</tr>
</form>
</table>
</center>
......
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