forked from science-ation/science-ation
Make the T-Shirt size question to students able to be disabled via a configuration variable for fairs that dont give out tshirts
This commit is contained in:
parent
321a245670
commit
69b4b943ac
@ -1,2 +1,3 @@
|
||||
UPDATE `config` SET `description` = 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)' WHERE `var` = 'specialawardnomination';
|
||||
ALTER TABLE `schools` ADD `projectlimit` INT NOT NULL , ADD `projectlimitper` ENUM( 'total', 'agecategory' ) NOT NULL ;
|
||||
INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'yes', 'Ask for students their T-Shirt size (yes/no).', '-1');
|
||||
|
@ -49,7 +49,10 @@ function registrationDeadlinePassed()
|
||||
function studentStatus($reg_id="")
|
||||
{
|
||||
global $config;
|
||||
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","dateofbirth","schools_id","tshirt");
|
||||
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","dateofbirth","schools_id");
|
||||
|
||||
if($config['participant_student_tshirt']=="yes")
|
||||
$required_fields[]="tshirt";
|
||||
|
||||
if($reg_id) $rid=$reg_id;
|
||||
else $rid=$_SESSION['registration_id'];
|
||||
|
@ -294,6 +294,24 @@ else if($newstatus=="complete")
|
||||
echo REQUIREDFIELD."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
if($config['participant_student_tshirt']=="yes")
|
||||
{
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("T-Shirt Size")."</td><td>";
|
||||
echo " <select name=\"tshirt[$x]\">\n";
|
||||
if($studentinfo->tshirt=="small") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"small\">".i18n("Small")."</option>";
|
||||
if($studentinfo->tshirt=="medium") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"medium\">".i18n("Medium")."</option>";
|
||||
if($studentinfo->tshirt=="large") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"large\">".i18n("Large")."</option>";
|
||||
if($studentinfo->tshirt=="xlarge") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"xlarge\">".i18n("X-Large")."</option>";
|
||||
echo " </select>";
|
||||
echo "</td>\n";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td>".i18n("Medical Alert Info")."</td><td colspan=\"3\">";
|
||||
echo "<input name=\"medicalalert[$x]\" type=\"text\" size=\"50\" value=\"$studentinfo->medicalalert\" />";
|
||||
@ -310,7 +328,7 @@ else if($newstatus=="complete")
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("School")."</td><td>";
|
||||
echo " <td>".i18n("School")."</td><td colspan=\"3\">";
|
||||
$schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by school");
|
||||
echo "<select name=\"schools_id[$x]\">\n";
|
||||
echo "<option value=\"\">".i18n("Choose School")."</option>\n";
|
||||
@ -322,19 +340,6 @@ else if($newstatus=="complete")
|
||||
}
|
||||
echo "</select>".REQUIREDFIELD;
|
||||
|
||||
echo "</td>\n";
|
||||
echo " <td>".i18n("T-Shirt Size")."</td><td>";
|
||||
echo " <select name=\"tshirt[$x]\">\n";
|
||||
if($studentinfo->tshirt=="small") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"small\">".i18n("Small")."</option>";
|
||||
if($studentinfo->tshirt=="medium") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"medium\">".i18n("Medium")."</option>";
|
||||
if($studentinfo->tshirt=="large") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"large\">".i18n("Large")."</option>";
|
||||
if($studentinfo->tshirt=="xlarge") $sel="selected=\"selected\""; else $sel="";
|
||||
echo " <option $sel value=\"xlarge\">".i18n("X-Large")."</option>";
|
||||
echo " </select>";
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user