Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug #738: Warning message for end-user with javascript disabled…
… on the browser, see {CHECKJAVASCRIPT} tag and .warningjs style class

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2691 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Apr 5, 2007
1 parent abfb3df commit 56f073f
Show file tree
Hide file tree
Showing 22 changed files with 84 additions and 7 deletions.
1 change: 1 addition & 0 deletions common.php
Expand Up @@ -1765,6 +1765,7 @@ function templatereplace($line)
return $line;
}

if (strpos($line, "{CHECKJAVASCRIPT}") !== false) $line=str_replace("{CHECKJAVASCRIPT}", "<noscript><SPAN class=warningjs>".$clang->gT("Caution: JavaScript execution is disabled in your browser. You may not be able to answer all questions in this survey. Please, verify your browser parameters.")."</span></noscript>", $line);
if (strpos($line, "{SURVEYNAME}") !== false) $line=str_replace("{SURVEYNAME}", $thissurvey['name'], $line);
if (strpos($line, "{SURVEYDESCRIPTION}") !== false) $line=str_replace("{SURVEYDESCRIPTION}", $thissurvey['description'], $line);
if (strpos($line, "{WELCOME}") !== false) $line=str_replace("{WELCOME}", $thissurvey['welcome'], $line);
Expand Down
1 change: 1 addition & 0 deletions templates/basic/startpage.pstpl
Expand Up @@ -17,6 +17,7 @@ img { border: 0; }
.array1 { background-color: #eeeeee; }
.array2 { background-color: #ffffff; }
.errormandatory { font-size: 13px; font-weight: bold; color:#ff0000; }
.warningjs { font-size: 13px; font-weight: bold; color:#ff0000; }
.asterisk
{
color: #FF0000;
Expand Down
1 change: 1 addition & 0 deletions templates/basic/welcome.pstpl
@@ -1,4 +1,5 @@
<table width="80%" align='center' class='bf' cellpadding='0' cellspacing='0'>
{CHECKJAVASCRIPT}
<tr>
<td rowspan='2'><table width='100%' cellspacing='10'>
<tr>
Expand Down
6 changes: 6 additions & 0 deletions templates/blue_heaven/startpage.pstpl
Expand Up @@ -99,6 +99,12 @@ body
font-weight:bold;
color:RED;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
3 changes: 2 additions & 1 deletion templates/blue_heaven/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='25' cellspacing='0' border='1' style='border-collapse: collapse;border-color:#111111'>
{CHECKJAVASCRIPT}
<tr>
<td align='center' bgcolor='#E5F9FF'>
<font size='5' color='#0A47FF'><b>{SURVEYNAME}</b></font><br /><br />
Expand All @@ -11,4 +12,4 @@
<i>{THEREAREXQUESTIONS}</i></font>
</td>
</tr>
</table>
</table>
7 changes: 7 additions & 0 deletions templates/bluengrey/startpage.pstpl
Expand Up @@ -22,6 +22,13 @@ body {
color:RED;
}

.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}

font{
font-family: Verdana;
font-size: 10px;
Expand Down
1 change: 1 addition & 0 deletions templates/bluengrey/welcome.pstpl
@@ -1,4 +1,5 @@
<table width="100%">
{CHECKJAVASCRIPT}
<tr bgcolor='#2F5376'>
<td>
<div align="center">
Expand Down
6 changes: 6 additions & 0 deletions templates/bubblegum/startpage.pstpl
Expand Up @@ -93,6 +93,12 @@ body{
font-weight:bold;
color:RED;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
3 changes: 2 additions & 1 deletion templates/bubblegum/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='25' cellspacing='0' border='1' style='border-collapse: collapse;border-color:#111111'>
{CHECKJAVASCRIPT}
<tr>
<td align='center' bgcolor='#800000'>
<font size='4' color='#F0F0FF'><strong>{SURVEYNAME}</strong></font><br />
Expand All @@ -11,4 +12,4 @@
<i>{THEREAREXQUESTIONS}</i></font>
</td>
</tr>
</table>
</table>
8 changes: 7 additions & 1 deletion templates/business_grey/startpage.pstpl
Expand Up @@ -115,6 +115,12 @@ body
background-color: #E1E1E1;
color: #777777;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand All @@ -126,4 +132,4 @@ body
<body>
<table width='500' align='center' style='border-collapse: collapse' bgcolor='#E1E1E1' border='4' cellspacing='0'>
<tr>
<td>
<td>
1 change: 1 addition & 0 deletions templates/business_grey/welcome.pstpl
@@ -1,4 +1,5 @@
<table width='500' style='border-collapse: collapse; border-bottom-width: 1; border-color: #EEEEEE' border='0'
{CHECKJAVASCRIPT}
<tr>
<td>
<table>
Expand Down
8 changes: 8 additions & 0 deletions templates/default/startpage.pstpl
Expand Up @@ -51,6 +51,14 @@ body.default
font-weight:bold;
color:RED;
}

.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}

.saveall
{
font-size:10px;
Expand Down
3 changes: 2 additions & 1 deletion templates/default/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='25' cellspacing='0' border='1' style='border-collapse: collapse; border-color: #111111'>
{CHECKJAVASCRIPT}
<tr>
<td align='center' bgcolor='#333333'>
<font face='verdana' size='4' color='yellow'><strong>{SURVEYNAME}</strong></font><br />
Expand All @@ -11,4 +12,4 @@
<i>{THEREAREXQUESTIONS}</i>
</font></td>
</tr>
</table>
</table>
6 changes: 6 additions & 0 deletions templates/edgyblue/startpage.pstpl
Expand Up @@ -110,6 +110,12 @@ body{
font-weight:bold;
color:RED;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
3 changes: 2 additions & 1 deletion templates/edgyblue/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='0' cellspacing='0'>
{CHECKJAVASCRIPT}
<tr>
<td width='10'><img src='{TEMPLATEURL}head_topleft.gif' alt='' /></td>
<td width='1000' style='background-image:url({TEMPLATEURL}head_top.gif)'></td>
Expand All @@ -24,4 +25,4 @@
</td>
<td></td>
</tr>
</table>
</table>
6 changes: 6 additions & 0 deletions templates/eirenicon/startpage.pstpl
Expand Up @@ -86,6 +86,12 @@ body{
font-family: verdana;
font-size: 10pt;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
3 changes: 2 additions & 1 deletion templates/eirenicon/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='25' cellspacing='0' border='1' style='border-collapse: collapse;border-color:#111111'>
{CHECKJAVASCRIPT}
<tr>
<td align='center' bgcolor='#042455'>
<font size='4' color='#E5E5E5'><b>{SURVEYNAME}</b></font><br />
Expand All @@ -11,4 +12,4 @@
<i>There are {NUMBEROFQUESTIONS} questions in this survey.</i></font>
</td>
</tr>
</table>
</table>
8 changes: 8 additions & 0 deletions templates/preview.pstpl
Expand Up @@ -51,6 +51,13 @@ body.default
font-weight:bold;
color:RED;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}

.saveall
{
font-size:10px;
Expand All @@ -68,6 +75,7 @@ body.default
</head>
<body class='default'>
<table width='75%' align='center' border='1' style='border-collapse: collapse; border-color: #111111' bgcolor='white'>
{CHECKJAVASCRIPT}
<tr>
<td align='center'>
<table width='100%' cellspacing='0'>
Expand Down
6 changes: 6 additions & 0 deletions templates/softgreencurves/startpage.pstpl
Expand Up @@ -91,6 +91,12 @@ body{
{
background-color: #EEFFEE;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
1 change: 1 addition & 0 deletions templates/softgreencurves/welcome.pstpl
@@ -1,4 +1,5 @@
<table width='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='#96F68C'>
{CHECKJAVASCRIPT}
<tr>
<td colspan='5' height='10' style='background-image:url({TEMPLATEURL}contgrid.gif)'></td>
</tr>
Expand Down
6 changes: 6 additions & 0 deletions templates/vallendar/startpage.pstpl
Expand Up @@ -87,6 +87,12 @@ body{
font-family: verdana;
font-size: 10pt;
}
.warningjs
{
font-size:12px;
font-weight:bold;
color:RED;
}
.asterisk
{
color: #FF0000;
Expand Down
3 changes: 2 additions & 1 deletion templates/vallendar/welcome.pstpl
@@ -1,4 +1,5 @@
<table align='center' width='100%' cellpadding='25' cellspacing='0' border='1' style='border-collapse: collapse' bordercolor='#111111'>
{CHECKJAVASCRIPT}
<tr>
<td align='left' bgcolor='#17479E'>
<font size='4' color='#E5E5E5'><b>{SURVEYNAME}</b></font><br />
Expand All @@ -12,4 +13,4 @@
{CLEARALL}
</td>
</tr>
</table>
</table>

0 comments on commit 56f073f

Please sign in to comment.