forked from science-ation/science-ation
Add all the "required fields" feedback for participant registration
This commit is contained in:
parent
45f4581dc4
commit
b370dac7d5
@ -22,6 +22,9 @@
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
|
define('REQUIREDFIELD','<span class="requiredfield">*</span>');
|
||||||
|
|
||||||
//figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not
|
//figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not
|
||||||
if(substr(getcwd(),-6)=="/admin")
|
if(substr(getcwd(),-6)=="/admin")
|
||||||
$prependdir="../";
|
$prependdir="../";
|
||||||
|
@ -148,15 +148,15 @@ while($sr=mysql_fetch_object($sq))
|
|||||||
echo "<input type=\"hidden\" name=\"ids[]\" value=\"$id\">";
|
echo "<input type=\"hidden\" name=\"ids[]\" value=\"$id\">";
|
||||||
echo "<table>\n";
|
echo "<table>\n";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td>".i18n("First Name").": </td><td><input type=\"text\" name=\"firstname[$id]\" size=\"20\" value=\"$r->firstname\" /></td>";
|
echo " <td>".i18n("First Name").": </td><td><input type=\"text\" name=\"firstname[$id]\" size=\"20\" value=\"$r->firstname\" />".REQUIREDFIELD."</td>";
|
||||||
echo " <td>".i18n("Last Name").": </td><td><input type=\"text\" name=\"lastname[$id]\" size=\"20\" value=\"$r->lastname\" /></td>";
|
echo " <td>".i18n("Last Name").": </td><td><input type=\"text\" name=\"lastname[$id]\" size=\"20\" value=\"$r->lastname\" />".REQUIREDFIELD."</td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td>".i18n("Relation").": </td><td><input type=\"text\" name=\"relation[$id]\" size=\"20\" value=\"$r->relation\" /></td>";
|
echo " <td>".i18n("Relation").": </td><td><input type=\"text\" name=\"relation[$id]\" size=\"20\" value=\"$r->relation\" />".REQUIREDFIELD."</td>";
|
||||||
echo " <td>".i18n("Email Address").": </td><td><input type=\"text\" name=\"email[$id]\" size=\"20\" value=\"$r->email\" /></td>";
|
echo " <td>".i18n("Email Address").": </td><td><input type=\"text\" name=\"email[$id]\" size=\"20\" value=\"$r->email\" /></td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td>".i18n("Phone 1").": </td><td><input type=\"text\" name=\"phone1[$id]\" size=\"20\" value=\"$r->phone1\" /></td>";
|
echo " <td>".i18n("Phone 1").": </td><td><input type=\"text\" name=\"phone1[$id]\" size=\"20\" value=\"$r->phone1\" />".REQUIREDFIELD."</td>";
|
||||||
echo " <td>".i18n("Phone 2").": </td><td><input type=\"text\" name=\"phone2[$id]\" size=\"20\" value=\"$r->phone2\" /></td>";
|
echo " <td>".i18n("Phone 2").": </td><td><input type=\"text\" name=\"phone2[$id]\" size=\"20\" value=\"$r->phone2\" /></td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
|
@ -211,20 +211,20 @@ else if($newstatus=="complete")
|
|||||||
echo "<input type=\"hidden\" name=\"id[$x]\" value=\"$id\" />";
|
echo "<input type=\"hidden\" name=\"id[$x]\" value=\"$id\" />";
|
||||||
echo "<table>";
|
echo "<table>";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("First Name")."</td><td><input type=\"text\" name=\"firstname[$x]\" value=\"$mentorinfo->firstname\" /></td>\n";
|
echo " <td>".i18n("First Name")."</td><td><input type=\"text\" name=\"firstname[$x]\" value=\"$mentorinfo->firstname\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$mentorinfo->lastname\" /></td>\n";
|
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$mentorinfo->lastname\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$mentorinfo->email\" /></td>\n";
|
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$mentorinfo->email\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Phone")."</td><td><input type=\"text\" name=\"phone[$x]\" value=\"$mentorinfo->phone\" /></td>\n";
|
echo " <td>".i18n("Phone")."</td><td><input type=\"text\" name=\"phone[$x]\" value=\"$mentorinfo->phone\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Organization")."</td><td><input type=\"text\" name=\"organization[$x]\" value=\"$mentorinfo->organization\" /></td>\n";
|
echo " <td>".i18n("Organization")."</td><td><input type=\"text\" name=\"organization[$x]\" value=\"$mentorinfo->organization\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Position")."</td><td><input type=\"text\" name=\"position[$x]\" value=\"$mentorinfo->position\" /></td>\n";
|
echo " <td>".i18n("Position")."</td><td><input type=\"text\" name=\"position[$x]\" value=\"$mentorinfo->position\" /></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Description of help")."</td>";
|
echo " <td>".i18n("Description of help")."</td>";
|
||||||
echo "<td colspan=3><textarea rows=\"3\" cols=\"60\" name=\"description[$x]\">$mentorinfo->description</textarea></td>\n";
|
echo "<td colspan=3><textarea rows=\"3\" cols=\"60\" name=\"description[$x]\">".htmlspecialchars($mentorinfo->description)."</textarea>".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
@ -161,7 +161,7 @@ else if($newstatus=="complete")
|
|||||||
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
|
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"id\" value=\"$projectinfo->id\">\n";
|
echo "<input type=\"hidden\" name=\"id\" value=\"$projectinfo->id\">\n";
|
||||||
echo "<table>\n";
|
echo "<table>\n";
|
||||||
echo "<tr><td>".i18n("Project Title").": </td><td><input type=\"text\" name=\"title\" size=\"50\" value=\"$projectinfo->title\" /></td></tr>\n";
|
echo "<tr><td>".i18n("Project Title").": </td><td><input type=\"text\" name=\"title\" size=\"50\" value=\"$projectinfo->title\" />".REQUIREDFIELD."</td></tr>\n";
|
||||||
echo "<tr><td>".i18n("Age Category").": </td><td>";
|
echo "<tr><td>".i18n("Age Category").": </td><td>";
|
||||||
echo i18n($agecategories[$projectcategories_id]['category']);
|
echo i18n($agecategories[$projectcategories_id]['category']);
|
||||||
echo " (".i18n("Grades %1-%2",array($agecategories[$projectcategories_id]['mingrade'],$agecategories[$projectcategories_id]['maxgrade'])).")";
|
echo " (".i18n("Grades %1-%2",array($agecategories[$projectcategories_id]['mingrade'],$agecategories[$projectcategories_id]['maxgrade'])).")";
|
||||||
@ -176,7 +176,7 @@ else if($newstatus=="complete")
|
|||||||
echo "<option $sel value=\"$r->id\">".htmlspecialchars(i18n($r->division))."</option>\n";
|
echo "<option $sel value=\"$r->id\">".htmlspecialchars(i18n($r->division))."</option>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "</select>";
|
echo "</select>".REQUIREDFIELD;
|
||||||
if($config['usedivisionselector']=="yes")
|
if($config['usedivisionselector']=="yes")
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -209,14 +209,14 @@ else if($newstatus=="complete")
|
|||||||
|
|
||||||
echo "<option $selected value=\"$key\">$val</option>";
|
echo "<option $selected value=\"$key\">$val</option>";
|
||||||
}
|
}
|
||||||
echo "</select>";
|
echo "</select>".REQUIREDFIELD;
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr><td>".i18n("Requirements").": </td><td>";
|
echo "<tr><td>".i18n("Requirements").": </td><td>";
|
||||||
echo "<table>";
|
echo "<table>";
|
||||||
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td>".i18n("Table")."</td>";
|
echo " <td>".i18n("Table").REQUIREDFIELD."</td>";
|
||||||
if($projectinfo->req_table=="yes") $check="checked=\"checked\""; else $check="";
|
if($projectinfo->req_table=="yes") $check="checked=\"checked\""; else $check="";
|
||||||
echo " <td><input $check type=\"radio\" name=\"req_table\" value=\"yes\" />Yes</td>";
|
echo " <td><input $check type=\"radio\" name=\"req_table\" value=\"yes\" />Yes</td>";
|
||||||
echo " <td width=\"20\"> </td>";
|
echo " <td width=\"20\"> </td>";
|
||||||
@ -225,7 +225,7 @@ else if($newstatus=="complete")
|
|||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td>".i18n("Electricity")."</td>";
|
echo " <td>".i18n("Electricity").REQUIREDFIELD."</td>";
|
||||||
if($projectinfo->req_electricity=="yes") $check="checked=\"checked\""; else $check="";
|
if($projectinfo->req_electricity=="yes") $check="checked=\"checked\""; else $check="";
|
||||||
echo " <td><input $check type=\"radio\" name=\"req_electricity\" value=\"yes\" />Yes</td>";
|
echo " <td><input $check type=\"radio\" name=\"req_electricity\" value=\"yes\" />Yes</td>";
|
||||||
echo " <td width=\"20\"> </td>";
|
echo " <td width=\"20\"> </td>";
|
||||||
@ -242,7 +242,7 @@ else if($newstatus=="complete")
|
|||||||
|
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr><td>".i18n("Summary").": </td><td><textarea cols=\"60\" rows=\"12\" name=\"summary\">$projectinfo->summary</textarea><br />";
|
echo "<tr><td>".i18n("Summary").": </td><td><textarea cols=\"60\" rows=\"12\" name=\"summary\">".htmlspecialchars($projectinfo->summary)."</textarea>".REQUIREDFIELD."<br />";
|
||||||
echo i18n("100 words maximum");
|
echo i18n("100 words maximum");
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ echo mysql_error();
|
|||||||
$newstatus=safetyStatus();
|
$newstatus=safetyStatus();
|
||||||
if($newstatus!="complete")
|
if($newstatus!="complete")
|
||||||
{
|
{
|
||||||
echo error(i18n("Safety Information Incomplete"));
|
echo error(i18n("Safety Information Incomplete. You must agree to all safety questions!"));
|
||||||
}
|
}
|
||||||
else if($newstatus=="complete")
|
else if($newstatus=="complete")
|
||||||
{
|
{
|
||||||
|
@ -235,8 +235,8 @@ else if($newstatus=="complete")
|
|||||||
echo "<input type=\"hidden\" name=\"id[$x]\" value=\"$id\" />";
|
echo "<input type=\"hidden\" name=\"id[$x]\" value=\"$id\" />";
|
||||||
echo "<table>";
|
echo "<table>";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("First Name")."</td><td><input type=\"text\" name=\"firstname[$x]\" value=\"$studentinfo->firstname\" /></td>\n";
|
echo " <td>".i18n("First Name")."</td><td><input type=\"text\" name=\"firstname[$x]\" value=\"$studentinfo->firstname\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$studentinfo->lastname\" /></td>\n";
|
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$studentinfo->lastname\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
@ -247,25 +247,25 @@ else if($newstatus=="complete")
|
|||||||
echo "<option $sel value=\"male\">".i18n("Male")."</option>\n";
|
echo "<option $sel value=\"male\">".i18n("Male")."</option>\n";
|
||||||
if($studentinfo->sex=="female") $sel="selected=\"selected\""; else $sel="";
|
if($studentinfo->sex=="female") $sel="selected=\"selected\""; else $sel="";
|
||||||
echo "<option $sel value=\"female\">".i18n("Female")."</option>\n";
|
echo "<option $sel value=\"female\">".i18n("Female")."</option>\n";
|
||||||
echo "</select>";
|
echo "</select>".REQUIREDFIELD;
|
||||||
|
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " <td></td><td></td>\n";
|
echo " <td></td><td></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$studentinfo->email\" /></td>\n";
|
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$studentinfo->email\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("City")."</td><td><input type=\"text\" name=\"city[$x]\" value=\"$studentinfo->city\" /></td>\n";
|
echo " <td>".i18n("City")."</td><td><input type=\"text\" name=\"city[$x]\" value=\"$studentinfo->city\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Address")."</td><td><input type=\"text\" name=\"address[$x]\" value=\"$studentinfo->address\" /></td>\n";
|
echo " <td>".i18n("Address")."</td><td><input type=\"text\" name=\"address[$x]\" value=\"$studentinfo->address\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Province")."</td><td>";
|
echo " <td>".i18n("Province")."</td><td>";
|
||||||
emit_province_selector("province[$x]",$studentinfo->province);
|
emit_province_selector("province[$x]",$studentinfo->province);
|
||||||
echo "</td>\n";
|
echo REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td>".i18n("Postal Code")."</td><td><input type=\"text\" name=\"postalcode[$x]\" value=\"$studentinfo->postalcode\" /></td>\n";
|
echo " <td>".i18n("Postal Code")."</td><td><input type=\"text\" name=\"postalcode[$x]\" value=\"$studentinfo->postalcode\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo " <td>".i18n("Phone")."</td><td><input type=\"text\" name=\"phone[$x]\" value=\"$studentinfo->phone\" /></td>\n";
|
echo " <td>".i18n("Phone")."</td><td><input type=\"text\" name=\"phone[$x]\" value=\"$studentinfo->phone\" />".REQUIREDFIELD."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
@ -277,8 +277,8 @@ else if($newstatus=="complete")
|
|||||||
emit_month_selector("month[$x]",$month);
|
emit_month_selector("month[$x]",$month);
|
||||||
echo "</td><td>\n";
|
echo "</td><td>\n";
|
||||||
emit_year_selector("year[$x]",$year,date("Y")-19,date("Y")-10);
|
emit_year_selector("year[$x]",$year,date("Y")-19,date("Y")-10);
|
||||||
echo "</td></tr></table>\n";
|
echo "</td><td>".REQUIREDFIELD."</td></tr></table>\n";
|
||||||
echo " </td>\n";
|
echo "</td>\n";
|
||||||
echo " <td>".i18n("Grade")."</td><td>\n";
|
echo " <td>".i18n("Grade")."</td><td>\n";
|
||||||
|
|
||||||
echo "<select name=\"grade[$x]\">\n";
|
echo "<select name=\"grade[$x]\">\n";
|
||||||
@ -291,7 +291,7 @@ else if($newstatus=="complete")
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
echo " </td>";
|
echo REQUIREDFIELD."</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
@ -320,7 +320,7 @@ else if($newstatus=="complete")
|
|||||||
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->school)."</option>\n";
|
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->school)."</option>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "</select>";
|
echo "</select>".REQUIREDFIELD;
|
||||||
|
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " <td>".i18n("T-Shirt Size")."</td><td>";
|
echo " <td>".i18n("T-Shirt Size")."</td><td>";
|
||||||
|
@ -187,6 +187,7 @@ a {
|
|||||||
background: #F0DCDC;
|
background: #F0DCDC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.notice {
|
.notice {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border: 1px solid Silver;
|
border: 1px solid Silver;
|
||||||
@ -209,6 +210,12 @@ a {
|
|||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.requiredfield {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.8em;
|
||||||
|
color: #FF0000;
|
||||||
|
}
|
||||||
|
|
||||||
.viewtable {
|
.viewtable {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
@ -244,4 +251,4 @@ a {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user