forked from science-ation/science-ation
Fix the safety question yes/no stuff, also fix the editor, it appears to have been broken somehow!
This commit is contained in:
parent
d6bbe5701e
commit
958a25c4aa
@ -77,8 +77,8 @@
|
||||
{
|
||||
$buttontext="Save safety question";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
|
||||
echo "<input type=\"hidden\" name=\"save\" value=\"$r->id\">\n";
|
||||
$q=mysql_query("SELECT * FROM safetyquestions WHERE id='".$_GET['edit']."' AND year='".$config['FAIRYEAR']."'");
|
||||
echo "<input type=\"hidden\" name=\"save\" value=\"".$_GET['edit']."\">\n";
|
||||
if(!$r=mysql_fetch_object($q))
|
||||
{
|
||||
$showform=false;
|
||||
|
@ -94,7 +94,7 @@ echo mysql_error();
|
||||
$newstatus=safetyStatus();
|
||||
if($newstatus!="complete")
|
||||
{
|
||||
echo error(i18n("Safety Information Incomplete. You must agree to all safety questions!"));
|
||||
echo error(i18n("Safety Information Incomplete. You must agree to / answer all required safety questions!"));
|
||||
}
|
||||
else if($newstatus=="complete")
|
||||
{
|
||||
@ -116,13 +116,27 @@ else if($newstatus=="complete")
|
||||
$num=1;
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
echo "<tr><td><b>$num</b>. </td><td>".i18n($r->question)."</td>";
|
||||
echo "<tr><td><b>$num</b>. </td><td>";
|
||||
if($r->required=="yes") echo REQUIREDFIELD;
|
||||
echo i18n($r->question)."</td>";
|
||||
echo "<td>";
|
||||
if($r->type=="check")
|
||||
{
|
||||
if($safetyanswers[$r->id]=="checked") $ch="checked=\"checked\""; else $ch="";
|
||||
echo "<input $ch type=\"checkbox\" name=\"safety[$r->id]\" value=\"checked\" />";
|
||||
}
|
||||
else if($r->type=="yesno")
|
||||
{
|
||||
echo "<nobr>";
|
||||
if($safetyanswers[$r->id]=="yes") $ch="checked=\"checked\""; else $ch="";
|
||||
echo "<input $ch type=\"radio\" name=\"safety[$r->id]\" value=\"yes\" />";
|
||||
echo i18n("Yes");
|
||||
echo "</nobr><br /><nobr>";
|
||||
if($safetyanswers[$r->id]=="no") $ch="checked=\"checked\""; else $ch="";
|
||||
echo "<input $ch type=\"radio\" name=\"safety[$r->id]\" value=\"no\" />";
|
||||
echo i18n("No");
|
||||
echo "</nobr>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
$num++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user