Skip to content

Commit

Permalink
BUGFIX: Modified editquestion code so that "Other" setting cannot be …
Browse files Browse the repository at this point in the history
…changed once survey is activated. This is important because having "Other" selected requires its own responses field, which is not possible after activating survey.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1009 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed May 8, 2004
1 parent 317f937 commit b3002e0
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions admin/html.php
Expand Up @@ -1090,17 +1090,19 @@
. "\t</tr>\n";

$editquestion .= "\t<tr id='OtherSelection' style='display: none'>\n"
. "\t\t<td align='right'>$setfont<b>"._QL_OTHER."</b></font></td>\n"
. "\t\t<td>$setfont\n"
. "\t\t<td align='right'>$setfont<b>"._QL_OTHER."</b></font></td>\n";

$editquestion .= "\t\t<td>$setfont\n"
. "\t\t\t"._AD_YES." <input type='radio' name='other' value='Y'";
if ($eqrow['other'] == "Y") {$editquestion .= " checked";}
$editquestion .= " />&nbsp;&nbsp;\n"
. "\t\t\t"._AD_NO." <input type='radio' name='other' value='N'";
if ($eqrow['other'] == "N") {$editquestion .= " checked";}
$editquestion .= " />\n"
. "\t\t</font></td>\n"
. "\t</tr>\n"
. "\t<tr id='MandatorySelection'>\n"
. "\t</tr>\n";

$editquestion .= "\t<tr id='MandatorySelection'>\n"
. "\t\t<td align='right'>$setfont<b>"._QL_MANDATORY."</b></font></td>\n"
. "\t\t<td>$setfont\n"
. "\t\t\t"._AD_YES." <input type='radio' name='mandatory' value='Y'";
Expand Down Expand Up @@ -1204,19 +1206,28 @@
. "\t\t<td><select $slstyle name='gid'>\n"
. getgrouplist3($eqrow['gid'])
. "\t\t</select></td>\n"
. "\t</tr>\n"
. "\t<tr id='OtherSelection'>\n"
. "\t\t<td align='right'>$setfont<b>"._QL_OTHER."</b></font></td>\n"
. "\t\t<td>$setfont\n"
. "\t\t\t<label for='OY'>"._AD_YES."</label><input id='OY' type='radio' name='other' value='Y'";
if ($eqrow['other'] == "Y") {$editquestion .= " checked";}
$editquestion .= " />&nbsp;&nbsp;\n"
. "\t\t\t<label for='ON'>"._AD_NO."</label><input id='ON' type='radio' name='other' value='N'";
if ($eqrow['other'] == "N") {$editquestion .= " checked";}
$editquestion .= " />\n"
. "\t\t</font></td>\n"
. "\t</tr>\n"
. "\t<tr id='MandatorySelection'>\n"
. "\t</tr>\n";
$editquestion .= "\t<tr id='OtherSelection'>\n"
. "\t\t<td align='right'>$setfont<b>"._QL_OTHER."</b></font></td>\n";
if ($activated != "Y")
{
$editquestion .= "\t\t<td>$setfont\n"
. "\t\t\t<label for='OY'>"._AD_YES."</label><input id='OY' type='radio' name='other' value='Y'";
if ($eqrow['other'] == "Y") {$editquestion .= " checked";}
$editquestion .= " />&nbsp;&nbsp;\n"
. "\t\t\t<label for='ON'>"._AD_NO."</label><input id='ON' type='radio' name='other' value='N'";
if ($eqrow['other'] == "N") {$editquestion .= " checked";}
$editquestion .= " />\n"
. "\t\t</font></td>\n";
}
else
{
$editquestion .= "<td>$setfont [{$eqrow['other']}] - "._DE_NOMODIFY." - "._SS_ACTIVE."\n"
. "\t\t\t<input type='hidden' name='other' value='{$eqrow['other']}'></font></td>\n";
}
$editquestion .= "\t</tr>\n";

$editquestion .= "\t<tr id='MandatorySelection'>\n"
. "\t\t<td align='right'>$setfont<b>"._QL_MANDATORY."</b></font></td>\n"
. "\t\t<td>$setfont\n"
. "\t\t\t<label for='MY'>"._AD_YES."</label><input id='MY' type='radio' name='mandatory' value='Y'";
Expand Down

0 comments on commit b3002e0

Please sign in to comment.