forked from science-ation/science-ation
Add configuration options to choose whether to ask the students if they require:
- table - electricity
This commit is contained in:
parent
9fc98fc288
commit
0dd2da7145
@ -224,6 +224,13 @@ if($projectinfo)
|
||||
echo "<tr><td>".i18n("Requirements").": </td><td>";
|
||||
echo "<table>";
|
||||
|
||||
if($config['participant_project_table']=="no")
|
||||
{
|
||||
//if we arent asking them if they want a table or not, then we set it to 'yes' assuming everyone will get a table
|
||||
echo " <input type=\"hidden\" name=\"req_table\" value=\"yes\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Table").REQUIREDFIELD."</td>";
|
||||
if($projectinfo->req_table=="yes") $check="checked=\"checked\""; else $check="";
|
||||
@ -232,7 +239,15 @@ if($projectinfo)
|
||||
if($projectinfo->req_table=="no") $check="checked=\"checked\""; else $check="";
|
||||
echo " <td><input $check type=\"radio\" name=\"req_table\" value=\"no\" />No</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
if($config['participant_project_electricity']=="no")
|
||||
{
|
||||
//if we arent asking them if they want electricity or not, then we set it to 'yes' assuming everyone will get electricity
|
||||
echo " <input type=\"hidden\" name=\"req_electricity\" value=\"yes\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Electricity").REQUIREDFIELD."</td>";
|
||||
if($projectinfo->req_electricity=="yes") $check="checked=\"checked\""; else $check="";
|
||||
@ -241,6 +256,7 @@ if($projectinfo)
|
||||
if($projectinfo->req_electricity=="no") $check="checked=\"checked\""; else $check="";
|
||||
echo " <td><input $check type=\"radio\" name=\"req_electricity\" value=\"no\" />No</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Special")."</td>";
|
||||
|
@ -1 +1 @@
|
||||
32
|
||||
33
|
||||
|
3
db/db.update.33.sql
Normal file
3
db/db.update.33.sql
Normal file
@ -0,0 +1,3 @@
|
||||
INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1160','participant_project_table','yes','Ask if the project requires a table (yes/no)',-1);
|
||||
INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1170','participant_project_electricity','yes','Ask if the project requires electricity (yes/no)',-1);
|
||||
|
@ -261,6 +261,13 @@ function countwords()
|
||||
echo "<tr><td>".i18n("Requirements").": </td><td>";
|
||||
echo "<table>";
|
||||
|
||||
if($config['participant_project_table']=="no")
|
||||
{
|
||||
//if we arent asking them if they want a table or not, then we set it to 'yes' assuming everyone will get a table
|
||||
echo " <input type=\"hidden\" name=\"req_table\" value=\"yes\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Table").REQUIREDFIELD."</td>";
|
||||
if($projectinfo->req_table=="yes") $check="checked=\"checked\""; else $check="";
|
||||
@ -269,7 +276,15 @@ function countwords()
|
||||
if($projectinfo->req_table=="no") $check="checked=\"checked\""; else $check="";
|
||||
echo " <td><input $check type=\"radio\" name=\"req_table\" value=\"no\" />No</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
if($config['participant_project_electricity']=="no")
|
||||
{
|
||||
//if we arent asking them if they want electricity or not, then we set it to 'yes' assuming everyone will get electricity
|
||||
echo " <input type=\"hidden\" name=\"req_electricity\" value=\"yes\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Electricity").REQUIREDFIELD."</td>";
|
||||
if($projectinfo->req_electricity=="yes") $check="checked=\"checked\""; else $check="";
|
||||
@ -278,6 +293,7 @@ function countwords()
|
||||
if($projectinfo->req_electricity=="no") $check="checked=\"checked\""; else $check="";
|
||||
echo " <td><input $check type=\"radio\" name=\"req_electricity\" value=\"no\" />No</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td>".i18n("Special")."</td>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user