Skip to content

Commit

Permalink
Fixed wrong background for checkboxes and radios in IE7 part of bug #…
Browse files Browse the repository at this point in the history
… 769

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2697 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Apr 6, 2007
1 parent 29e1817 commit 05e02e0
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 80 deletions.
38 changes: 19 additions & 19 deletions admin/dataentry.php
Expand Up @@ -600,7 +600,7 @@
case "5": //5 POINT CHOICE radio-buttons
for ($x=1; $x<=5; $x++)
{
$dataentryoutput .= "\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='$x'";
$dataentryoutput .= "\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='$x'";
if ($idrow[$fnames[$i][0]] == $x) {$dataentryoutput .= " checked";}
$dataentryoutput .= " />$x \n";
}
Expand Down Expand Up @@ -905,7 +905,7 @@
}
else
{
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='{$fnames[$i][0]}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='{$fnames[$i][0]}' value='Y'";
if ($idrow[$fnames[$i][0]] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />{$fnames[$i][6]}</font><br />\n";
}
Expand All @@ -926,7 +926,7 @@
while ($fnames[$i][3] == "U" && $question != "" && $question == $fnames[$i][2])
{
$fieldn = substr($fnames[$i][0], 0, strlen($fnames[$i][0]));
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='{$fnames[$i][0]}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='{$fnames[$i][0]}' value='Y'";
if ($idrow[$fnames[$i][0]] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />{$fnames[$i][6]}<br />\n";
if ($i<$nfncount)
Expand Down Expand Up @@ -987,7 +987,7 @@
else
{
$dataentryoutput .= "\t<tr>\n"
."\t\t<td>$setfont<input type='checkbox' name=\"{$fnames[$i][0]}\" value='Y'";
."\t\t<td>$setfont<input type='checkbox' class='checkboxbtn' name=\"{$fnames[$i][0]}\" value='Y'";
if ($idrow[$fnames[$i][0]] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />{$fnames[$i][6]}</font></td>\n";
}
Expand Down Expand Up @@ -1037,7 +1037,7 @@
."\t\t<td>$setfont\n";
for ($j=1; $j<=5; $j++)
{
$dataentryoutput .= "\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='$j'";
$dataentryoutput .= "\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='$j'";
if ($idrow[$fnames[$i][0]] == $j) {$dataentryoutput .= " checked";}
$dataentryoutput .= " />$j&nbsp;\n";
}
Expand All @@ -1059,7 +1059,7 @@
."\t\t<td>$setfont\n";
for ($j=1; $j<=10; $j++)
{
$dataentryoutput .= "\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='$j'";
$dataentryoutput .= "\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='$j'";
if ($idrow[$fnames[$i][0]] == $j) {$dataentryoutput .= " checked";}
$dataentryoutput .= " />$j&nbsp;\n";
}
Expand All @@ -1079,13 +1079,13 @@
$dataentryoutput .= "\t<tr>\n"
."\t\t<td align='right'>$setfont{$fnames[$i][6]}</font></td>\n"
."\t\t<td>$setfont\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='Y'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='Y'";
if ($idrow[$fnames[$i][0]] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />".$clang->gT("Yes")."&nbsp;\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='U'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='U'";
if ($idrow[$fnames[$i][0]] == "U") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />".$clang->gT("Uncertain")."&nbsp;\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='N'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='N'";
if ($idrow[$fnames[$i][0]] == "N") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />".$clang->gT("No")."&nbsp;\n"
."\t\t</font></td>\n"
Expand All @@ -1104,13 +1104,13 @@
$dataentryoutput .= "\t<tr>\n"
."\t\t<td align='right'>$setfont{$fnames[$i][6]}</font></td>\n"
."\t\t<td>$setfont\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='I'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='I'";
if ($idrow[$fnames[$i][0]] == "I") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />Increase&nbsp;\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='S'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='S'";
if ($idrow[$fnames[$i][0]] == "I") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />Same&nbsp;\n"
."\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='D'";
."\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='D'";
if ($idrow[$fnames[$i][0]] == "D") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />Decrease&nbsp;\n"
."\t\t</font></td>\n"
Expand All @@ -1134,7 +1134,7 @@
$dataentryoutput .= "\t\t<td>$setfont\n";
while ($frow=$fresult->FetchRow())
{
$dataentryoutput .= "\t\t\t<input type='radio' name='{$fnames[$i][0]}' value='{$frow['code']}'";
$dataentryoutput .= "\t\t\t<input type='radio' class='radiobtn' name='{$fnames[$i][0]}' value='{$frow['code']}'";
if ($idrow[$fnames[$i][0]] == $frow['code']) {$dataentryoutput .= " checked";}
$dataentryoutput .= " />".$frow['title']."&nbsp;\n";
}
Expand Down Expand Up @@ -1191,7 +1191,7 @@ function saveshow(value)
</script>\n";
$dataentryoutput .= "\t<tr>\n";
$dataentryoutput .= "\t\t<td colspan='3' align='center' bgcolor='#CCCCCC'>$setfont\n";
$dataentryoutput .= "\t\t\t<input type='checkbox' name='save' id='save' onchange='saveshow(this.id)' onLoad='saveshow(this.id)'><label for='save'>".$clang->gT("Save as a partially completed survey")."</label>\n";
$dataentryoutput .= "\t\t\t<input type='checkbox' class='checkboxbtn' name='save' id='save' onchange='saveshow(this.id)' onLoad='saveshow(this.id)'><label for='save'>".$clang->gT("Save as a partially completed survey")."</label>\n";
$dataentryoutput .= "<div name='saveoptions' id='saveoptions' style='display: none'>\n";
$dataentryoutput .= "<table align='center' class='outlinetable' cellspacing='0'>
<tr><td align='right'>".$clang->gT("Identifier:")."</td>
Expand Down Expand Up @@ -1905,7 +1905,7 @@ function saveshow(value)
$dataentryoutput .= $divider;
$upto=0;
}
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='$fieldname{$mearow['code']}' id='answer$fieldname{$mearow['code']}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='$fieldname{$mearow['code']}' id='answer$fieldname{$mearow['code']}' value='Y'";
if ($mearow['default_value'] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " /><label for='$fieldname{$mearow['code']}'>{$mearow['answer']}</label></font><br />\n";
$upto++;
Expand All @@ -1922,7 +1922,7 @@ function saveshow(value)
{
while ($mearow = $mearesult->FetchRow())
{
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='$fieldname{$mearow['code']}' id='answer$fieldname{$mearow['code']}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='$fieldname{$mearow['code']}' id='answer$fieldname{$mearow['code']}' value='Y'";
if ($mearow['default_value'] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " /><label for='$fieldname{$mearow['code']}'>{$mearow['answer']}</label></font><br />\n";
}
Expand All @@ -1938,7 +1938,7 @@ function saveshow(value)
$mearesult = db_execute_assoc($meaquery);
while ($mearow = $mearesult->FetchRow())
{
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='$fieldname{$mearow['code']}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='$fieldname{$mearow['code']}' value='Y'";
if ($mearow['default_value'] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />{$mearow['answer']}<br />\n";
}
Expand All @@ -1963,7 +1963,7 @@ function saveshow(value)
{
$dataentryoutput .= "\t<tr>\n";
$dataentryoutput .= "\t\t<td>\n";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' name='$fieldname{$mearow['code']}' value='Y'";
$dataentryoutput .= "\t\t\t$setfont<input type='checkbox' class='checkboxbtn' name='$fieldname{$mearow['code']}' value='Y'";
if ($mearow['default_value'] == "Y") {$dataentryoutput .= " checked";}
$dataentryoutput .= " />{$mearow['answer']}\n";
$dataentryoutput .= "\t\t</font></td>\n";
Expand Down Expand Up @@ -2140,7 +2140,7 @@ function saveshow(value)
</script>\n";
$dataentryoutput .= "\t<tr>\n";
$dataentryoutput .= "\t\t<td colspan='3' align='center' bgcolor='#CCCCCC'>$setfont\n";
$dataentryoutput .= "\t\t\t<input type='checkbox' name='save' id='save' onchange='saveshow(this.id)' onLoad='saveshow(this.id)'><label for='save'>".$clang->gT("Save as a partially completed survey")."</label>\n";
$dataentryoutput .= "\t\t\t<input type='checkbox' class='checkboxbtn' name='save' id='save' onchange='saveshow(this.id)' onLoad='saveshow(this.id)'><label for='save'>".$clang->gT("Save as a partially completed survey")."</label>\n";
$dataentryoutput .= "<div name='saveoptions' id='saveoptions' style='display: none'>\n";
$dataentryoutput .= "<table align='center' class='outlinetable' cellspacing='0'>
<tr><td align='right'>".$clang->gT("Identifier:")."</td>
Expand Down
28 changes: 14 additions & 14 deletions admin/exportresults.php
Expand Up @@ -134,13 +134,13 @@
.$clang->gT("Questions")."</strong></font></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' name='style' value='abrev' id='headabbrev'>"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='style' value='abrev' id='headabbrev'>"
."<font size='1'><label for='headabbrev'>"
.$clang->gT("Abbreviated headings")."</label><br />\n"
."\t\t\t<input type='radio' checked name='style' value='full' id='headfull'>"
."\t\t\t<input type='radio' class='radiobtn' checked name='style' value='full' id='headfull'>"
."<label for='headfull'>"
.$clang->gT("Full headings")."</label><br />\n"
."\t\t\t<input type='radio' checked name='style' value='headcodes' id='headcodes'>"
."\t\t\t<input type='radio' class='radiobtn' checked name='style' value='headcodes' id='headcodes'>"
."<label for='headcodes'>"
.$clang->gT("Question Codes")."</label>\n"
."\t\t</font></font></td>\n"
Expand All @@ -149,10 +149,10 @@
.$clang->gT("Answers")."</strong></font></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' name='answers' value='short' id='ansabbrev'>"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='answers' value='short' id='ansabbrev'>"
."<font size='1'><label for='ansabbrev'>"
.$clang->gT("Answer Codes")."</label><br />\n"
."\t\t\t<input type='radio' checked name='answers' value='long' id='ansfull'>"
."\t\t\t<input type='radio' class='radiobtn' checked name='answers' value='long' id='ansfull'>"
."<label for='ansfull'>"
.$clang->gT("Full Answers")."</label>\n"
."\t\t</font></font></td>\n"
Expand All @@ -161,13 +161,13 @@
.$clang->gT("Format")."</strong></font></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' name='type' value='doc' id='worddoc'>"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='type' value='doc' id='worddoc'>"
."<font size='1'><label for='worddoc'>"
.$clang->gT("Microsoft Word")."</label><br />\n"
."\t\t\t<input type='radio' name='type' value='xls' checked id='exceldoc'>"
."\t\t\t<input type='radio' class='radiobtn' name='type' value='xls' checked id='exceldoc'>"
."<label for='exceldoc'>"
.$clang->gT("Microsoft Excel")."</label><br />\n"
."\t\t\t<input type='radio' name='type' value='csv' id='csvdoc'>"
."\t\t\t<input type='radio' class='radiobtn' name='type' value='csv' id='csvdoc'>"
."<label for='csvdoc'>"
.$clang->gT("CSV Comma Delimited")."</label>\n"
."\t\t</font></font></td>\n"
Expand Down Expand Up @@ -280,22 +280,22 @@
."<img src='$imagefiles/help.gif' alt='".$clang->gT("Help")."' align='right' onclick='javascript:alert(\""
.$clang->gT("Your survey can export associated token data with each response. Select any additional fields you would like to export.","js")
."\")' /><br /><br />\n"
."<input type='checkbox' name='first_name' id='first_name'>"
."<input type='checkbox' class='checkboxbtn' name='first_name' id='first_name'>"
."<label for='first_name'>".$clang->gT("First Name")."</label><br />\n"
."<input type='checkbox' name='last_name' id='last_name'>"
."<input type='checkbox' class='checkboxbtn' name='last_name' id='last_name'>"
."<label for='last_name'>".$clang->gT("Last Name")."</label><br />\n"
."<input type='checkbox' name='email_address' id='email_address'>"
."<input type='checkbox' class='checkboxbtn' name='email_address' id='email_address'>"
."<label for='email_address'>".$clang->gT("Email")."</label><br />\n"
."<input type='checkbox' name='token' id='token'>"
."<input type='checkbox' class='checkboxbtn' name='token' id='token'>"
."<label for='token'>".$clang->gT("Token")."</label><br />\n";
$query = "SELECT * FROM {$dbprefix}tokens_$surveyid"; //SEE IF TOKENS TABLE HAS ATTRIBUTE FIELDS
$result = db_select_limit_assoc($query, 1) or die ($query."<br />".htmlspecialchars($connect->ErrorMsg()));
$rowcount = $result->FieldCount();
if ($rowcount > 7)
{
$exportoutput .= "<input type='checkbox' name='attribute_1' id='attribute_1'>"
$exportoutput .= "<input type='checkbox' class='checkboxbtn' name='attribute_1' id='attribute_1'>"
."<label for='attribute_1'>".$clang->gT("Attribute 1")."</label><br />\n"
."<input type='checkbox' name='attribute_2' id='attribute_2'>"
."<input type='checkbox' class='checkboxbtn' name='attribute_2' id='attribute_2'>"
."<label for='attribute_2'>".$clang->gT("Attribute 2")."</label><br />\n";
}
$exportoutput .= "\t\t</font></font></td>\n"
Expand Down
24 changes: 12 additions & 12 deletions admin/html.php
Expand Up @@ -1561,32 +1561,32 @@
. "<form action='$scriptname?sid={$surveyid}' method='post'>\n";

//content
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"edit_survey_property\" value=\"edit_survey_property\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"edit_survey_property\" value=\"edit_survey_property\"";
if($resul2row['edit_survey_property']) {
$usersummary .= " checked ";
}
$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"define_questions\" value=\"define_questions\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"define_questions\" value=\"define_questions\"";
if($resul2row['define_questions']) {
$usersummary .= " checked ";
}
$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"browse_response\" value=\"browse_response\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"browse_response\" value=\"browse_response\"";
if($resul2row['browse_response']) {
$usersummary .= " checked ";
}
$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"export\" value=\"export\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"export\" value=\"export\"";
if($resul2row['export']) {
$usersummary .= " checked ";
}
$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"delete_survey\" value=\"delete_survey\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"delete_survey\" value=\"delete_survey\"";
if($resul2row['delete_survey']) {
$usersummary .= " checked ";
}
$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"activate_survey\" value=\"activate_survey\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"activate_survey\" value=\"activate_survey\"";
if($resul2row['activate_survey']) {
$usersummary .= " checked ";
}
Expand Down Expand Up @@ -1626,22 +1626,22 @@
. "<form action='$scriptname?sid={$surveyid}' method='post'>\n";

//content
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"edit_survey_property\" value=\"edit_survey_property\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"edit_survey_property\" value=\"edit_survey_property\"";

$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"define_questions\" value=\"define_questions\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"define_questions\" value=\"define_questions\"";

$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"browse_response\" value=\"browse_response\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"browse_response\" value=\"browse_response\"";

$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"export\" value=\"export\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"export\" value=\"export\"";

$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"delete_survey\" value=\"delete_survey\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"delete_survey\" value=\"delete_survey\"";

$usersummary .=" /></td>\n";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" name=\"activate_survey\" value=\"activate_survey\"";
$usersummary .= "\t\t<td align='center'><input type=\"checkbox\" class=\"checkboxbtn\" name=\"activate_survey\" value=\"activate_survey\"";

$usersummary .=" /></td>\n";

Expand Down

0 comments on commit 05e02e0

Please sign in to comment.