Commit 35a9c90c authored by Chad Barb's avatar Chad Barb

Improved error reporting style.. also added image for uky,
though right now it is the same as the standard image
(will edit it soon.)
parent e162e7a7
......@@ -48,20 +48,22 @@ function SPITFORM($formfields, $errors)
PAGEHEADER("Begin a Testbed Experiment");
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td nowrap align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -27,20 +27,22 @@ function SPITFORM($formfields, $errors)
</blockquote><br>\n";
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td nowrap align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -18,20 +18,22 @@ function SPITFORM($formfields, $errors)
PAGEHEADER("Request a CDROM distribution");
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td nowrap align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -44,23 +44,22 @@ function SPITFORM($formfields, $returning, $errors)
PAGEHEADER("Apply for Project Membership");
if ($errors) {
echo "<table class=stealth
align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td class=stealth nowrap align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td class=stealth align=right>
<font color=red>$name:</font></td>
<td class=stealth>&nbsp &nbsp</td>
<td class=stealth align=left>
<font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -38,20 +38,22 @@ function SPITFORM($formfields, $errors)
PAGEHEADER("Modify User Information");
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......@@ -353,10 +355,10 @@ if (isset($formfields[password1]) &&
strcmp($formfields[password1], "")) {
if (!isset($formfields[password2]) ||
strcmp($formfields[password2], "") == 0) {
$errors["Confirm Password"] = "Missing Field";
$errors["Retype Password"] = "Missing Field";
}
elseif (strcmp($formfields[password1], $formfields[password2])) {
$errors["Confirm Password"] = "Does not match Password";
$errors["Retype Password"] = "Two Passwords Do Not Match";
}
elseif (! CHECKPASSWORD($formfields[target_uid],
$formfields[password1],
......
......@@ -81,20 +81,22 @@ function SPITFORM($formfields, $errors)
global $TBDB_IMAGEID_IMAGENAMELEN, $TBDB_NODEIDLEN;
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -65,20 +65,22 @@ function SPITFORM($formfields, $errors)
global $TBDB_OSID_VERSLEN;
if ($errors) {
echo "<table align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td align=right><font color=red>$name:</font></td>
<td>&nbsp &nbsp</td>
<td align=left><font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -51,23 +51,22 @@ function SPITFORM($formfields, $returning, $errors)
</font></center><br>\n";
if ($errors) {
echo "<table class=stealth
align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td class=stealth nowrap align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td class=stealth align=right>
<font color=red>$name:</font></td>
<td class=stealth>&nbsp &nbsp</td>
<td class=stealth align=left>
<font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><br>\n";
......
......@@ -112,23 +112,22 @@ function SPITFORM($formfields, $errors)
</center><br>\n";
if ($errors) {
echo "<table class=stealth
align=center border=0 cellpadding=0 cellspacing=2>
echo "<table class=nogrid
align=center border=0 cellpadding=6 cellspacing=0>
<tr>
<td class=stealth align=center colspan=3>
<th align=center colspan=2>
<font size=+1 color=red>
Oops, please fix the following errors!
&nbsp;Oops, please fix the following errors!&nbsp;
</font>
</td>
</tr>\n";
while (list ($name, $message) = each ($errors)) {
echo "<tr>
<td class=stealth align=right>
<font color=red>$name:</font></td>
<td class=stealth>&nbsp</td>
<td class=stealth align=left>
<font color=red>$message</font></td>
<td align=right>
<font color=red>$name:&nbsp;</font></td>
<td align=left>
<font color=red>$message</font></td>
</tr>\n";
}
echo "</table><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