Version Description
- Fixed issue with random polls
- Fixed issue with tabulated display
- Removed autoscroll after a failed vote
- Fixed issue with inserted code when using html editor
- Fixed issue with blocking voters option
- Fixed issue with in_array causing errors
- Fixed twig compatibility
- Added Print Votes page
Download this release
Release Info
Developer | yourownprogrammer |
Plugin | YOP Poll |
Version | 5.7 |
Comparing to | |
See all releases |
Code changes from version 5.7.3 to 5.7
- inc/db_schema.php +16 -127
- inc/maintenance.php +2 -35
- inc/public-admin.php +2 -2
- inc/templates_admin.php +1 -1
- js/yop-poll-public.js +11 -28
- lib/Twig/TokenStream.php +0 -144
- models/abstract_model.php +2 -0
- models/poll_model.php +5 -4
- readme.txt +0 -9
- yop_poll.php +2 -2
inc/db_schema.php
CHANGED
@@ -537,7 +537,6 @@
|
|
537 |
%POLL-OTHER-ANSWER-LABEL%
|
538 |
<span id = "yop-poll-results-text-%POLL-ID%-%QUESTION-ID%"
|
539 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
540 |
-
|
541 |
%POLL-OTHER-ANSWER-TEXT-INPUT%
|
542 |
%POLL-ANSWER-RESULT-BAR%
|
543 |
</li>
|
@@ -863,14 +862,7 @@ NOWDOC;
|
|
863 |
Main Container
|
864 |
---------------------------------------------------------------------------
|
865 |
*/
|
866 |
-
|
867 |
-
border:1px solid #000000;
|
868 |
-
color:#000000;
|
869 |
-
}
|
870 |
-
.yop-poll-customfield-%POLL-ID% {
|
871 |
-
border:1px solid #000000;
|
872 |
-
color:#000000;
|
873 |
-
}
|
874 |
div#yop-poll-container-%POLL-ID% {
|
875 |
background:#fff;
|
876 |
box-sizing: border-box;
|
@@ -1044,7 +1036,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
1044 |
li.yop-poll-li-answer-%POLL-ID% {
|
1045 |
float: left;
|
1046 |
display: inline-block;
|
1047 |
-
width:
|
1048 |
padding: 1%;
|
1049 |
margin: 1%;
|
1050 |
}
|
@@ -1124,15 +1116,7 @@ NOWDOC;
|
|
1124 |
Main Container
|
1125 |
---------------------------------------------------------------------------
|
1126 |
*/
|
1127 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
1128 |
-
border:1px solid #000000;
|
1129 |
-
color:#000000;
|
1130 |
|
1131 |
-
}
|
1132 |
-
.yop-poll-customfield-%POLL-ID% {
|
1133 |
-
border:1px solid #000000;
|
1134 |
-
color:#000000;
|
1135 |
-
}
|
1136 |
div#yop-poll-container-%POLL-ID% {
|
1137 |
background:#eee;
|
1138 |
box-sizing: border-box;
|
@@ -1307,7 +1291,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
1307 |
li.yop-poll-li-answer-%POLL-ID% {
|
1308 |
float: left;
|
1309 |
display: inline-block;
|
1310 |
-
width:
|
1311 |
padding: 1%;
|
1312 |
margin: 1%;
|
1313 |
}
|
@@ -1394,13 +1378,7 @@ NOWDOC;
|
|
1394 |
Main Container
|
1395 |
---------------------------------------------------------------------------
|
1396 |
*/
|
1397 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
1398 |
-
color:#000000;
|
1399 |
|
1400 |
-
}
|
1401 |
-
.yop-poll-customfield-%POLL-ID% {
|
1402 |
-
color:#000000;
|
1403 |
-
}
|
1404 |
div#yop-poll-container-%POLL-ID% {
|
1405 |
background:#555;
|
1406 |
box-sizing: border-box;
|
@@ -1574,7 +1552,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
1574 |
li.yop-poll-li-answer-%POLL-ID% {
|
1575 |
float: left;
|
1576 |
display: inline-block;
|
1577 |
-
width:
|
1578 |
padding: 1%;
|
1579 |
margin: 1%;
|
1580 |
}
|
@@ -1662,13 +1640,7 @@ NOWDOC;
|
|
1662 |
Main Container
|
1663 |
---------------------------------------------------------------------------
|
1664 |
*/
|
1665 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
1666 |
-
color:#000000;
|
1667 |
|
1668 |
-
}
|
1669 |
-
.yop-poll-customfield-%POLL-ID% {
|
1670 |
-
color:#000000;
|
1671 |
-
}
|
1672 |
div#yop-poll-container-%POLL-ID% {
|
1673 |
background:#327BD6;
|
1674 |
box-sizing: border-box;
|
@@ -1842,7 +1814,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
1842 |
li.yop-poll-li-answer-%POLL-ID% {
|
1843 |
float: left;
|
1844 |
display: inline-block;
|
1845 |
-
width:
|
1846 |
padding: 1%;
|
1847 |
margin: 1%;
|
1848 |
}
|
@@ -1922,13 +1894,7 @@ NOWDOC;
|
|
1922 |
Main Container
|
1923 |
---------------------------------------------------------------------------
|
1924 |
*/
|
1925 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
1926 |
-
color:#000000;
|
1927 |
|
1928 |
-
}
|
1929 |
-
.yop-poll-customfield-%POLL-ID% {
|
1930 |
-
color:#000000;
|
1931 |
-
}
|
1932 |
div#yop-poll-container-%POLL-ID% {
|
1933 |
background:#fff;
|
1934 |
box-sizing: border-box;
|
@@ -2104,7 +2070,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
2104 |
li.yop-poll-li-answer-%POLL-ID% {
|
2105 |
float: left;
|
2106 |
display: inline-block;
|
2107 |
-
width:
|
2108 |
padding: 1%;
|
2109 |
margin: 1%;
|
2110 |
}
|
@@ -2184,15 +2150,6 @@ NOWDOC;
|
|
2184 |
Main Container
|
2185 |
---------------------------------------------------------------------------
|
2186 |
*/
|
2187 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
2188 |
-
border:1px solid #000000;
|
2189 |
-
color:#000000;
|
2190 |
-
|
2191 |
-
}
|
2192 |
-
.yop-poll-customfield-%POLL-ID% {
|
2193 |
-
border:1px solid #000000;
|
2194 |
-
color:#000000;
|
2195 |
-
}
|
2196 |
div#yop-poll-container-%POLL-ID% {
|
2197 |
background:#fff;
|
2198 |
box-sizing: border-box;
|
@@ -2367,7 +2324,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
2367 |
li.yop-poll-li-answer-%POLL-ID% {
|
2368 |
float: left;
|
2369 |
display: inline-block;
|
2370 |
-
width:
|
2371 |
padding: 1%;
|
2372 |
margin: 1%;
|
2373 |
}
|
@@ -2447,13 +2404,7 @@ NOWDOC;
|
|
2447 |
Main Container
|
2448 |
---------------------------------------------------------------------------
|
2449 |
*/
|
2450 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
2451 |
-
color:#000000;
|
2452 |
|
2453 |
-
}
|
2454 |
-
.yop-poll-customfield-%POLL-ID% {
|
2455 |
-
color:#000000;
|
2456 |
-
}
|
2457 |
div#yop-poll-container-%POLL-ID% {
|
2458 |
background:#B70004;
|
2459 |
box-sizing: border-box;
|
@@ -2627,7 +2578,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
2627 |
li.yop-poll-li-answer-%POLL-ID% {
|
2628 |
float: left;
|
2629 |
display: inline-block;
|
2630 |
-
width:
|
2631 |
padding: 1%;
|
2632 |
margin: 1%;
|
2633 |
}
|
@@ -2707,15 +2658,7 @@ NOWDOC;
|
|
2707 |
Main Container
|
2708 |
---------------------------------------------------------------------------
|
2709 |
*/
|
2710 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
2711 |
-
border:1px solid #000000;
|
2712 |
-
color:#000000;
|
2713 |
|
2714 |
-
}
|
2715 |
-
.yop-poll-customfield-%POLL-ID% {
|
2716 |
-
border:1px solid #000000;
|
2717 |
-
color:#000000;
|
2718 |
-
}
|
2719 |
div#yop-poll-container-%POLL-ID% {
|
2720 |
background:#fff;
|
2721 |
box-sizing: border-box;
|
@@ -2891,7 +2834,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
2891 |
li.yop-poll-li-answer-%POLL-ID% {
|
2892 |
float: left;
|
2893 |
display: inline-block;
|
2894 |
-
width:
|
2895 |
padding: 1%;
|
2896 |
margin: 1%;
|
2897 |
}
|
@@ -2971,15 +2914,7 @@ NOWDOC;
|
|
2971 |
Main Container
|
2972 |
---------------------------------------------------------------------------
|
2973 |
*/
|
2974 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
2975 |
-
border:1px solid #000000;
|
2976 |
-
color:#000000;
|
2977 |
|
2978 |
-
}
|
2979 |
-
.yop-poll-customfield-%POLL-ID% {
|
2980 |
-
border:1px solid #000000;
|
2981 |
-
color:#000000;
|
2982 |
-
}
|
2983 |
div#yop-poll-container-%POLL-ID% {
|
2984 |
background:#fff;
|
2985 |
box-sizing: border-box;
|
@@ -3154,7 +3089,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
3154 |
li.yop-poll-li-answer-%POLL-ID% {
|
3155 |
float: left;
|
3156 |
display: inline-block;
|
3157 |
-
width:
|
3158 |
padding: 1%;
|
3159 |
margin: 1%;
|
3160 |
}
|
@@ -3234,13 +3169,7 @@ NOWDOC;
|
|
3234 |
Main Container
|
3235 |
---------------------------------------------------------------------------
|
3236 |
*/
|
3237 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
3238 |
-
color:#000000;
|
3239 |
|
3240 |
-
}
|
3241 |
-
.yop-poll-customfield-%POLL-ID% {
|
3242 |
-
color:#000000;
|
3243 |
-
}
|
3244 |
div#yop-poll-container-%POLL-ID% {
|
3245 |
background:#3F8B43;
|
3246 |
box-sizing: border-box;
|
@@ -3414,7 +3343,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
3414 |
li.yop-poll-li-answer-%POLL-ID% {
|
3415 |
float: left;
|
3416 |
display: inline-block;
|
3417 |
-
width:
|
3418 |
padding: 1%;
|
3419 |
margin: 1%;
|
3420 |
}
|
@@ -3494,15 +3423,7 @@ NOWDOC;
|
|
3494 |
Main Container
|
3495 |
---------------------------------------------------------------------------
|
3496 |
*/
|
3497 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
3498 |
-
border:1px solid #000000;
|
3499 |
-
color:#000000;
|
3500 |
|
3501 |
-
}
|
3502 |
-
.yop-poll-customfield-%POLL-ID% {
|
3503 |
-
border:1px solid #000000;
|
3504 |
-
color:#000000;
|
3505 |
-
}
|
3506 |
div#yop-poll-container-%POLL-ID% {
|
3507 |
background:#fff;
|
3508 |
box-sizing: border-box;
|
@@ -3678,7 +3599,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
3678 |
li.yop-poll-li-answer-%POLL-ID% {
|
3679 |
float: left;
|
3680 |
display: inline-block;
|
3681 |
-
width:
|
3682 |
padding: 1%;
|
3683 |
margin: 1%;
|
3684 |
}
|
@@ -3759,15 +3680,7 @@ NOWDOC;
|
|
3759 |
Main Container
|
3760 |
---------------------------------------------------------------------------
|
3761 |
*/
|
3762 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
3763 |
-
border:1px solid #000000;
|
3764 |
-
color:#000000;
|
3765 |
|
3766 |
-
}
|
3767 |
-
.yop-poll-customfield-%POLL-ID% {
|
3768 |
-
border:1px solid #000000;
|
3769 |
-
color:#000000;
|
3770 |
-
}
|
3771 |
div#yop-poll-container-%POLL-ID% {
|
3772 |
background:#fff;
|
3773 |
box-sizing: border-box;
|
@@ -3942,7 +3855,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
3942 |
li.yop-poll-li-answer-%POLL-ID% {
|
3943 |
float: left;
|
3944 |
display: inline-block;
|
3945 |
-
width:
|
3946 |
padding: 1%;
|
3947 |
margin: 1%;
|
3948 |
}
|
@@ -4022,13 +3935,6 @@ NOWDOC;
|
|
4022 |
Main Container
|
4023 |
---------------------------------------------------------------------------
|
4024 |
*/
|
4025 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
4026 |
-
color:#000000;
|
4027 |
-
|
4028 |
-
}
|
4029 |
-
.yop-poll-customfield-%POLL-ID% {
|
4030 |
-
color:#000000;
|
4031 |
-
}
|
4032 |
div#yop-poll-container-%POLL-ID% {
|
4033 |
background:#FB6911;
|
4034 |
box-sizing: border-box;
|
@@ -4202,7 +4108,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
4202 |
li.yop-poll-li-answer-%POLL-ID% {
|
4203 |
float: left;
|
4204 |
display: inline-block;
|
4205 |
-
width:
|
4206 |
padding: 1%;
|
4207 |
margin: 1%;
|
4208 |
}
|
@@ -4283,15 +4189,6 @@ NOWDOC;
|
|
4283 |
Main Container
|
4284 |
---------------------------------------------------------------------------
|
4285 |
*/
|
4286 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
4287 |
-
border:1px solid #000000;
|
4288 |
-
color:#000000;
|
4289 |
-
|
4290 |
-
}
|
4291 |
-
.yop-poll-customfield-%POLL-ID% {
|
4292 |
-
border:1px solid #000000;
|
4293 |
-
color:#000000;
|
4294 |
-
}
|
4295 |
div#yop-poll-container-%POLL-ID% {
|
4296 |
background:#fff;
|
4297 |
box-sizing: border-box;
|
@@ -4467,7 +4364,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
4467 |
li.yop-poll-li-answer-%POLL-ID% {
|
4468 |
float: left;
|
4469 |
display: inline-block;
|
4470 |
-
width:
|
4471 |
padding: 1%;
|
4472 |
margin: 1%;
|
4473 |
}
|
@@ -4547,15 +4444,7 @@ NOWDOC;
|
|
4547 |
Main Container
|
4548 |
---------------------------------------------------------------------------
|
4549 |
*/
|
4550 |
-
#yop-poll-other-answer-%POLL-ID%-other {
|
4551 |
-
border:1px solid #000000;
|
4552 |
-
color:#000000;
|
4553 |
|
4554 |
-
}
|
4555 |
-
.yop-poll-customfield-%POLL-ID% {
|
4556 |
-
border:1px solid #000000;
|
4557 |
-
color:#000000;
|
4558 |
-
}
|
4559 |
div#yop-poll-container-%POLL-ID% {
|
4560 |
background:#fff;
|
4561 |
box-sizing: border-box;
|
@@ -4729,7 +4618,7 @@ li.yop-poll-results-%POLL-ID% {
|
|
4729 |
li.yop-poll-li-answer-%POLL-ID% {
|
4730 |
float: left;
|
4731 |
display: inline-block;
|
4732 |
-
width:
|
4733 |
padding: 1%;
|
4734 |
margin: 1%;
|
4735 |
}
|
537 |
%POLL-OTHER-ANSWER-LABEL%
|
538 |
<span id = "yop-poll-results-text-%POLL-ID%-%QUESTION-ID%"
|
539 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
|
|
540 |
%POLL-OTHER-ANSWER-TEXT-INPUT%
|
541 |
%POLL-ANSWER-RESULT-BAR%
|
542 |
</li>
|
862 |
Main Container
|
863 |
---------------------------------------------------------------------------
|
864 |
*/
|
865 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
div#yop-poll-container-%POLL-ID% {
|
867 |
background:#fff;
|
868 |
box-sizing: border-box;
|
1036 |
li.yop-poll-li-answer-%POLL-ID% {
|
1037 |
float: left;
|
1038 |
display: inline-block;
|
1039 |
+
width: 46%;
|
1040 |
padding: 1%;
|
1041 |
margin: 1%;
|
1042 |
}
|
1116 |
Main Container
|
1117 |
---------------------------------------------------------------------------
|
1118 |
*/
|
|
|
|
|
|
|
1119 |
|
|
|
|
|
|
|
|
|
|
|
1120 |
div#yop-poll-container-%POLL-ID% {
|
1121 |
background:#eee;
|
1122 |
box-sizing: border-box;
|
1291 |
li.yop-poll-li-answer-%POLL-ID% {
|
1292 |
float: left;
|
1293 |
display: inline-block;
|
1294 |
+
width: 46%;
|
1295 |
padding: 1%;
|
1296 |
margin: 1%;
|
1297 |
}
|
1378 |
Main Container
|
1379 |
---------------------------------------------------------------------------
|
1380 |
*/
|
|
|
|
|
1381 |
|
|
|
|
|
|
|
|
|
1382 |
div#yop-poll-container-%POLL-ID% {
|
1383 |
background:#555;
|
1384 |
box-sizing: border-box;
|
1552 |
li.yop-poll-li-answer-%POLL-ID% {
|
1553 |
float: left;
|
1554 |
display: inline-block;
|
1555 |
+
width: 46%;
|
1556 |
padding: 1%;
|
1557 |
margin: 1%;
|
1558 |
}
|
1640 |
Main Container
|
1641 |
---------------------------------------------------------------------------
|
1642 |
*/
|
|
|
|
|
1643 |
|
|
|
|
|
|
|
|
|
1644 |
div#yop-poll-container-%POLL-ID% {
|
1645 |
background:#327BD6;
|
1646 |
box-sizing: border-box;
|
1814 |
li.yop-poll-li-answer-%POLL-ID% {
|
1815 |
float: left;
|
1816 |
display: inline-block;
|
1817 |
+
width: 46%;
|
1818 |
padding: 1%;
|
1819 |
margin: 1%;
|
1820 |
}
|
1894 |
Main Container
|
1895 |
---------------------------------------------------------------------------
|
1896 |
*/
|
|
|
|
|
1897 |
|
|
|
|
|
|
|
|
|
1898 |
div#yop-poll-container-%POLL-ID% {
|
1899 |
background:#fff;
|
1900 |
box-sizing: border-box;
|
2070 |
li.yop-poll-li-answer-%POLL-ID% {
|
2071 |
float: left;
|
2072 |
display: inline-block;
|
2073 |
+
width: 46%;
|
2074 |
padding: 1%;
|
2075 |
margin: 1%;
|
2076 |
}
|
2150 |
Main Container
|
2151 |
---------------------------------------------------------------------------
|
2152 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2153 |
div#yop-poll-container-%POLL-ID% {
|
2154 |
background:#fff;
|
2155 |
box-sizing: border-box;
|
2324 |
li.yop-poll-li-answer-%POLL-ID% {
|
2325 |
float: left;
|
2326 |
display: inline-block;
|
2327 |
+
width: 46%;
|
2328 |
padding: 1%;
|
2329 |
margin: 1%;
|
2330 |
}
|
2404 |
Main Container
|
2405 |
---------------------------------------------------------------------------
|
2406 |
*/
|
|
|
|
|
2407 |
|
|
|
|
|
|
|
|
|
2408 |
div#yop-poll-container-%POLL-ID% {
|
2409 |
background:#B70004;
|
2410 |
box-sizing: border-box;
|
2578 |
li.yop-poll-li-answer-%POLL-ID% {
|
2579 |
float: left;
|
2580 |
display: inline-block;
|
2581 |
+
width: 46%;
|
2582 |
padding: 1%;
|
2583 |
margin: 1%;
|
2584 |
}
|
2658 |
Main Container
|
2659 |
---------------------------------------------------------------------------
|
2660 |
*/
|
|
|
|
|
|
|
2661 |
|
|
|
|
|
|
|
|
|
|
|
2662 |
div#yop-poll-container-%POLL-ID% {
|
2663 |
background:#fff;
|
2664 |
box-sizing: border-box;
|
2834 |
li.yop-poll-li-answer-%POLL-ID% {
|
2835 |
float: left;
|
2836 |
display: inline-block;
|
2837 |
+
width: 46%;
|
2838 |
padding: 1%;
|
2839 |
margin: 1%;
|
2840 |
}
|
2914 |
Main Container
|
2915 |
---------------------------------------------------------------------------
|
2916 |
*/
|
|
|
|
|
|
|
2917 |
|
|
|
|
|
|
|
|
|
|
|
2918 |
div#yop-poll-container-%POLL-ID% {
|
2919 |
background:#fff;
|
2920 |
box-sizing: border-box;
|
3089 |
li.yop-poll-li-answer-%POLL-ID% {
|
3090 |
float: left;
|
3091 |
display: inline-block;
|
3092 |
+
width: 46%;
|
3093 |
padding: 1%;
|
3094 |
margin: 1%;
|
3095 |
}
|
3169 |
Main Container
|
3170 |
---------------------------------------------------------------------------
|
3171 |
*/
|
|
|
|
|
3172 |
|
|
|
|
|
|
|
|
|
3173 |
div#yop-poll-container-%POLL-ID% {
|
3174 |
background:#3F8B43;
|
3175 |
box-sizing: border-box;
|
3343 |
li.yop-poll-li-answer-%POLL-ID% {
|
3344 |
float: left;
|
3345 |
display: inline-block;
|
3346 |
+
width: 46%;
|
3347 |
padding: 1%;
|
3348 |
margin: 1%;
|
3349 |
}
|
3423 |
Main Container
|
3424 |
---------------------------------------------------------------------------
|
3425 |
*/
|
|
|
|
|
|
|
3426 |
|
|
|
|
|
|
|
|
|
|
|
3427 |
div#yop-poll-container-%POLL-ID% {
|
3428 |
background:#fff;
|
3429 |
box-sizing: border-box;
|
3599 |
li.yop-poll-li-answer-%POLL-ID% {
|
3600 |
float: left;
|
3601 |
display: inline-block;
|
3602 |
+
width: 46%;
|
3603 |
padding: 1%;
|
3604 |
margin: 1%;
|
3605 |
}
|
3680 |
Main Container
|
3681 |
---------------------------------------------------------------------------
|
3682 |
*/
|
|
|
|
|
|
|
3683 |
|
|
|
|
|
|
|
|
|
|
|
3684 |
div#yop-poll-container-%POLL-ID% {
|
3685 |
background:#fff;
|
3686 |
box-sizing: border-box;
|
3855 |
li.yop-poll-li-answer-%POLL-ID% {
|
3856 |
float: left;
|
3857 |
display: inline-block;
|
3858 |
+
width: 46%;
|
3859 |
padding: 1%;
|
3860 |
margin: 1%;
|
3861 |
}
|
3935 |
Main Container
|
3936 |
---------------------------------------------------------------------------
|
3937 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3938 |
div#yop-poll-container-%POLL-ID% {
|
3939 |
background:#FB6911;
|
3940 |
box-sizing: border-box;
|
4108 |
li.yop-poll-li-answer-%POLL-ID% {
|
4109 |
float: left;
|
4110 |
display: inline-block;
|
4111 |
+
width: 46%;
|
4112 |
padding: 1%;
|
4113 |
margin: 1%;
|
4114 |
}
|
4189 |
Main Container
|
4190 |
---------------------------------------------------------------------------
|
4191 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4192 |
div#yop-poll-container-%POLL-ID% {
|
4193 |
background:#fff;
|
4194 |
box-sizing: border-box;
|
4364 |
li.yop-poll-li-answer-%POLL-ID% {
|
4365 |
float: left;
|
4366 |
display: inline-block;
|
4367 |
+
width: 46%;
|
4368 |
padding: 1%;
|
4369 |
margin: 1%;
|
4370 |
}
|
4444 |
Main Container
|
4445 |
---------------------------------------------------------------------------
|
4446 |
*/
|
|
|
|
|
|
|
4447 |
|
|
|
|
|
|
|
|
|
|
|
4448 |
div#yop-poll-container-%POLL-ID% {
|
4449 |
background:#fff;
|
4450 |
box-sizing: border-box;
|
4618 |
li.yop-poll-li-answer-%POLL-ID% {
|
4619 |
float: left;
|
4620 |
display: inline-block;
|
4621 |
+
width: 46%;
|
4622 |
padding: 1%;
|
4623 |
margin: 1%;
|
4624 |
}
|
inc/maintenance.php
CHANGED
@@ -566,13 +566,6 @@ NOWDOC;
|
|
566 |
update_option( 'yop_poll_options', $default_poll_options );
|
567 |
|
568 |
$wpdb->query( 'ALTER TABLE `' . $wpdb->yop_poll_templates . '` ADD `after_vote_template_chart` text' );
|
569 |
-
update_option( "yop_poll_version", '5.7' );
|
570 |
-
|
571 |
-
}
|
572 |
-
if ( version_compare( $installed_version, '5.7', '<=' ) ){
|
573 |
-
global $wpdb;
|
574 |
-
update_option( "yop_poll_version", YOP_POLL_VERSION );
|
575 |
-
|
576 |
$templates = self::yop_poll_get_templates_new_version_from_db();
|
577 |
foreach($templates as $template){
|
578 |
$template['js']= <<<NOWDOC
|
@@ -751,37 +744,11 @@ NOWDOC;
|
|
751 |
%SHARE-BUTTON%
|
752 |
</div>
|
753 |
NOWDOC;
|
754 |
-
self::update_poll_template_in_database2($template);
|
755 |
}
|
756 |
-
update_option( "yop_poll_version", '5.7
|
757 |
|
758 |
}
|
759 |
-
if ( version_compare( $installed_version, '5.7.1', '<=' ) ){
|
760 |
-
global $wpdb;
|
761 |
-
update_option( "yop_poll_version", '5.7.2' );
|
762 |
-
}
|
763 |
-
if ( version_compare( $installed_version, '5.7.2', '<=' ) ){
|
764 |
-
global $wpdb;
|
765 |
-
update_option( "yop_poll_version", '5.7.3' );
|
766 |
-
}
|
767 |
-
}
|
768 |
-
private static function update_poll_template_in_database2( $template ) {
|
769 |
-
global $wpdb;
|
770 |
-
$sql = $wpdb->query( $wpdb->prepare( "
|
771 |
-
UPDATE " . $wpdb->yop_poll_templates . "
|
772 |
-
SET name = %s,
|
773 |
-
before_vote_template = %s,
|
774 |
-
after_vote_template = %s,
|
775 |
-
after_vote_template_chart = %s,
|
776 |
-
before_start_date_template = %s,
|
777 |
-
after_end_date_template = %s,
|
778 |
-
css = %s,
|
779 |
-
js = %s,
|
780 |
-
last_modified = %s
|
781 |
-
WHERE
|
782 |
-
id = %d
|
783 |
-
", $template['name'], $template['before_vote_template'], $template['after_vote_template'],$template['after_vote_template_chart'], $template['before_start_date_template'], $template['after_end_date_template'], $template['css'], $template['js'], current_time( 'mysql' ), $template['id'] ) );
|
784 |
-
return $sql;
|
785 |
}
|
786 |
public function yop_poll_get_polls_for_body_mail_update(){
|
787 |
global $wpdb;
|
566 |
update_option( 'yop_poll_options', $default_poll_options );
|
567 |
|
568 |
$wpdb->query( 'ALTER TABLE `' . $wpdb->yop_poll_templates . '` ADD `after_vote_template_chart` text' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
$templates = self::yop_poll_get_templates_new_version_from_db();
|
570 |
foreach($templates as $template){
|
571 |
$template['js']= <<<NOWDOC
|
744 |
%SHARE-BUTTON%
|
745 |
</div>
|
746 |
NOWDOC;
|
747 |
+
self::update_poll_template_in_database2(($template));
|
748 |
}
|
749 |
+
update_option( "yop_poll_version", '5.7' );
|
750 |
|
751 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
752 |
}
|
753 |
public function yop_poll_get_polls_for_body_mail_update(){
|
754 |
global $wpdb;
|
inc/public-admin.php
CHANGED
@@ -260,6 +260,7 @@
|
|
260 |
if( $results ) {
|
261 |
$yop_poll_model->vote = true;
|
262 |
}
|
|
|
263 |
$template = $yop_poll_model->return_poll_html( array( 'tr_id' => $tr_id,
|
264 |
|
265 |
'location' => 'page',
|
@@ -336,10 +337,9 @@
|
|
336 |
if( 'tabulated' == $question->display_results )
|
337 |
$tabulate['results']=true;
|
338 |
}
|
339 |
-
|
340 |
|
341 |
wp_enqueue_script( 'yop-poll-public-js', YOP_POLL_URL . "js/yop-poll-public.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
342 |
-
wp_localize_script( 'yop-poll-public-js', 'tabulate', $tabulate );
|
343 |
wp_enqueue_script( 'yop-poll-supercookie-js', YOP_POLL_URL . "js/yop-poll-supercookie.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
344 |
wp_enqueue_script( 'superCookie-min-js', YOP_POLL_URL . "js/super-cookie/superCookie-min.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
345 |
wp_enqueue_script( 'swfobject-js', YOP_POLL_URL . "js/super-cookie/swfobject/swfobject.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
260 |
if( $results ) {
|
261 |
$yop_poll_model->vote = true;
|
262 |
}
|
263 |
+
|
264 |
$template = $yop_poll_model->return_poll_html( array( 'tr_id' => $tr_id,
|
265 |
|
266 |
'location' => 'page',
|
337 |
if( 'tabulated' == $question->display_results )
|
338 |
$tabulate['results']=true;
|
339 |
}
|
340 |
+
wp_localize_script( 'yop-poll-public-js', 'tabulate', $tabulate );
|
341 |
|
342 |
wp_enqueue_script( 'yop-poll-public-js', YOP_POLL_URL . "js/yop-poll-public.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
|
|
343 |
wp_enqueue_script( 'yop-poll-supercookie-js', YOP_POLL_URL . "js/yop-poll-supercookie.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
344 |
wp_enqueue_script( 'superCookie-min-js', YOP_POLL_URL . "js/super-cookie/superCookie-min.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
345 |
wp_enqueue_script( 'swfobject-js', YOP_POLL_URL . "js/super-cookie/swfobject/swfobject.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
inc/templates_admin.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php
|
2 |
private static $_instance = NULL;
|
3 |
protected function __construct() {
|
4 |
parent::__construct( 'templates' );
|
5 |
}
|
6 |
public static function get_instance() {
|
7 |
if ( self::$_instance == NULL ){
|
8 |
$class = __CLASS__;
|
9 |
self::$_instance = new $class;
|
10 |
}
|
11 |
return self::$_instance;
|
12 |
}
|
13 |
public function manage_templates() {
|
14 |
switch ( $GLOBALS['page'] ) {
|
15 |
default:
|
16 |
$this->manage_options();
|
17 |
break;
|
18 |
}
|
19 |
}
|
20 |
public function admin_loader() {
|
21 |
$this->wp_ajax_action( 'yop_poll_add_new_template_config' );
|
22 |
}
|
23 |
public function manage_load_templates() {
|
24 |
wp_enqueue_script( 'yop-poll-admin-templates-js', YOP_POLL_URL . "js/yop-poll-admin-templates.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
25 |
wp_enqueue_style( 'yop-poll-timepicker', YOP_POLL_URL . "css/timepicker.css", array(), YOP_POLL_VERSION );
|
26 |
wp_enqueue_style( 'yop-poll-jquery-ui', YOP_POLL_URL . "css/jquery-ui.css", array(), YOP_POLL_VERSION );
|
27 |
}
|
28 |
public function id_used_template($id){
|
29 |
global $wpdb;
|
30 |
$results = $wpdb->get_results( $wpdb->prepare( "
|
31 |
foreach($results as $result){
|
32 |
$meta=unserialize($result->meta_value);
|
33 |
// yop_poll_dump($result );
|
34 |
if($meta['template']==$id||$meta['widget']==$id){
|
35 |
return false;
|
36 |
}
|
37 |
}
|
38 |
return true;
|
39 |
}
|
40 |
private function manage_options() {
|
41 |
global $page, $action, $message;
|
42 |
switch ( $action ) {
|
43 |
case "after-buy":
|
44 |
YOP_POLL_Pro_Admin::after_buy();
|
45 |
break;
|
46 |
case "do-buy":
|
47 |
YOP_POLL_Pro_Admin::do_buy();
|
48 |
break;
|
49 |
case 'add-new-template':
|
50 |
{
|
51 |
self:: view_add_edit_templates( 'add-new' );
|
52 |
break;
|
53 |
}
|
54 |
case 'delete':
|
55 |
{
|
56 |
$message = $this->delete_templates( $_GET );
|
57 |
$this->view_templates();
|
58 |
break;
|
59 |
}
|
60 |
case 'clone':
|
61 |
{
|
62 |
$message = $this->clone_templates( $_POST );
|
63 |
$this->view_templates();
|
64 |
break;
|
65 |
}
|
66 |
case 'edit':
|
67 |
{
|
68 |
self:: view_add_edit_templates( 'edit' );
|
69 |
break;
|
70 |
}
|
71 |
default: {
|
72 |
$this->view_templates();
|
73 |
break;
|
74 |
}
|
75 |
}
|
76 |
}
|
77 |
public function view_templates() {
|
78 |
wp_enqueue_script( 'yop-poll-admin-js', YOP_POLL_URL . '/js/polls/yop-poll-admin.js', array(
|
79 |
'jquery',
|
80 |
'jquery-ui-datepicker'
|
81 |
), YOP_POLL_VERSION, true );
|
82 |
wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
|
83 |
wp_enqueue_script( 'yop-poll-slider-js', YOP_POLL_URL . 'js/yop-poll-slider.js', array(
|
84 |
'jquery',
|
85 |
'jquery-ui-dialog'
|
86 |
), YOP_POLL_VERSION, true );
|
87 |
global $wpdb, $message;
|
88 |
global $page, $action, $orderby, $order, $current_user;
|
89 |
$orderby = ( empty ( $GLOBALS['orderby'] ) ) ? 'name' : $GLOBALS['orderby'];
|
90 |
$order = ( empty ( $GLOBALS['order'] ) ) ? 'desc' : $GLOBALS['order'];
|
91 |
$data['per_page'] = ( isset ( $_REQUEST ['per_page'] ) ? intval( $_REQUEST ['per_page'] ) : 100 );
|
92 |
$data['page_no'] = isset ( $_REQUEST ['page_no'] ) ? ( int )$_REQUEST ['page_no'] : 1;
|
93 |
$order_fields = array( 'name', 'last_modified' );
|
94 |
$data['title'] = __yop_poll( "Templates" );
|
95 |
$data['REQUEST'] = $_REQUEST;
|
96 |
$data['poll_url'] =YOP_POLL_URL;
|
97 |
$data['orderby'] = ( empty ( $data['REQUEST']['orderby'] ) ) ? 'name' : $data['REQUEST']['orderby'];
|
98 |
$data['order'] = ( empty ( $data['REQUEST']['order'] ) ) ? 'desc' : $data['REQUEST']['order'];
|
99 |
$data['order_direction'] = $this->make_order_array( $order_fields, 'asc', $orderby, ( 'desc' == $order ) ? 'asc' : 'desc' );
|
100 |
$data['order_sortable'] = $this->make_order_array( $order_fields, 'sortable', $orderby, 'sorted' );
|
101 |
$data['order_direction_reverse'] = $this->make_order_array( $order_fields, 'desc', $orderby, ( 'desc' == $order ) ? 'desc' : 'asc' );
|
102 |
$data['search'] = array( 'fields' => array( 'name', 'last_modified' ), 'value' => isset ( $_REQUEST['s'] ) ? $_REQUEST ['s'] : '' );
|
103 |
$data['yop_poll_templates'] = Yop_Poll_Model::get_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'], $data['page_no'] - 1, $data['per_page'] );
|
104 |
$data['total_templates'] = self::count_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'] );
|
105 |
$data['message'] = array( 'error' => $message['error'], 'succes' => $message['success'] );
|
106 |
$data['templates'] = YOP_POLL_MODEL::get_yop_poll_templates_search( 'id', 'desc' );
|
107 |
$n = count( $data['templates'] );
|
108 |
for( $i = 0; $i < $n; $i ++ ) {
|
109 |
$data['templates'][$i]['preview'] = YOP_POLL_Poll_Model::return_template_preview_html( $data['templates'][$i]['id'] );
|
110 |
}
|
111 |
if ( intval( $data['page_no'] ) > intval( $data['total_templates'] ) ){
|
112 |
$data['page_no'] = 1;
|
113 |
}
|
114 |
$args = array(
|
115 |
'base' => remove_query_arg(
|
116 |
'page_no',
|
117 |
$_SERVER ['REQUEST_URI'] ) . '%_%',
|
118 |
'format' => '&page_no=%#%',
|
119 |
'current' => max( 1, $data['page_no'] ),
|
120 |
'total' => ceil( $data['total_templates'] / $data['per_page'] ),
|
121 |
'prev_next' => true,
|
122 |
'prev_text' => __( '«' ),
|
123 |
'next_text' => __( '»' )
|
124 |
);
|
125 |
$data['pagination'] = paginate_links( $args );
|
126 |
$_SERVER ['REQUEST_URI'] = remove_query_arg( array( 'action' ), $_SERVER ['REQUEST_URI'] );
|
127 |
$data['request']['uri'] = $_SERVER["REQUEST_URI"];
|
128 |
$this->display( 'templates.html', $data );
|
129 |
}
|
130 |
private function view_add_edit_templates( $act ) {
|
131 |
global $action, $current_user;
|
132 |
add_filter( 'wp_default_editor', 'force_default_editor' );
|
133 |
$data['title'] = __yop_poll( "Templates" );
|
134 |
$data['page_name'] = __yop_poll( "Add New Poll Template" );
|
135 |
$data['action_type'] = $action;
|
136 |
$data['template_id'] = '';
|
137 |
if ( 'edit' == $data['action_type'] ){
|
138 |
$data['template_id'] = ( isset ( $_GET ['id'] ) ? intval( $_GET ['id'] ) : 0 );
|
139 |
}
|
140 |
$data['current_template'] = self::get_poll_template_from_database_by_id( $data['template_id'] );
|
141 |
$data['template_author_name'] = self::get_poll_template_field_from_database_by_id( 1 );
|
142 |
$this->display( 'templates_add_edit.html', $data );
|
143 |
}
|
144 |
public static function count_yop_poll_templates_search( $orderby = 'last_modified', $order = 'desc', $search = array( 'fields' => array(), 'value' => NULL ) ) {
|
145 |
global $wpdb;
|
146 |
$sql = "SELECT COUNT(*) AS templates_no FROM " . $wpdb->yop_poll_templates;
|
147 |
$sql_search = '';
|
148 |
if ( count( $search['fields'] ) > 0 ){
|
149 |
$sql_search .= ' ( ';
|
150 |
foreach ( $search['fields'] as $field ) {
|
151 |
$sql_search .= $wpdb->prepare( ' `' . $field . '` like \'%%%s%%\' OR', $search['value'] );
|
152 |
}
|
153 |
$sql_search = trim( $sql_search, 'OR' );
|
154 |
$sql_search .= ' ) ';
|
155 |
}
|
156 |
if ( count( $search['fields'] ) > 0 ){
|
157 |
$sql .= ' WHERE ' . $sql_search;
|
158 |
}
|
159 |
$sql .= ' ORDER BY ' . $orderby . ' ' . $order;
|
160 |
$result = $wpdb->get_var( $sql );
|
161 |
return $result;
|
162 |
}
|
163 |
private function delete_templates( $request ) {
|
164 |
global $message;
|
165 |
$message['success'] = "";
|
166 |
$message['error'] = "";
|
167 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
168 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
169 |
foreach ( $bulktemplates as $template_id ) {
|
170 |
$template_id = ( int )$template_id;
|
171 |
$message = self::delete_template_from_db( $template_id );
|
172 |
}
|
173 |
return $message;
|
174 |
}
|
175 |
else {
|
176 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
177 |
if ( isset ( $_REQUEST ['id'] ) ){
|
178 |
if(self::id_used_template( $_REQUEST ['id'])){
|
179 |
self::delete_template_from_db( $_REQUEST['id'] );
|
180 |
}
|
181 |
else $message['error']='This template is used to display a poll';
|
182 |
}
|
183 |
}
|
184 |
else {
|
185 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
186 |
}
|
187 |
}
|
188 |
return $message;
|
189 |
}
|
190 |
private function delete_template_from_db( $template_id ) {
|
191 |
global $wpdb;
|
192 |
$response['success'] = "";
|
193 |
$response['error'] = "";
|
194 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
195 |
if ( current_user_can( 'delete_own_yop_polls_templates' ) ){
|
196 |
$sql = $wpdb->query( $wpdb->prepare( "
|
197 |
$template_id ) );
|
198 |
if ( $sql ){
|
199 |
$response['success'] = __yop_poll( 'Template deleted' );
|
200 |
}
|
201 |
else {
|
202 |
$response['error'] = __yop_poll( 'Could not delete template from database! Please try again!' );
|
203 |
}
|
204 |
}
|
205 |
else {
|
206 |
$response['error'] = __yop_poll( 'You do not have enough permission to delete a template' );
|
207 |
}
|
208 |
return $response;
|
209 |
}
|
210 |
else {
|
211 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
212 |
}
|
213 |
}
|
214 |
private function clone_templates( $request ) {
|
215 |
global $message;
|
216 |
$message['success'] = "";
|
217 |
$message['error'] = "";
|
218 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
219 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
220 |
foreach ( $bulktemplates as $template_id ) {
|
221 |
$template_details = self::get_poll_template_from_database_by_id( $template_id );
|
222 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
223 |
if ( $template_details ){
|
224 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
225 |
$message = self::insert_poll_template_to_database( $template );
|
226 |
}
|
227 |
}
|
228 |
$this->view_templates();
|
229 |
}
|
230 |
else {
|
231 |
if ( isset ( $_REQUEST ['id'] ) ){
|
232 |
$template_details = self::get_poll_template_from_database_by_id( $_REQUEST ['id'] );
|
233 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
234 |
if ( $template_details ){
|
235 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
236 |
return self::insert_poll_template_to_database( $template );
|
237 |
}
|
238 |
}
|
239 |
$this->view_templates();
|
240 |
}
|
241 |
$this->view_templates();
|
242 |
}
|
243 |
private static function get_poll_template_from_database_by_id( $template_id = 0 ) {
|
244 |
global $wpdb;
|
245 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
246 |
return $result;
|
247 |
}
|
248 |
private static function count_poll_template_from_database_like_name( $template_name ) {
|
249 |
global $wpdb;
|
250 |
$result = $wpdb->get_var( $wpdb->prepare( "
|
251 |
return $result;
|
252 |
}
|
253 |
private static function insert_poll_template_to_database( $template ) {
|
254 |
$response['success'] = "";
|
255 |
$response['error'] = "";
|
256 |
global $wpdb;
|
257 |
global $current_user;
|
258 |
wp_get_current_user();
|
259 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
260 |
if ( current_user_can( 'clone_own_yop_polls_templates' ) ){
|
261 |
$sql = $wpdb->query( $wpdb->prepare( "
|
262 |
if ( $sql ){
|
263 |
$response['success'] = __yop_poll( 'Template cloned!' );
|
264 |
}
|
265 |
else {
|
266 |
$response['error'] = __yop_poll( 'Could not clone template from database! Please try again!' );
|
267 |
}
|
268 |
}
|
269 |
else {
|
270 |
$response['error'] = __yop_poll( 'You do not have enough permission to clone a template' );
|
271 |
}
|
272 |
return $response;
|
273 |
}
|
274 |
else {
|
275 |
wp_die( __yop_poll( 'You do not have enough permission to add a template' ) );
|
276 |
}
|
277 |
}
|
278 |
public function do_add_edit_template() {
|
279 |
if ( 'add-new' == $_POST['action'] ){
|
280 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
281 |
wp_die( __yop_poll( 'You are not allowed to edit this item.' ) );
|
282 |
}
|
283 |
}
|
284 |
self::save_template();
|
285 |
}
|
286 |
public function do_reset_template() {
|
287 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
288 |
wp_die( __yop_poll( 'You are not allowed to reset this item.' ) );
|
289 |
}
|
290 |
self::reset_template();
|
291 |
}
|
292 |
private static function reset_template() {
|
293 |
$template['name'] = $_POST['yop_poll_template_name'];
|
294 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
295 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
296 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
297 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
298 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
299 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
300 |
$template['status'] = "other";
|
301 |
$template['id'] = $_POST['template_id'];
|
302 |
$data['action'] = $_POST['action'];
|
303 |
$data['name'] = $_POST['yop_poll_reset_template_id'];
|
304 |
$result = self::add_update_templates_in_database( $data['action'], $data['name'], $template['name'] );
|
305 |
if ( $result ){
|
306 |
wp_die( __yop_poll( 'Template reseted!' ) );
|
307 |
}
|
308 |
else {
|
309 |
wp_die( __yop_poll( 'Could not resete template in database! Please try again!' ) );
|
310 |
}
|
311 |
}
|
312 |
private static function save_template() {
|
313 |
$template['name'] = $_POST['yop_poll_template_name'];
|
314 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
315 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
316 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
317 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
318 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
319 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
320 |
$template['status'] = "other";
|
321 |
$template['id'] = $_POST['template_id'];
|
322 |
if ( $_POST['action_type'] == "add-new-template" ){
|
323 |
if ( $template['name'] != "" ){
|
324 |
$result = self::get_poll_template_from_database_by_name( $template['name'] );
|
325 |
if ( $result ){
|
326 |
wp_die( __yop_poll( 'This template already exists! Please choose another name!' ) );
|
327 |
}
|
328 |
}
|
329 |
else {
|
330 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
331 |
}
|
332 |
$result = self:: insert_poll_template_to_database( $template );
|
333 |
if ( $result ){
|
334 |
wp_die( __yop_poll( 'Template added!' ) );
|
335 |
}
|
336 |
else {
|
337 |
wp_die( __yop_poll( 'Could not add template in database! Please try again!' ) );
|
338 |
}
|
339 |
}
|
340 |
else {
|
341 |
if ( $_POST['action_type'] == "edit" ){
|
342 |
if ( $template['name'] == "" ){
|
343 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
344 |
}
|
345 |
else {
|
346 |
$result = self:: update_poll_template_in_database( $template );
|
347 |
if ( $result ){
|
348 |
wp_die( __yop_poll( 'Template edited!' ) );
|
349 |
}
|
350 |
else {
|
351 |
wp_die( __yop_poll( 'Could not edit template in database! Please try again!' ) );
|
352 |
}
|
353 |
}
|
354 |
}
|
355 |
}
|
356 |
}
|
357 |
private static function get_poll_template_field_from_database_by_id( $template_id ) {
|
358 |
global $wpdb;
|
359 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
360 |
return $result;
|
361 |
}
|
362 |
private static function get_poll_template_from_database_by_name( $template_name ) {
|
363 |
global $wpdb;
|
364 |
$sql = $wpdb->query( $wpdb->prepare( "
|
365 |
return $sql;
|
366 |
}
|
367 |
private static function update_poll_template_in_database( $template ) {
|
368 |
global $wpdb;
|
369 |
$sql = $wpdb->query( $wpdb->prepare( "
|
370 |
return $sql;
|
371 |
}
|
372 |
private static function add_update_templates_in_database( $action = 'add', $template_name, $template_to_reset ) {
|
373 |
global $wpdb;
|
374 |
global $current_user;
|
375 |
wp_get_current_user();
|
376 |
$sql = "UPDATE `" . $wpdb->yop_poll_templates . "` SET ";
|
377 |
$before_vote_template = <<<NOWDOC
|
378 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
379 |
[ANSWER_DESCRIPTION_CONTAINER]
|
380 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
381 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
382 |
[ANSWER_RESULT_CONTAINER]
|
383 |
[/ANSWER_RESULT_CONTAINER]
|
384 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
385 |
$after_vote_template = <<<NOWDOC
|
386 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
387 |
[ANSWER_DESCRIPTION_CONTAINER]
|
388 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
389 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
390 |
class = "pds-feedback-result-%POLL-ID%">
|
391 |
<div>
|
392 |
%POLL-ANSWER-RESULT-BAR%
|
393 |
</div>
|
394 |
$after_vote_template = addslashes( $after_vote_template );
|
395 |
$before_start_date_template = <<<NOWDOC
|
396 |
start on %POLL-START-DATE%<br>
|
397 |
$before_start_date_template = addslashes( $before_start_date_template );
|
398 |
$after_end_date_template = <<<NOWDOC
|
399 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
400 |
[ANSWER_DESCRIPTION_CONTAINER]
|
401 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
402 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
403 |
class = "pds-feedback-result-%POLL-ID%">
|
404 |
<div>
|
405 |
%POLL-ANSWER-RESULT-BAR%
|
406 |
</div>
|
407 |
$after_end_date_template = addslashes( $after_end_date_template );
|
408 |
$js = <<<NOWDOC
|
409 |
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
410 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
411 |
var quest=0;
|
412 |
if ( findWidest ) {
|
413 |
obj.each(function() {
|
414 |
var thisWidth = jQuery(this).width();
|
415 |
width = parseInt(thisWidth / cols);
|
416 |
jQuery(this).width(width);
|
417 |
jQuery(this).css("float", "left");
|
418 |
});
|
419 |
}
|
420 |
else {
|
421 |
var widest = 0;
|
422 |
var count = 0;
|
423 |
var poz_each_question=0;
|
424 |
obj.each(function() {
|
425 |
count++;
|
426 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
427 |
var thisWidth = jQuery(this).width();
|
428 |
if(thisWidth > widest) {
|
429 |
widest = thisWidth;
|
430 |
}
|
431 |
if(count<cols[quest][2])
|
432 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
433 |
if(cols[quest][0]==1)
|
434 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("width","100%");
|
435 |
else
|
436 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
437 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
438 |
}
|
439 |
else
|
440 |
{
|
441 |
count=0;
|
442 |
width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
443 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
444 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
445 |
quest++;
|
446 |
}
|
447 |
});
|
448 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
449 |
var quest=0;
|
450 |
if ( findWidest ) {
|
451 |
obj.each(function() {
|
452 |
var thisWidth = jQuery(this).width();
|
453 |
width = parseInt(thisWidth / cols);
|
454 |
jQuery(this).width(width);
|
455 |
jQuery(this).css("float", "left");
|
456 |
});
|
457 |
}
|
458 |
else {
|
459 |
var widest = 0;
|
460 |
var count = 0;
|
461 |
var poz_each_question=0;
|
462 |
obj.each(function() {
|
463 |
count++;
|
464 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
465 |
var thisWidth = jQuery(this).width();
|
466 |
if(thisWidth > widest) {
|
467 |
widest = thisWidth;
|
468 |
}
|
469 |
if(count<cols[quest][2])
|
470 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
471 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
472 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
473 |
}
|
474 |
else
|
475 |
{
|
476 |
count=0;
|
477 |
width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
478 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
479 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
480 |
quest++;
|
481 |
}
|
482 |
});
|
483 |
$js = addslashes( $js );
|
484 |
$css = "";
|
485 |
switch( $template_name ) {
|
486 |
case 'White':
|
487 |
{ //White
|
488 |
$css = <<<NOWDOC
|
489 |
Main Container
|
490 |
---------------------------------------------------------------------------
|
491 |
border:1px solid #000000;
|
492 |
color:#000000;
|
493 |
color:#000000;
|
494 |
background:#fff;
|
495 |
box-sizing: border-box;
|
496 |
color: #555;
|
497 |
display: inline-block;
|
498 |
font-size: 14px;
|
499 |
padding: 10px;
|
500 |
width: %POLL-WIDTH%;
|
501 |
zoom: 1;
|
502 |
Error message
|
503 |
..................................
|
504 |
font-size:.8em;
|
505 |
font-style:italic;
|
506 |
color:red;
|
507 |
text-transform:lowercase;
|
508 |
text-align:center;
|
509 |
Success message
|
510 |
..................................
|
511 |
font-size:.8em;
|
512 |
font-style:italic;
|
513 |
color:green;
|
514 |
text-align:center;
|
515 |
Poll Question
|
516 |
---------------------------------------------------------------------------
|
517 |
border: 0 none;
|
518 |
margin: 0 0 2em;
|
519 |
padding: .25em;
|
520 |
text-align: center;
|
521 |
font-size: 14px;
|
522 |
Poll Options / Answers
|
523 |
---------------------------------------------------------------------------
|
524 |
list-style: none;
|
525 |
margin: 0;
|
526 |
padding: 0;
|
527 |
list-style: none;
|
528 |
margin: 0;
|
529 |
padding: 0;
|
530 |
font-size: 14px;
|
531 |
line-height: 2em;
|
532 |
Label
|
533 |
..................................
|
534 |
margin:0px;
|
535 |
font-style:normal;
|
536 |
font-weight:normal;
|
537 |
font-size:14px;
|
538 |
float:none;
|
539 |
display:inline-block;
|
540 |
Custom answer / Other
|
541 |
..................................
|
542 |
width: 100%;
|
543 |
overflow: hidden;
|
544 |
width: 94%;
|
545 |
overflow: hidden;
|
546 |
Custom checkbox and radio button style
|
547 |
---------------------------------------------------------------------------
|
548 |
Custom fields
|
549 |
---------------------------------------------------------------------------
|
550 |
clear: both;
|
551 |
list-style: none;
|
552 |
margin: 0;
|
553 |
padding: 0;
|
554 |
overflow: hidden;
|
555 |
width: 100%;
|
556 |
display: block;
|
557 |
font-size:14px;
|
558 |
list-style: none;
|
559 |
display: block;
|
560 |
width: 94%;
|
561 |
Vote Button
|
562 |
---------------------------------------------------------------------------
|
563 |
cursor:pointer;
|
564 |
display: block;
|
565 |
font-size:14px;
|
566 |
margin: 0 auto;
|
567 |
}
|
568 |
Results
|
569 |
---------------------------------------------------------------------------
|
570 |
font-size: 12px;
|
571 |
font-style: italic;
|
572 |
font-weight: normal;
|
573 |
margin-left: 15px;
|
574 |
color: #38595E;
|
575 |
Style for results that are displayed on columns
|
576 |
..................................
|
577 |
float: left;
|
578 |
display: inline-block;
|
579 |
width: 100%;
|
580 |
padding: 1%;
|
581 |
margin: 1%;
|
582 |
float: right;
|
583 |
width: auto;
|
584 |
color:#000;
|
585 |
text-decoration:underline;
|
586 |
font-size:12px;
|
587 |
color:#000;
|
588 |
text-decoration:underline;
|
589 |
font-size:12px;
|
590 |
color:#000;
|
591 |
text-decoration:underline;
|
592 |
font-size:12px;
|
593 |
float:left;
|
594 |
width:100%;
|
595 |
Result Bar
|
596 |
..................................
|
597 |
---------------------------------------------------------------------------
|
598 |
EXTRAS
|
599 |
---------------------------------------------------------------------------
|
600 |
CAPTCHA
|
601 |
..................................
|
602 |
width:30px;
|
603 |
float:left;
|
604 |
margin-left:5px;
|
605 |
height:0px;
|
606 |
break;
|
607 |
}
|
608 |
case 'Grey':
|
609 |
{ //Grey
|
610 |
$css = <<<NOWDOC
|
611 |
Main Container
|
612 |
---------------------------------------------------------------------------
|
613 |
border:1px solid #000000;
|
614 |
color:#000000;
|
615 |
color:#000000;
|
616 |
background:#eee;
|
617 |
box-sizing: border-box;
|
618 |
color: #fff;
|
619 |
display: inline-block;
|
620 |
font-size: 14px;
|
621 |
color:#000;
|
622 |
padding: 10px;
|
623 |
width: %POLL-WIDTH%;
|
624 |
zoom: 1;
|
625 |
Error message
|
626 |
..................................
|
627 |
font-size:.8em;
|
628 |
font-style:italic;
|
629 |
color:red;
|
630 |
text-transform:lowercase;
|
631 |
text-align:center;
|
632 |
Success message
|
633 |
..................................
|
634 |
font-size:.8em;
|
635 |
font-style:italic;
|
636 |
color:green;
|
637 |
text-align:center;
|
638 |
Poll Question
|
639 |
---------------------------------------------------------------------------
|
640 |
border: 0 none;
|
641 |
margin: 0 0 2em;
|
642 |
padding: .25em;
|
643 |
text-align: center;
|
644 |
font-size: 14px;
|
645 |
Poll Options / Answers
|
646 |
---------------------------------------------------------------------------
|
647 |
list-style: none;
|
648 |
margin: 0;
|
649 |
padding: 0;
|
650 |
list-style: none;
|
651 |
margin: 0;
|
652 |
padding: 0;
|
653 |
font-size: 14px;
|
654 |
line-height: 2em;
|
655 |
Label
|
656 |
..................................
|
657 |
margin:0px;
|
658 |
font-style:normal;
|
659 |
font-weight:normal;
|
660 |
font-size:14px;
|
661 |
float:none;
|
662 |
display:inline-block;
|
663 |
Custom answer / Other
|
664 |
..................................
|
665 |
width: 100%;
|
666 |
overflow: hidden;
|
667 |
width: 94%;
|
668 |
overflow: hidden;
|
669 |
Custom checkbox and radio button style
|
670 |
---------------------------------------------------------------------------
|
671 |
Custom fields
|
672 |
---------------------------------------------------------------------------
|
673 |
clear: both;
|
674 |
list-style: none;
|
675 |
margin: 0;
|
676 |
padding: 0;
|
677 |
overflow: hidden;
|
678 |
width: 100%;
|
679 |
display: block;
|
680 |
font-size:14px;
|
681 |
list-style: none;
|
682 |
display: block;
|
683 |
width: 94%;
|
684 |
Vote Button
|
685 |
---------------------------------------------------------------------------
|
686 |
cursor:pointer;
|
687 |
display: block;
|
688 |
font-size:14px;
|
689 |
margin: 0 auto;
|
690 |
}
|
691 |
Results
|
692 |
---------------------------------------------------------------------------
|
693 |
font-size: 12px;
|
694 |
font-style: italic;
|
695 |
font-weight: normal;
|
696 |
margin-left: 15px;
|
697 |
color: #38595E;
|
698 |
Style for results that are displayed on columns
|
699 |
..................................
|
700 |
float: left;
|
701 |
display: inline-block;
|
702 |
width: 100%;
|
703 |
padding: 1%;
|
704 |
margin: 1%;
|
705 |
float: right;
|
706 |
width: auto;
|
707 |
color:#000;
|
708 |
text-decoration:underline;
|
709 |
font-size:12px;
|
710 |
color:#000;
|
711 |
text-decoration:underline;
|
712 |
font-size:12px;
|
713 |
color:#000;
|
714 |
text-decoration:underline;
|
715 |
font-size:12px;
|
716 |
float:left;
|
717 |
width:100%;
|
718 |
Result Bar
|
719 |
..................................
|
720 |
---------------------------------------------------------------------------
|
721 |
EXTRAS
|
722 |
---------------------------------------------------------------------------
|
723 |
CAPTCHA
|
724 |
..................................
|
725 |
width:30px;
|
726 |
float:left;
|
727 |
margin-left:5px;
|
728 |
height:0px;
|
729 |
break;
|
730 |
}
|
731 |
case 'Dark':
|
732 |
{ //Dark
|
733 |
$css = <<<NOWDOC
|
734 |
Main Container
|
735 |
---------------------------------------------------------------------------
|
736 |
color:#000000;
|
737 |
color:#000000;
|
738 |
background:#555;
|
739 |
box-sizing: border-box;
|
740 |
color: #fff;
|
741 |
display: inline-block;
|
742 |
font-size: 14px;
|
743 |
padding: 10px;
|
744 |
width: %POLL-WIDTH%;
|
745 |
zoom: 1;
|
746 |
Error message
|
747 |
..................................
|
748 |
font-size:.8em;
|
749 |
font-style:italic;
|
750 |
color:red;
|
751 |
text-transform:lowercase;
|
752 |
text-align:center;
|
753 |
Success message
|
754 |
..................................
|
755 |
font-size:.8em;
|
756 |
font-style:italic;
|
757 |
color:green;
|
758 |
text-align:center;
|
759 |
Poll Question
|
760 |
---------------------------------------------------------------------------
|
761 |
border: 0 none;
|
762 |
margin: 0 0 2em;
|
763 |
padding: .25em;
|
764 |
text-align: center;
|
765 |
font-size: 14px;
|
766 |
Poll Options / Answers
|
767 |
---------------------------------------------------------------------------
|
768 |
list-style: none;
|
769 |
margin: 0;
|
770 |
padding: 0;
|
771 |
list-style: none;
|
772 |
margin: 0;
|
773 |
padding: 0;
|
774 |
font-size: 14px;
|
775 |
line-height: 2em;
|
776 |
Label
|
777 |
..................................
|
778 |
margin:0px;
|
779 |
font-style:normal;
|
780 |
font-weight:normal;
|
781 |
font-size:14px;
|
782 |
float:none;
|
783 |
display:inline-block;
|
784 |
Custom answer / Other
|
785 |
..................................
|
786 |
width: 100%;
|
787 |
overflow: hidden;
|
788 |
width: 94%;
|
789 |
overflow: hidden;
|
790 |
Custom checkbox and radio button style
|
791 |
---------------------------------------------------------------------------
|
792 |
Custom fields
|
793 |
---------------------------------------------------------------------------
|
794 |
clear: both;
|
795 |
list-style: none;
|
796 |
margin: 0;
|
797 |
padding: 0;
|
798 |
overflow: hidden;
|
799 |
width: 100%;
|
800 |
display: block;
|
801 |
font-size:14px;
|
802 |
list-style: none;
|
803 |
display: block;
|
804 |
width: 94%;
|
805 |
Vote Button
|
806 |
---------------------------------------------------------------------------
|
807 |
cursor:pointer;
|
808 |
display: block;
|
809 |
font-size:14px;
|
810 |
margin: 0 auto;
|
811 |
}
|
812 |
Results
|
813 |
---------------------------------------------------------------------------
|
814 |
font-size: 12px;
|
815 |
font-style: italic;
|
816 |
font-weight: normal;
|
817 |
margin-left: 15px;
|
818 |
color: #38595E;
|
819 |
Style for results that are displayed on columns
|
820 |
..................................
|
821 |
float: left;
|
822 |
display: inline-block;
|
823 |
width: 100%;
|
824 |
padding: 1%;
|
825 |
margin: 1%;
|
826 |
float: right;
|
827 |
width: auto;
|
828 |
color:#000;
|
829 |
text-decoration:underline;
|
830 |
font-size:12px;
|
831 |
color:#000;
|
832 |
text-decoration:underline;
|
833 |
font-size:12px;
|
834 |
color:#000;
|
835 |
text-decoration:underline;
|
836 |
font-size:12px;
|
837 |
float:left;
|
838 |
width:100%;
|
839 |
Result Bar
|
840 |
..................................
|
841 |
---------------------------------------------------------------------------
|
842 |
EXTRAS
|
843 |
---------------------------------------------------------------------------
|
844 |
CAPTCHA
|
845 |
..................................
|
846 |
width:30px;
|
847 |
float:left;
|
848 |
margin-left:5px;
|
849 |
height:0px;
|
850 |
break;
|
851 |
}
|
852 |
case 'Blue v1':
|
853 |
{ //Blue v1
|
854 |
$css = <<<NOWDOC
|
855 |
Main Container
|
856 |
---------------------------------------------------------------------------
|
857 |
color:#000000;
|
858 |
color:#000000;
|
859 |
background:#327BD6;
|
860 |
box-sizing: border-box;
|
861 |
color: #fff;
|
862 |
display: inline-block;
|
863 |
font-size: 14px;
|
864 |
padding: 10px;
|
865 |
width: %POLL-WIDTH%;
|
866 |
zoom: 1;
|
867 |
Error message
|
868 |
..................................
|
869 |
font-size:.8em;
|
870 |
font-style:italic;
|
871 |
color:red;
|
872 |
text-transform:lowercase;
|
873 |
text-align:center;
|
874 |
Success message
|
875 |
..................................
|
876 |
font-size:.8em;
|
877 |
font-style:italic;
|
878 |
color:green;
|
879 |
text-align:center;
|
880 |
Poll Question
|
881 |
---------------------------------------------------------------------------
|
882 |
border: 0 none;
|
883 |
margin: 0 0 2em;
|
884 |
padding: .25em;
|
885 |
text-align: center;
|
886 |
font-size: 14px;
|
887 |
Poll Options / Answers
|
888 |
---------------------------------------------------------------------------
|
889 |
list-style: none;
|
890 |
margin: 0;
|
891 |
padding: 0;
|
892 |
list-style: none;
|
893 |
margin: 0;
|
894 |
padding: 0;
|
895 |
font-size: 14px;
|
896 |
line-height: 2em;
|
897 |
Label
|
898 |
..................................
|
899 |
margin:0px;
|
900 |
font-style:normal;
|
901 |
font-weight:normal;
|
902 |
font-size:14px;
|
903 |
float:none;
|
904 |
display:inline-block;
|
905 |
Custom answer / Other
|
906 |
..................................
|
907 |
width: 100%;
|
908 |
overflow: hidden;
|
909 |
width: 94%;
|
910 |
overflow: hidden;
|
911 |
Custom checkbox and radio button style
|
912 |
---------------------------------------------------------------------------
|
913 |
Custom fields
|
914 |
---------------------------------------------------------------------------
|
915 |
clear: both;
|
916 |
list-style: none;
|
917 |
margin: 0;
|
918 |
padding: 0;
|
919 |
overflow: hidden;
|
920 |
width: 100%;
|
921 |
display: block;
|
922 |
font-size:14px;
|
923 |
list-style: none;
|
924 |
display: block;
|
925 |
width: 94%;
|
926 |
Vote Button
|
927 |
---------------------------------------------------------------------------
|
928 |
cursor:pointer;
|
929 |
display: block;
|
930 |
font-size:14px;
|
931 |
margin: 0 auto;
|
932 |
}
|
933 |
Results
|
934 |
---------------------------------------------------------------------------
|
935 |
font-size: 12px;
|
936 |
font-style: italic;
|
937 |
font-weight: normal;
|
938 |
margin-left: 15px;
|
939 |
color: #38595E;
|
940 |
Style for results that are displayed on columns
|
941 |
..................................
|
942 |
float: left;
|
943 |
display: inline-block;
|
944 |
width: 100%;
|
945 |
padding: 1%;
|
946 |
margin: 1%;
|
947 |
float: right;
|
948 |
width: auto;
|
949 |
color:#000;
|
950 |
text-decoration:underline;
|
951 |
font-size:12px;
|
952 |
color:#000;
|
953 |
text-decoration:underline;
|
954 |
font-size:12px;
|
955 |
color:#000;
|
956 |
text-decoration:underline;
|
957 |
font-size:12px;
|
958 |
float:left;
|
959 |
width:100%;
|
960 |
Result Bar
|
961 |
..................................
|
962 |
---------------------------------------------------------------------------
|
963 |
EXTRAS
|
964 |
---------------------------------------------------------------------------
|
965 |
CAPTCHA
|
966 |
..................................
|
967 |
width:30px;
|
968 |
float:left;
|
969 |
margin-left:5px;
|
970 |
height:0px;
|
971 |
break;
|
972 |
}
|
973 |
case 'Blue v2':
|
974 |
{ //Blue v2
|
975 |
$css = <<<NOWDOC
|
976 |
Main Container
|
977 |
---------------------------------------------------------------------------
|
978 |
border:1px solid #000000;
|
979 |
color:#000000;
|
980 |
color:#000000;
|
981 |
background:#fff;
|
982 |
box-sizing: border-box;
|
983 |
display: inline-block;
|
984 |
font-size: 14px;
|
985 |
color:#555;
|
986 |
padding: 10px;
|
987 |
width: %POLL-WIDTH%;
|
988 |
zoom: 1;
|
989 |
Error message
|
990 |
..................................
|
991 |
font-size:.8em;
|
992 |
font-style:italic;
|
993 |
color:red;
|
994 |
text-transform:lowercase;
|
995 |
text-align:center;
|
996 |
Success message
|
997 |
..................................
|
998 |
font-size:.8em;
|
999 |
font-style:italic;
|
1000 |
color:green;
|
1001 |
text-align:center;
|
1002 |
Poll Question
|
1003 |
---------------------------------------------------------------------------
|
1004 |
background:#327BD6;
|
1005 |
color:#fff;
|
1006 |
border: 0 none;
|
1007 |
margin: 0 0 2em;
|
1008 |
padding: .25em;
|
1009 |
text-align: center;
|
1010 |
font-size: 14px;
|
1011 |
Poll Options / Answers
|
1012 |
---------------------------------------------------------------------------
|
1013 |
list-style: none;
|
1014 |
margin: 0;
|
1015 |
padding: 0;
|
1016 |
list-style: none;
|
1017 |
margin: 0;
|
1018 |
padding: 0;
|
1019 |
font-size: 14px;
|
1020 |
line-height: 2em;
|
1021 |
Label
|
1022 |
..................................
|
1023 |
margin:0px;
|
1024 |
font-style:normal;
|
1025 |
font-weight:normal;
|
1026 |
font-size:14px;
|
1027 |
float:none;
|
1028 |
display:inline-block;
|
1029 |
Custom answer / Other
|
1030 |
..................................
|
1031 |
width: 100%;
|
1032 |
overflow: hidden;
|
1033 |
width: 94%;
|
1034 |
overflow: hidden;
|
1035 |
Custom checkbox and radio button style
|
1036 |
---------------------------------------------------------------------------
|
1037 |
Custom fields
|
1038 |
---------------------------------------------------------------------------
|
1039 |
clear: both;
|
1040 |
list-style: none;
|
1041 |
margin: 0;
|
1042 |
padding: 0;
|
1043 |
overflow: hidden;
|
1044 |
width: 100%;
|
1045 |
display: block;
|
1046 |
font-size:14px;
|
1047 |
list-style: none;
|
1048 |
display: block;
|
1049 |
width: 94%;
|
1050 |
Vote Button
|
1051 |
---------------------------------------------------------------------------
|
1052 |
cursor:pointer;
|
1053 |
display: block;
|
1054 |
font-size:14px;
|
1055 |
margin: 0 auto;
|
1056 |
}
|
1057 |
Results
|
1058 |
---------------------------------------------------------------------------
|
1059 |
font-size: 12px;
|
1060 |
font-style: italic;
|
1061 |
font-weight: normal;
|
1062 |
margin-left: 15px;
|
1063 |
color: #38595E;
|
1064 |
Style for results that are displayed on columns
|
1065 |
..................................
|
1066 |
float: left;
|
1067 |
display: inline-block;
|
1068 |
width: 100%;
|
1069 |
padding: 1%;
|
1070 |
margin: 1%;
|
1071 |
float: right;
|
1072 |
width: auto;
|
1073 |
color:#000;
|
1074 |
text-decoration:underline;
|
1075 |
font-size:12px;
|
1076 |
color:#000;
|
1077 |
text-decoration:underline;
|
1078 |
font-size:12px;
|
1079 |
color:#000;
|
1080 |
text-decoration:underline;
|
1081 |
font-size:12px;
|
1082 |
float:left;
|
1083 |
width:100%;
|
1084 |
Result Bar
|
1085 |
..................................
|
1086 |
---------------------------------------------------------------------------
|
1087 |
EXTRAS
|
1088 |
---------------------------------------------------------------------------
|
1089 |
CAPTCHA
|
1090 |
..................................
|
1091 |
width:30px;
|
1092 |
float:left;
|
1093 |
margin-left:5px;
|
1094 |
height:0px;
|
1095 |
break;
|
1096 |
}
|
1097 |
case 'Blue v3':
|
1098 |
{ //Blue v3
|
1099 |
$css = <<<NOWDOC
|
1100 |
Main Container
|
1101 |
---------------------------------------------------------------------------
|
1102 |
border:1px solid #000000;
|
1103 |
color:#000000;
|
1104 |
color:#000000;
|
1105 |
background:#fff;
|
1106 |
box-sizing: border-box;
|
1107 |
display: inline-block;
|
1108 |
font-size: 14px;
|
1109 |
color:#555;
|
1110 |
padding: 10px;
|
1111 |
width: %POLL-WIDTH%;
|
1112 |
zoom: 1;
|
1113 |
border: 5px solid #327BD6;
|
1114 |
Error message
|
1115 |
..................................
|
1116 |
font-size:.8em;
|
1117 |
font-style:italic;
|
1118 |
color:red;
|
1119 |
text-transform:lowercase;
|
1120 |
text-align:center;
|
1121 |
Success message
|
1122 |
..................................
|
1123 |
font-size:.8em;
|
1124 |
font-style:italic;
|
1125 |
color:green;
|
1126 |
text-align:center;
|
1127 |
Poll Question
|
1128 |
---------------------------------------------------------------------------
|
1129 |
border: 0 none;
|
1130 |
margin: 0 0 2em;
|
1131 |
padding: .25em;
|
1132 |
text-align: center;
|
1133 |
font-size: 14px;
|
1134 |
Poll Options / Answers
|
1135 |
---------------------------------------------------------------------------
|
1136 |
list-style: none;
|
1137 |
margin: 0;
|
1138 |
padding: 0;
|
1139 |
list-style: none;
|
1140 |
margin: 0;
|
1141 |
padding: 0;
|
1142 |
font-size: 14px;
|
1143 |
line-height: 2em;
|
1144 |
Label
|
1145 |
..................................
|
1146 |
margin:0px;
|
1147 |
font-style:normal;
|
1148 |
font-weight:normal;
|
1149 |
font-size:14px;
|
1150 |
float:none;
|
1151 |
display:inline-block;
|
1152 |
Custom answer / Other
|
1153 |
..................................
|
1154 |
width: 100%;
|
1155 |
overflow: hidden;
|
1156 |
width: 94%;
|
1157 |
overflow: hidden;
|
1158 |
Custom checkbox and radio button style
|
1159 |
---------------------------------------------------------------------------
|
1160 |
Custom fields
|
1161 |
---------------------------------------------------------------------------
|
1162 |
clear: both;
|
1163 |
list-style: none;
|
1164 |
margin: 0;
|
1165 |
padding: 0;
|
1166 |
overflow: hidden;
|
1167 |
width: 100%;
|
1168 |
display: block;
|
1169 |
font-size:14px;
|
1170 |
list-style: none;
|
1171 |
display: block;
|
1172 |
width: 94%;
|
1173 |
Vote Button
|
1174 |
---------------------------------------------------------------------------
|
1175 |
cursor:pointer;
|
1176 |
display: block;
|
1177 |
font-size:14px;
|
1178 |
margin: 0 auto;
|
1179 |
}
|
1180 |
Results
|
1181 |
---------------------------------------------------------------------------
|
1182 |
font-size: 12px;
|
1183 |
font-style: italic;
|
1184 |
font-weight: normal;
|
1185 |
margin-left: 15px;
|
1186 |
color: #38595E;
|
1187 |
Style for results that are displayed on columns
|
1188 |
..................................
|
1189 |
float: left;
|
1190 |
display: inline-block;
|
1191 |
width: 100%;
|
1192 |
padding: 1%;
|
1193 |
margin: 1%;
|
1194 |
float: right;
|
1195 |
width: auto;
|
1196 |
color:#000;
|
1197 |
text-decoration:underline;
|
1198 |
font-size:12px;
|
1199 |
color:#000;
|
1200 |
text-decoration:underline;
|
1201 |
font-size:12px;
|
1202 |
color:#000;
|
1203 |
text-decoration:underline;
|
1204 |
font-size:12px;
|
1205 |
float:left;
|
1206 |
width:100%;
|
1207 |
Result Bar
|
1208 |
..................................
|
1209 |
---------------------------------------------------------------------------
|
1210 |
EXTRAS
|
1211 |
---------------------------------------------------------------------------
|
1212 |
CAPTCHA
|
1213 |
..................................
|
1214 |
width:30px;
|
1215 |
float:left;
|
1216 |
margin-left:5px;
|
1217 |
height:0px;
|
1218 |
break;
|
1219 |
}
|
1220 |
case 'Red v1':
|
1221 |
{ //Red v1
|
1222 |
$css = <<<NOWDOC
|
1223 |
Main Container
|
1224 |
---------------------------------------------------------------------------
|
1225 |
color:#000000;
|
1226 |
color:#000000;
|
1227 |
background:#B70004;
|
1228 |
box-sizing: border-box;
|
1229 |
display: inline-block;
|
1230 |
font-size: 14px;
|
1231 |
color:white;
|
1232 |
padding: 10px;
|
1233 |
width: %POLL-WIDTH%;
|
1234 |
zoom: 1;
|
1235 |
Error message
|
1236 |
..................................
|
1237 |
font-size:.8em;
|
1238 |
font-style:italic;
|
1239 |
color:red;
|
1240 |
text-transform:lowercase;
|
1241 |
text-align:center;
|
1242 |
Success message
|
1243 |
..................................
|
1244 |
font-size:.8em;
|
1245 |
font-style:italic;
|
1246 |
color:green;
|
1247 |
text-align:center;
|
1248 |
Poll Question
|
1249 |
---------------------------------------------------------------------------
|
1250 |
border: 0 none;
|
1251 |
margin: 0 0 2em;
|
1252 |
padding: .25em;
|
1253 |
text-align: center;
|
1254 |
font-size: 14px;
|
1255 |
Poll Options / Answers
|
1256 |
---------------------------------------------------------------------------
|
1257 |
list-style: none;
|
1258 |
margin: 0;
|
1259 |
padding: 0;
|
1260 |
list-style: none;
|
1261 |
margin: 0;
|
1262 |
padding: 0;
|
1263 |
font-size: 14px;
|
1264 |
line-height: 2em;
|
1265 |
Label
|
1266 |
..................................
|
1267 |
margin:0px;
|
1268 |
font-style:normal;
|
1269 |
font-weight:normal;
|
1270 |
font-size:14px;
|
1271 |
float:none;
|
1272 |
display:inline-block;
|
1273 |
Custom answer / Other
|
1274 |
..................................
|
1275 |
width: 100%;
|
1276 |
overflow: hidden;
|
1277 |
width: 94%;
|
1278 |
overflow: hidden;
|
1279 |
Custom checkbox and radio button style
|
1280 |
---------------------------------------------------------------------------
|
1281 |
Custom fields
|
1282 |
---------------------------------------------------------------------------
|
1283 |
clear: both;
|
1284 |
list-style: none;
|
1285 |
margin: 0;
|
1286 |
padding: 0;
|
1287 |
overflow: hidden;
|
1288 |
width: 100%;
|
1289 |
display: block;
|
1290 |
font-size:14px;
|
1291 |
list-style: none;
|
1292 |
display: block;
|
1293 |
width: 94%;
|
1294 |
Vote Button
|
1295 |
---------------------------------------------------------------------------
|
1296 |
cursor:pointer;
|
1297 |
display: block;
|
1298 |
font-size:14px;
|
1299 |
margin: 0 auto;
|
1300 |
}
|
1301 |
Results
|
1302 |
---------------------------------------------------------------------------
|
1303 |
font-size: 12px;
|
1304 |
font-style: italic;
|
1305 |
font-weight: normal;
|
1306 |
margin-left: 15px;
|
1307 |
color: #38595E;
|
1308 |
Style for results that are displayed on columns
|
1309 |
..................................
|
1310 |
float: left;
|
1311 |
display: inline-block;
|
1312 |
width: 100%;
|
1313 |
padding: 1%;
|
1314 |
margin: 1%;
|
1315 |
float: right;
|
1316 |
width: auto;
|
1317 |
color:#000;
|
1318 |
text-decoration:underline;
|
1319 |
font-size:12px;
|
1320 |
color:#000;
|
1321 |
text-decoration:underline;
|
1322 |
font-size:12px;
|
1323 |
color:#000;
|
1324 |
text-decoration:underline;
|
1325 |
font-size:12px;
|
1326 |
float:left;
|
1327 |
width:100%;
|
1328 |
Result Bar
|
1329 |
..................................
|
1330 |
---------------------------------------------------------------------------
|
1331 |
EXTRAS
|
1332 |
---------------------------------------------------------------------------
|
1333 |
CAPTCHA
|
1334 |
..................................
|
1335 |
width:30px;
|
1336 |
float:left;
|
1337 |
margin-left:5px;
|
1338 |
height:0px;
|
1339 |
break;
|
1340 |
}
|
1341 |
case 'Red v2':
|
1342 |
{ //Red v2
|
1343 |
$css = <<<NOWDOC
|
1344 |
Main Container
|
1345 |
---------------------------------------------------------------------------
|
1346 |
border:1px solid #000000;
|
1347 |
color:#000000;
|
1348 |
color:#000000;
|
1349 |
background:#fff;
|
1350 |
box-sizing: border-box;
|
1351 |
display: inline-block;
|
1352 |
font-size: 14px;
|
1353 |
color:#555;
|
1354 |
padding: 10px;
|
1355 |
width: %POLL-WIDTH%;
|
1356 |
zoom: 1;
|
1357 |
Error message
|
1358 |
..................................
|
1359 |
font-size:.8em;
|
1360 |
font-style:italic;
|
1361 |
color:red;
|
1362 |
text-transform:lowercase;
|
1363 |
text-align:center;
|
1364 |
Success message
|
1365 |
..................................
|
1366 |
font-size:.8em;
|
1367 |
font-style:italic;
|
1368 |
color:green;
|
1369 |
text-align:center;
|
1370 |
Poll Question
|
1371 |
---------------------------------------------------------------------------
|
1372 |
background:#B70004;
|
1373 |
color:#fff;
|
1374 |
border: 0 none;
|
1375 |
margin: 0 0 2em;
|
1376 |
padding: .25em;
|
1377 |
text-align: center;
|
1378 |
font-size: 14px;
|
1379 |
Poll Options / Answers
|
1380 |
---------------------------------------------------------------------------
|
1381 |
list-style: none;
|
1382 |
margin: 0;
|
1383 |
padding: 0;
|
1384 |
list-style: none;
|
1385 |
margin: 0;
|
1386 |
padding: 0;
|
1387 |
font-size: 14px;
|
1388 |
line-height: 2em;
|
1389 |
Label
|
1390 |
..................................
|
1391 |
margin:0px;
|
1392 |
font-style:normal;
|
1393 |
font-weight:normal;
|
1394 |
font-size:14px;
|
1395 |
float:none;
|
1396 |
display:inline-block;
|
1397 |
Custom answer / Other
|
1398 |
..................................
|
1399 |
width: 100%;
|
1400 |
overflow: hidden;
|
1401 |
width: 94%;
|
1402 |
overflow: hidden;
|
1403 |
Custom checkbox and radio button style
|
1404 |
---------------------------------------------------------------------------
|
1405 |
Custom fields
|
1406 |
---------------------------------------------------------------------------
|
1407 |
clear: both;
|
1408 |
list-style: none;
|
1409 |
margin: 0;
|
1410 |
padding: 0;
|
1411 |
overflow: hidden;
|
1412 |
width: 100%;
|
1413 |
display: block;
|
1414 |
font-size:14px;
|
1415 |
list-style: none;
|
1416 |
display: block;
|
1417 |
width: 94%;
|
1418 |
Vote Button
|
1419 |
---------------------------------------------------------------------------
|
1420 |
cursor:pointer;
|
1421 |
display: block;
|
1422 |
font-size:14px;
|
1423 |
margin: 0 auto;
|
1424 |
}
|
1425 |
Results
|
1426 |
---------------------------------------------------------------------------
|
1427 |
font-size: 12px;
|
1428 |
font-style: italic;
|
1429 |
font-weight: normal;
|
1430 |
margin-left: 15px;
|
1431 |
color: #38595E;
|
1432 |
Style for results that are displayed on columns
|
1433 |
..................................
|
1434 |
float: left;
|
1435 |
display: inline-block;
|
1436 |
width: 100%;
|
1437 |
padding: 1%;
|
1438 |
margin: 1%;
|
1439 |
float: right;
|
1440 |
width: auto;
|
1441 |
color:#000;
|
1442 |
text-decoration:underline;
|
1443 |
font-size:12px;
|
1444 |
color:#000;
|
1445 |
text-decoration:underline;
|
1446 |
font-size:12px;
|
1447 |
color:#000;
|
1448 |
text-decoration:underline;
|
1449 |
font-size:12px;
|
1450 |
float:left;
|
1451 |
width:100%;
|
1452 |
Result Bar
|
1453 |
..................................
|
1454 |
---------------------------------------------------------------------------
|
1455 |
EXTRAS
|
1456 |
---------------------------------------------------------------------------
|
1457 |
CAPTCHA
|
1458 |
..................................
|
1459 |
width:30px;
|
1460 |
float:left;
|
1461 |
margin-left:5px;
|
1462 |
height:0px;
|
1463 |
break;
|
1464 |
}
|
1465 |
case 'Red v3':
|
1466 |
{ //Red v3
|
1467 |
$css = <<<NOWDOC
|
1468 |
Main Container
|
1469 |
---------------------------------------------------------------------------
|
1470 |
border:1px solid #000000;
|
1471 |
color:#000000;
|
1472 |
color:#000000;
|
1473 |
background:#fff;
|
1474 |
box-sizing: border-box;
|
1475 |
display: inline-block;
|
1476 |
font-size: 14px;
|
1477 |
color:#555;
|
1478 |
padding: 10px;
|
1479 |
width: %POLL-WIDTH%;
|
1480 |
zoom: 1;
|
1481 |
border:5px solid #B70004;
|
1482 |
Error message
|
1483 |
..................................
|
1484 |
font-size:.8em;
|
1485 |
font-style:italic;
|
1486 |
color:red;
|
1487 |
text-transform:lowercase;
|
1488 |
text-align:center;
|
1489 |
Success message
|
1490 |
..................................
|
1491 |
font-size:.8em;
|
1492 |
font-style:italic;
|
1493 |
color:green;
|
1494 |
text-align:center;
|
1495 |
Poll Question
|
1496 |
---------------------------------------------------------------------------
|
1497 |
border: 0 none;
|
1498 |
margin: 0 0 2em;
|
1499 |
padding: .25em;
|
1500 |
text-align: center;
|
1501 |
font-size: 14px;
|
1502 |
Poll Options / Answers
|
1503 |
---------------------------------------------------------------------------
|
1504 |
list-style: none;
|
1505 |
margin: 0;
|
1506 |
padding: 0;
|
1507 |
list-style: none;
|
1508 |
margin: 0;
|
1509 |
padding: 0;
|
1510 |
font-size: 14px;
|
1511 |
line-height: 2em;
|
1512 |
Label
|
1513 |
..................................
|
1514 |
margin:0px;
|
1515 |
font-style:normal;
|
1516 |
font-weight:normal;
|
1517 |
font-size:14px;
|
1518 |
float:none;
|
1519 |
display:inline-block;
|
1520 |
Custom answer / Other
|
1521 |
..................................
|
1522 |
width: 100%;
|
1523 |
overflow: hidden;
|
1524 |
width: 94%;
|
1525 |
overflow: hidden;
|
1526 |
Custom checkbox and radio button style
|
1527 |
---------------------------------------------------------------------------
|
1528 |
Custom fields
|
1529 |
---------------------------------------------------------------------------
|
1530 |
clear: both;
|
1531 |
list-style: none;
|
1532 |
margin: 0;
|
1533 |
padding: 0;
|
1534 |
overflow: hidden;
|
1535 |
width: 100%;
|
1536 |
display: block;
|
1537 |
font-size:14px;
|
1538 |
list-style: none;
|
1539 |
display: block;
|
1540 |
width: 94%;
|
1541 |
Vote Button
|
1542 |
---------------------------------------------------------------------------
|
1543 |
cursor:pointer;
|
1544 |
display: block;
|
1545 |
font-size:14px;
|
1546 |
margin: 0 auto;
|
1547 |
}
|
1548 |
Results
|
1549 |
---------------------------------------------------------------------------
|
1550 |
font-size: 12px;
|
1551 |
font-style: italic;
|
1552 |
font-weight: normal;
|
1553 |
margin-left: 15px;
|
1554 |
color: #38595E;
|
1555 |
Style for results that are displayed on columns
|
1556 |
..................................
|
1557 |
float: left;
|
1558 |
display: inline-block;
|
1559 |
width: 100%;
|
1560 |
padding: 1%;
|
1561 |
margin: 1%;
|
1562 |
float: right;
|
1563 |
width: auto;
|
1564 |
color:#000;
|
1565 |
text-decoration:underline;
|
1566 |
font-size:12px;
|
1567 |
color:#000;
|
1568 |
text-decoration:underline;
|
1569 |
font-size:12px;
|
1570 |
color:#000;
|
1571 |
text-decoration:underline;
|
1572 |
font-size:12px;
|
1573 |
float:left;
|
1574 |
width:100%;
|
1575 |
Result Bar
|
1576 |
..................................
|
1577 |
---------------------------------------------------------------------------
|
1578 |
EXTRAS
|
1579 |
---------------------------------------------------------------------------
|
1580 |
CAPTCHA
|
1581 |
..................................
|
1582 |
width:30px;
|
1583 |
float:left;
|
1584 |
margin-left:5px;
|
1585 |
height:0px;
|
1586 |
break;
|
1587 |
}
|
1588 |
case 'Green v1':
|
1589 |
{ //Green v1
|
1590 |
$css = <<<NOWDOC
|
1591 |
Main Container
|
1592 |
---------------------------------------------------------------------------
|
1593 |
color:#000000;
|
1594 |
color:#000000;
|
1595 |
background:#3F8B43;
|
1596 |
box-sizing: border-box;
|
1597 |
display: inline-block;
|
1598 |
font-size: 14px;
|
1599 |
color:white;
|
1600 |
padding: 10px;
|
1601 |
width: %POLL-WIDTH%;
|
1602 |
zoom: 1;
|
1603 |
Error message
|
1604 |
..................................
|
1605 |
font-size:.8em;
|
1606 |
font-style:italic;
|
1607 |
color:red;
|
1608 |
text-transform:lowercase;
|
1609 |
text-align:center;
|
1610 |
Success message
|
1611 |
..................................
|
1612 |
font-size:.8em;
|
1613 |
font-style:italic;
|
1614 |
color:green;
|
1615 |
text-align:center;
|
1616 |
Poll Question
|
1617 |
---------------------------------------------------------------------------
|
1618 |
border: 0 none;
|
1619 |
margin: 0 0 2em;
|
1620 |
padding: .25em;
|
1621 |
text-align: center;
|
1622 |
font-size: 14px;
|
1623 |
Poll Options / Answers
|
1624 |
---------------------------------------------------------------------------
|
1625 |
list-style: none;
|
1626 |
margin: 0;
|
1627 |
padding: 0;
|
1628 |
list-style: none;
|
1629 |
margin: 0;
|
1630 |
padding: 0;
|
1631 |
font-size: 14px;
|
1632 |
line-height: 2em;
|
1633 |
Label
|
1634 |
..................................
|
1635 |
margin:0px;
|
1636 |
font-style:normal;
|
1637 |
font-weight:normal;
|
1638 |
font-size:14px;
|
1639 |
float:none;
|
1640 |
display:inline-block;
|
1641 |
Custom answer / Other
|
1642 |
..................................
|
1643 |
width: 100%;
|
1644 |
overflow: hidden;
|
1645 |
width: 94%;
|
1646 |
overflow: hidden;
|
1647 |
Custom checkbox and radio button style
|
1648 |
---------------------------------------------------------------------------
|
1649 |
Custom fields
|
1650 |
---------------------------------------------------------------------------
|
1651 |
clear: both;
|
1652 |
list-style: none;
|
1653 |
margin: 0;
|
1654 |
padding: 0;
|
1655 |
overflow: hidden;
|
1656 |
width: 100%;
|
1657 |
display: block;
|
1658 |
font-size:14px;
|
1659 |
list-style: none;
|
1660 |
display: block;
|
1661 |
width: 94%;
|
1662 |
Vote Button
|
1663 |
---------------------------------------------------------------------------
|
1664 |
cursor:pointer;
|
1665 |
display: block;
|
1666 |
font-size:14px;
|
1667 |
margin: 0 auto;
|
1668 |
}
|
1669 |
Results
|
1670 |
---------------------------------------------------------------------------
|
1671 |
font-size: 12px;
|
1672 |
font-style: italic;
|
1673 |
font-weight: normal;
|
1674 |
margin-left: 15px;
|
1675 |
color: #38595E;
|
1676 |
Style for results that are displayed on columns
|
1677 |
..................................
|
1678 |
float: left;
|
1679 |
display: inline-block;
|
1680 |
width: 100%;
|
1681 |
padding: 1%;
|
1682 |
margin: 1%;
|
1683 |
float: right;
|
1684 |
width: auto;
|
1685 |
color:#000;
|
1686 |
text-decoration:underline;
|
1687 |
font-size:12px;
|
1688 |
color:#000;
|
1689 |
text-decoration:underline;
|
1690 |
font-size:12px;
|
1691 |
color:#000;
|
1692 |
text-decoration:underline;
|
1693 |
font-size:12px;
|
1694 |
float:left;
|
1695 |
width:100%;
|
1696 |
Result Bar
|
1697 |
..................................
|
1698 |
---------------------------------------------------------------------------
|
1699 |
EXTRAS
|
1700 |
---------------------------------------------------------------------------
|
1701 |
CAPTCHA
|
1702 |
..................................
|
1703 |
width:30px;
|
1704 |
float:left;
|
1705 |
margin-left:5px;
|
1706 |
height:0px;
|
1707 |
break;
|
1708 |
}
|
1709 |
case 'Green v2':
|
1710 |
{ //Green v2
|
1711 |
$css = <<<NOWDOC
|
1712 |
Main Container
|
1713 |
---------------------------------------------------------------------------
|
1714 |
border:1px solid #000000;
|
1715 |
color:#000000;
|
1716 |
color:#000000;
|
1717 |
background:#fff;
|
1718 |
box-sizing: border-box;
|
1719 |
display: inline-block;
|
1720 |
font-size: 14px;
|
1721 |
color:#555;
|
1722 |
padding: 10px;
|
1723 |
width: %POLL-WIDTH%;
|
1724 |
zoom: 1;
|
1725 |
Error message
|
1726 |
..................................
|
1727 |
font-size:.8em;
|
1728 |
font-style:italic;
|
1729 |
color:red;
|
1730 |
text-transform:lowercase;
|
1731 |
text-align:center;
|
1732 |
Success message
|
1733 |
..................................
|
1734 |
font-size:.8em;
|
1735 |
font-style:italic;
|
1736 |
color:green;
|
1737 |
text-align:center;
|
1738 |
Poll Question
|
1739 |
---------------------------------------------------------------------------
|
1740 |
background:#3F8B43;
|
1741 |
color:#fff;
|
1742 |
border: 0 none;
|
1743 |
margin: 0 0 2em;
|
1744 |
padding: .25em;
|
1745 |
text-align: center;
|
1746 |
font-size: 14px;
|
1747 |
Poll Options / Answers
|
1748 |
---------------------------------------------------------------------------
|
1749 |
list-style: none;
|
1750 |
margin: 0;
|
1751 |
padding: 0;
|
1752 |
list-style: none;
|
1753 |
margin: 0;
|
1754 |
padding: 0;
|
1755 |
font-size: 14px;
|
1756 |
line-height: 2em;
|
1757 |
Label
|
1758 |
..................................
|
1759 |
margin:0px;
|
1760 |
font-style:normal;
|
1761 |
font-weight:normal;
|
1762 |
font-size:14px;
|
1763 |
float:none;
|
1764 |
display:inline-block;
|
1765 |
Custom answer / Other
|
1766 |
..................................
|
1767 |
width: 100%;
|
1768 |
overflow: hidden;
|
1769 |
width: 94%;
|
1770 |
overflow: hidden;
|
1771 |
Custom checkbox and radio button style
|
1772 |
---------------------------------------------------------------------------
|
1773 |
Custom fields
|
1774 |
---------------------------------------------------------------------------
|
1775 |
clear: both;
|
1776 |
list-style: none;
|
1777 |
margin: 0;
|
1778 |
padding: 0;
|
1779 |
overflow: hidden;
|
1780 |
width: 100%;
|
1781 |
display: block;
|
1782 |
font-size:14px;
|
1783 |
list-style: none;
|
1784 |
display: block;
|
1785 |
width: 94%;
|
1786 |
Vote Button
|
1787 |
---------------------------------------------------------------------------
|
1788 |
cursor:pointer;
|
1789 |
display: block;
|
1790 |
font-size:14px;
|
1791 |
margin: 0 auto;
|
1792 |
}
|
1793 |
Results
|
1794 |
---------------------------------------------------------------------------
|
1795 |
font-size: 12px;
|
1796 |
font-style: italic;
|
1797 |
font-weight: normal;
|
1798 |
margin-left: 15px;
|
1799 |
color: #38595E;
|
1800 |
Style for results that are displayed on columns
|
1801 |
..................................
|
1802 |
float: left;
|
1803 |
display: inline-block;
|
1804 |
width: 100%;
|
1805 |
padding: 1%;
|
1806 |
margin: 1%;
|
1807 |
float: right;
|
1808 |
width: auto;
|
1809 |
color:#000;
|
1810 |
text-decoration:underline;
|
1811 |
font-size:12px;
|
1812 |
color:#000;
|
1813 |
text-decoration:underline;
|
1814 |
font-size:12px;
|
1815 |
color:#000;
|
1816 |
text-decoration:underline;
|
1817 |
font-size:12px;
|
1818 |
float:left;
|
1819 |
width:100%;
|
1820 |
Result Bar
|
1821 |
..................................
|
1822 |
---------------------------------------------------------------------------
|
1823 |
EXTRAS
|
1824 |
---------------------------------------------------------------------------
|
1825 |
CAPTCHA
|
1826 |
..................................
|
1827 |
width:30px;
|
1828 |
float:left;
|
1829 |
margin-left:5px;
|
1830 |
height:0px;
|
1831 |
break;
|
1832 |
}
|
1833 |
case 'Green v3':
|
1834 |
{ //Green v3
|
1835 |
$css = <<<NOWDOC
|
1836 |
Main Container
|
1837 |
---------------------------------------------------------------------------
|
1838 |
border:1px solid #000000;
|
1839 |
color:#000000;
|
1840 |
color:#000000;
|
1841 |
background:#fff;
|
1842 |
box-sizing: border-box;
|
1843 |
display: inline-block;
|
1844 |
font-size: 14px;
|
1845 |
color:#555;
|
1846 |
padding: 10px;
|
1847 |
width: %POLL-WIDTH%;
|
1848 |
zoom: 1;
|
1849 |
border:5px solid #3F8B43;
|
1850 |
Error message
|
1851 |
..................................
|
1852 |
font-size:.8em;
|
1853 |
font-style:italic;
|
1854 |
color:red;
|
1855 |
text-transform:lowercase;
|
1856 |
text-align:center;
|
1857 |
Success message
|
1858 |
..................................
|
1859 |
font-size:.8em;
|
1860 |
font-style:italic;
|
1861 |
color:green;
|
1862 |
text-align:center;
|
1863 |
Poll Question
|
1864 |
---------------------------------------------------------------------------
|
1865 |
border: 0 none;
|
1866 |
margin: 0 0 2em;
|
1867 |
padding: .25em;
|
1868 |
text-align: center;
|
1869 |
font-size: 14px;
|
1870 |
Poll Options / Answers
|
1871 |
---------------------------------------------------------------------------
|
1872 |
list-style: none;
|
1873 |
margin: 0;
|
1874 |
padding: 0;
|
1875 |
list-style: none;
|
1876 |
margin: 0;
|
1877 |
padding: 0;
|
1878 |
font-size: 14px;
|
1879 |
line-height: 2em;
|
1880 |
Label
|
1881 |
..................................
|
1882 |
margin:0px;
|
1883 |
font-style:normal;
|
1884 |
font-weight:normal;
|
1885 |
font-size:14px;
|
1886 |
float:none;
|
1887 |
display:inline-block;
|
1888 |
Custom answer / Other
|
1889 |
..................................
|
1890 |
width: 100%;
|
1891 |
overflow: hidden;
|
1892 |
width: 94%;
|
1893 |
overflow: hidden;
|
1894 |
Custom checkbox and radio button style
|
1895 |
---------------------------------------------------------------------------
|
1896 |
Custom fields
|
1897 |
---------------------------------------------------------------------------
|
1898 |
clear: both;
|
1899 |
list-style: none;
|
1900 |
margin: 0;
|
1901 |
padding: 0;
|
1902 |
overflow: hidden;
|
1903 |
width: 100%;
|
1904 |
display: block;
|
1905 |
font-size:14px;
|
1906 |
list-style: none;
|
1907 |
display: block;
|
1908 |
width: 94%;
|
1909 |
Vote Button
|
1910 |
---------------------------------------------------------------------------
|
1911 |
cursor:pointer;
|
1912 |
display: block;
|
1913 |
font-size:14px;
|
1914 |
margin: 0 auto;
|
1915 |
}
|
1916 |
Results
|
1917 |
---------------------------------------------------------------------------
|
1918 |
font-size: 12px;
|
1919 |
font-style: italic;
|
1920 |
font-weight: normal;
|
1921 |
margin-left: 15px;
|
1922 |
color: #38595E;
|
1923 |
Style for results that are displayed on columns
|
1924 |
..................................
|
1925 |
float: left;
|
1926 |
display: inline-block;
|
1927 |
width: 100%;
|
1928 |
padding: 1%;
|
1929 |
margin: 1%;
|
1930 |
float: right;
|
1931 |
width: auto;
|
1932 |
color:#000;
|
1933 |
text-decoration:underline;
|
1934 |
font-size:12px;
|
1935 |
color:#000;
|
1936 |
text-decoration:underline;
|
1937 |
font-size:12px;
|
1938 |
color:#000;
|
1939 |
text-decoration:underline;
|
1940 |
font-size:12px;
|
1941 |
float:left;
|
1942 |
width:100%;
|
1943 |
Result Bar
|
1944 |
..................................
|
1945 |
---------------------------------------------------------------------------
|
1946 |
EXTRAS
|
1947 |
---------------------------------------------------------------------------
|
1948 |
CAPTCHA
|
1949 |
..................................
|
1950 |
width:30px;
|
1951 |
float:left;
|
1952 |
margin-left:5px;
|
1953 |
height:0px;
|
1954 |
break;
|
1955 |
}
|
1956 |
case 'Orange v1':
|
1957 |
{ //Orange v1
|
1958 |
$css = <<<NOWDOC
|
1959 |
Main Container
|
1960 |
---------------------------------------------------------------------------
|
1961 |
color:#000000;
|
1962 |
color:#000000;
|
1963 |
background:#FB6911;
|
1964 |
box-sizing: border-box;
|
1965 |
display: inline-block;
|
1966 |
font-size: 14px;
|
1967 |
color:white;
|
1968 |
padding: 10px;
|
1969 |
width: %POLL-WIDTH%;
|
1970 |
zoom: 1;
|
1971 |
Error message
|
1972 |
..................................
|
1973 |
font-size:.8em;
|
1974 |
font-style:italic;
|
1975 |
color:red;
|
1976 |
text-transform:lowercase;
|
1977 |
text-align:center;
|
1978 |
Success message
|
1979 |
..................................
|
1980 |
font-size:.8em;
|
1981 |
font-style:italic;
|
1982 |
color:green;
|
1983 |
text-align:center;
|
1984 |
Poll Question
|
1985 |
---------------------------------------------------------------------------
|
1986 |
border: 0 none;
|
1987 |
margin: 0 0 2em;
|
1988 |
padding: .25em;
|
1989 |
text-align: center;
|
1990 |
font-size: 14px;
|
1991 |
Poll Options / Answers
|
1992 |
---------------------------------------------------------------------------
|
1993 |
list-style: none;
|
1994 |
margin: 0;
|
1995 |
padding: 0;
|
1996 |
list-style: none;
|
1997 |
margin: 0;
|
1998 |
padding: 0;
|
1999 |
font-size: 14px;
|
2000 |
line-height: 2em;
|
2001 |
Label
|
2002 |
..................................
|
2003 |
margin:0px;
|
2004 |
font-style:normal;
|
2005 |
font-weight:normal;
|
2006 |
font-size:14px;
|
2007 |
float:none;
|
2008 |
display:inline-block;
|
2009 |
Custom answer / Other
|
2010 |
..................................
|
2011 |
width: 100%;
|
2012 |
overflow: hidden;
|
2013 |
width: 94%;
|
2014 |
overflow: hidden;
|
2015 |
Custom checkbox and radio button style
|
2016 |
---------------------------------------------------------------------------
|
2017 |
Custom fields
|
2018 |
---------------------------------------------------------------------------
|
2019 |
clear: both;
|
2020 |
list-style: none;
|
2021 |
margin: 0;
|
2022 |
padding: 0;
|
2023 |
overflow: hidden;
|
2024 |
width: 100%;
|
2025 |
display: block;
|
2026 |
font-size:14px;
|
2027 |
list-style: none;
|
2028 |
display: block;
|
2029 |
width: 94%;
|
2030 |
Vote Button
|
2031 |
---------------------------------------------------------------------------
|
2032 |
cursor:pointer;
|
2033 |
display: block;
|
2034 |
font-size:14px;
|
2035 |
margin: 0 auto;
|
2036 |
}
|
2037 |
Results
|
2038 |
---------------------------------------------------------------------------
|
2039 |
font-size: 12px;
|
2040 |
font-style: italic;
|
2041 |
font-weight: normal;
|
2042 |
margin-left: 15px;
|
2043 |
color: #38595E;
|
2044 |
Style for results that are displayed on columns
|
2045 |
..................................
|
2046 |
float: left;
|
2047 |
display: inline-block;
|
2048 |
width: 100%;
|
2049 |
padding: 1%;
|
2050 |
margin: 1%;
|
2051 |
float: right;
|
2052 |
width: auto;
|
2053 |
color:#000;
|
2054 |
text-decoration:underline;
|
2055 |
font-size:12px;
|
2056 |
color:#000;
|
2057 |
text-decoration:underline;
|
2058 |
font-size:12px;
|
2059 |
color:#000;
|
2060 |
text-decoration:underline;
|
2061 |
font-size:12px;
|
2062 |
float:left;
|
2063 |
width:100%;
|
2064 |
Result Bar
|
2065 |
..................................
|
2066 |
---------------------------------------------------------------------------
|
2067 |
EXTRAS
|
2068 |
---------------------------------------------------------------------------
|
2069 |
CAPTCHA
|
2070 |
..................................
|
2071 |
width:30px;
|
2072 |
float:left;
|
2073 |
margin-left:5px;
|
2074 |
height:0px;
|
2075 |
break;
|
2076 |
}
|
2077 |
case 'Orange v2':
|
2078 |
{ //Orange v2
|
2079 |
$css = <<<NOWDOC
|
2080 |
Main Container
|
2081 |
---------------------------------------------------------------------------
|
2082 |
border:1px solid #000000;
|
2083 |
color:#000000;
|
2084 |
color:#000000;
|
2085 |
background:#fff;
|
2086 |
box-sizing: border-box;
|
2087 |
display: inline-block;
|
2088 |
font-size: 14px;
|
2089 |
color:#555;
|
2090 |
padding: 10px;
|
2091 |
width: %POLL-WIDTH%;
|
2092 |
zoom: 1;
|
2093 |
Error message
|
2094 |
..................................
|
2095 |
font-size:.8em;
|
2096 |
font-style:italic;
|
2097 |
color:red;
|
2098 |
text-transform:lowercase;
|
2099 |
text-align:center;
|
2100 |
Success message
|
2101 |
..................................
|
2102 |
font-size:.8em;
|
2103 |
font-style:italic;
|
2104 |
color:green;
|
2105 |
text-align:center;
|
2106 |
Poll Question
|
2107 |
---------------------------------------------------------------------------
|
2108 |
background:#FB6911;
|
2109 |
color:#fff;
|
2110 |
border: 0 none;
|
2111 |
margin: 0 0 2em;
|
2112 |
padding: .25em;
|
2113 |
text-align: center;
|
2114 |
font-size: 14px;
|
2115 |
Poll Options / Answers
|
2116 |
---------------------------------------------------------------------------
|
2117 |
list-style: none;
|
2118 |
margin: 0;
|
2119 |
padding: 0;
|
2120 |
list-style: none;
|
2121 |
margin: 0;
|
2122 |
padding: 0;
|
2123 |
font-size: 14px;
|
2124 |
line-height: 2em;
|
2125 |
Label
|
2126 |
..................................
|
2127 |
margin:0px;
|
2128 |
font-style:normal;
|
2129 |
font-weight:normal;
|
2130 |
font-size:14px;
|
2131 |
float:none;
|
2132 |
display:inline-block;
|
2133 |
Custom answer / Other
|
2134 |
..................................
|
2135 |
width: 100%;
|
2136 |
overflow: hidden;
|
2137 |
width: 94%;
|
2138 |
overflow: hidden;
|
2139 |
Custom checkbox and radio button style
|
2140 |
---------------------------------------------------------------------------
|
2141 |
Custom fields
|
2142 |
---------------------------------------------------------------------------
|
2143 |
clear: both;
|
2144 |
list-style: none;
|
2145 |
margin: 0;
|
2146 |
padding: 0;
|
2147 |
overflow: hidden;
|
2148 |
width: 100%;
|
2149 |
display: block;
|
2150 |
font-size:14px;
|
2151 |
list-style: none;
|
2152 |
display: block;
|
2153 |
width: 94%;
|
2154 |
Vote Button
|
2155 |
---------------------------------------------------------------------------
|
2156 |
cursor:pointer;
|
2157 |
display: block;
|
2158 |
font-size:14px;
|
2159 |
margin: 0 auto;
|
2160 |
}
|
2161 |
Results
|
2162 |
---------------------------------------------------------------------------
|
2163 |
font-size: 12px;
|
2164 |
font-style: italic;
|
2165 |
font-weight: normal;
|
2166 |
margin-left: 15px;
|
2167 |
color: #38595E;
|
2168 |
Style for results that are displayed on columns
|
2169 |
..................................
|
2170 |
float: left;
|
2171 |
display: inline-block;
|
2172 |
width: 100%;
|
2173 |
padding: 1%;
|
2174 |
margin: 1%;
|
2175 |
float: right;
|
2176 |
width: auto;
|
2177 |
color:#000;
|
2178 |
text-decoration:underline;
|
2179 |
font-size:12px;
|
2180 |
color:#000;
|
2181 |
text-decoration:underline;
|
2182 |
font-size:12px;
|
2183 |
color:#000;
|
2184 |
text-decoration:underline;
|
2185 |
font-size:12px;
|
2186 |
float:left;
|
2187 |
width:100%;
|
2188 |
Result Bar
|
2189 |
..................................
|
2190 |
---------------------------------------------------------------------------
|
2191 |
EXTRAS
|
2192 |
---------------------------------------------------------------------------
|
2193 |
CAPTCHA
|
2194 |
..................................
|
2195 |
width:30px;
|
2196 |
float:left;
|
2197 |
margin-left:5px;
|
2198 |
height:0px;
|
2199 |
break;
|
2200 |
}
|
2201 |
case 'Orange v3':
|
2202 |
{ //Orange v3
|
2203 |
$css = <<<NOWDOC
|
2204 |
Main Container
|
2205 |
---------------------------------------------------------------------------
|
2206 |
border:1px solid #000000;
|
2207 |
color:#000000;
|
2208 |
color:#000000;
|
2209 |
background:#fff;
|
2210 |
box-sizing: border-box;
|
2211 |
display: inline-block;
|
2212 |
font-size: 14px;
|
2213 |
color:#555;
|
2214 |
padding: 10px;
|
2215 |
width: %POLL-WIDTH%;
|
2216 |
zoom: 1;
|
2217 |
border:5px solid #FB6911;
|
2218 |
Error message
|
2219 |
..................................
|
2220 |
font-size:.8em;
|
2221 |
font-style:italic;
|
2222 |
color:red;
|
2223 |
text-transform:lowercase;
|
2224 |
text-align:center;
|
2225 |
Success message
|
2226 |
..................................
|
2227 |
font-size:.8em;
|
2228 |
font-style:italic;
|
2229 |
color:green;
|
2230 |
text-align:center;
|
2231 |
Poll Question
|
2232 |
---------------------------------------------------------------------------
|
2233 |
border: 0 none;
|
2234 |
margin: 0 0 2em;
|
2235 |
padding: .25em;
|
2236 |
text-align: center;
|
2237 |
font-size: 14px;
|
2238 |
Poll Options / Answers
|
2239 |
---------------------------------------------------------------------------
|
2240 |
list-style: none;
|
2241 |
margin: 0;
|
2242 |
padding: 0;
|
2243 |
list-style: none;
|
2244 |
margin: 0;
|
2245 |
padding: 0;
|
2246 |
font-size: 14px;
|
2247 |
line-height: 2em;
|
2248 |
Label
|
2249 |
..................................
|
2250 |
margin:0px;
|
2251 |
font-style:normal;
|
2252 |
font-weight:normal;
|
2253 |
font-size:14px;
|
2254 |
float:none;
|
2255 |
display:inline-block;
|
2256 |
Custom answer / Other
|
2257 |
..................................
|
2258 |
width: 100%;
|
2259 |
overflow: hidden;
|
2260 |
width: 94%;
|
2261 |
overflow: hidden;
|
2262 |
Custom checkbox and radio button style
|
2263 |
---------------------------------------------------------------------------
|
2264 |
Custom fields
|
2265 |
---------------------------------------------------------------------------
|
2266 |
clear: both;
|
2267 |
list-style: none;
|
2268 |
margin: 0;
|
2269 |
padding: 0;
|
2270 |
overflow: hidden;
|
2271 |
width: 100%;
|
2272 |
display: block;
|
2273 |
font-size:14px;
|
2274 |
list-style: none;
|
2275 |
display: block;
|
2276 |
width: 94%;
|
2277 |
Vote Button
|
2278 |
---------------------------------------------------------------------------
|
2279 |
cursor:pointer;
|
2280 |
display: block;
|
2281 |
font-size:14px;
|
2282 |
margin: 0 auto;
|
2283 |
}
|
2284 |
Results
|
2285 |
---------------------------------------------------------------------------
|
2286 |
font-size: 12px;
|
2287 |
font-style: italic;
|
2288 |
font-weight: normal;
|
2289 |
margin-left: 15px;
|
2290 |
color: #38595E;
|
2291 |
Style for results that are displayed on columns
|
2292 |
..................................
|
2293 |
float: left;
|
2294 |
display: inline-block;
|
2295 |
width: 100%;
|
2296 |
padding: 1%;
|
2297 |
margin: 1%;
|
2298 |
float: right;
|
2299 |
width: auto;
|
2300 |
color:#000;
|
2301 |
text-decoration:underline;
|
2302 |
font-size:12px;
|
2303 |
color:#000;
|
2304 |
text-decoration:underline;
|
2305 |
font-size:12px;
|
2306 |
color:#000;
|
2307 |
text-decoration:underline;
|
2308 |
font-size:12px;
|
2309 |
float:left;
|
2310 |
width:100%;
|
2311 |
Result Bar
|
2312 |
..................................
|
2313 |
---------------------------------------------------------------------------
|
2314 |
EXTRAS
|
2315 |
---------------------------------------------------------------------------
|
2316 |
CAPTCHA
|
2317 |
..................................
|
2318 |
width:30px;
|
2319 |
float:left;
|
2320 |
margin-left:5px;
|
2321 |
height:0px;
|
2322 |
break;
|
2323 |
}
|
2324 |
}
|
2325 |
$css.= "#yop-poll-container-%POLL-ID% img {
|
2326 |
max-width: %POLL-WIDTH%;
|
2327 |
$css = addslashes($css);
|
2328 |
$before_vote_template = addslashes( $before_vote_template );
|
2329 |
$sql .= "`before_vote_template` = '{$before_vote_template}',
|
2330 |
$sql .= $wpdb->prepare( ' WHERE name = %s', $template_to_reset );
|
2331 |
return $wpdb->query( $sql );
|
2332 |
}
|
2333 |
return 'html';
|
|
|
2334 |
private static $_instance = NULL;
|
2335 |
protected function __construct() {
|
2336 |
parent::__construct( 'templates' );
|
2337 |
}
|
2338 |
public static function get_instance() {
|
2339 |
if ( self::$_instance == NULL ){
|
2340 |
$class = __CLASS__;
|
2341 |
self::$_instance = new $class;
|
2342 |
}
|
2343 |
return self::$_instance;
|
2344 |
}
|
2345 |
public function manage_templates() {
|
2346 |
switch ( $GLOBALS['page'] ) {
|
2347 |
default:
|
2348 |
$this->manage_options();
|
2349 |
break;
|
2350 |
}
|
2351 |
}
|
2352 |
public function admin_loader() {
|
2353 |
$this->wp_ajax_action( 'yop_poll_add_new_template_config' );
|
2354 |
}
|
2355 |
public function manage_load_templates() {
|
2356 |
wp_enqueue_script( 'yop-poll-admin-templates-js', YOP_POLL_URL . "js/yop-poll-admin-templates.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
2357 |
wp_enqueue_style( 'yop-poll-timepicker', YOP_POLL_URL . "css/timepicker.css", array(), YOP_POLL_VERSION );
|
2358 |
wp_enqueue_style( 'yop-poll-jquery-ui', YOP_POLL_URL . "css/jquery-ui.css", array(), YOP_POLL_VERSION );
|
2359 |
}
|
2360 |
public function id_used_template($id){
|
2361 |
global $wpdb;
|
2362 |
$results = $wpdb->get_results( $wpdb->prepare( "
|
2363 |
foreach($results as $result){
|
2364 |
$meta=unserialize($result->meta_value);
|
2365 |
// yop_poll_dump($result );
|
2366 |
if($meta['template']==$id||$meta['widget']==$id){
|
2367 |
return false;
|
2368 |
}
|
2369 |
}
|
2370 |
return true;
|
2371 |
}
|
2372 |
private function manage_options() {
|
2373 |
global $page, $action, $message;
|
2374 |
switch ( $action ) {
|
2375 |
case "after-buy":
|
2376 |
YOP_POLL_Pro_Admin::after_buy();
|
2377 |
break;
|
2378 |
case "do-buy":
|
2379 |
YOP_POLL_Pro_Admin::do_buy();
|
2380 |
break;
|
2381 |
case 'add-new-template':
|
2382 |
{
|
2383 |
self:: view_add_edit_templates( 'add-new' );
|
2384 |
break;
|
2385 |
}
|
2386 |
case 'delete':
|
2387 |
{
|
2388 |
$message = $this->delete_templates( $_GET );
|
2389 |
$this->view_templates();
|
2390 |
break;
|
2391 |
}
|
2392 |
case 'clone':
|
2393 |
{
|
2394 |
$message = $this->clone_templates( $_POST );
|
2395 |
$this->view_templates();
|
2396 |
break;
|
2397 |
}
|
2398 |
case 'edit':
|
2399 |
{
|
2400 |
self:: view_add_edit_templates( 'edit' );
|
2401 |
break;
|
2402 |
}
|
2403 |
default: {
|
2404 |
$this->view_templates();
|
2405 |
break;
|
2406 |
}
|
2407 |
}
|
2408 |
}
|
2409 |
public function view_templates() {
|
2410 |
wp_enqueue_script( 'yop-poll-admin-js', YOP_POLL_URL . '/js/polls/yop-poll-admin.js', array(
|
2411 |
'jquery',
|
2412 |
'jquery-ui-datepicker'
|
2413 |
), YOP_POLL_VERSION, true );
|
2414 |
wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
|
2415 |
wp_enqueue_script( 'yop-poll-slider-js', YOP_POLL_URL . 'js/yop-poll-slider.js', array(
|
2416 |
'jquery',
|
2417 |
'jquery-ui-dialog'
|
2418 |
), YOP_POLL_VERSION, true );
|
2419 |
global $wpdb, $message;
|
2420 |
global $page, $action, $orderby, $order, $current_user;
|
2421 |
$orderby = ( empty ( $GLOBALS['orderby'] ) ) ? 'name' : $GLOBALS['orderby'];
|
2422 |
$order = ( empty ( $GLOBALS['order'] ) ) ? 'desc' : $GLOBALS['order'];
|
2423 |
$data['per_page'] = ( isset ( $_REQUEST ['per_page'] ) ? intval( $_REQUEST ['per_page'] ) : 100 );
|
2424 |
$data['page_no'] = isset ( $_REQUEST ['page_no'] ) ? ( int )$_REQUEST ['page_no'] : 1;
|
2425 |
$order_fields = array( 'name', 'last_modified' );
|
2426 |
$data['title'] = __yop_poll( "Templates" );
|
2427 |
$data['REQUEST'] = $_REQUEST;
|
2428 |
$data['poll_url'] =YOP_POLL_URL;
|
2429 |
$data['orderby'] = ( empty ( $data['REQUEST']['orderby'] ) ) ? 'name' : $data['REQUEST']['orderby'];
|
2430 |
$data['order'] = ( empty ( $data['REQUEST']['order'] ) ) ? 'desc' : $data['REQUEST']['order'];
|
2431 |
$data['order_direction'] = $this->make_order_array( $order_fields, 'asc', $orderby, ( 'desc' == $order ) ? 'asc' : 'desc' );
|
2432 |
$data['order_sortable'] = $this->make_order_array( $order_fields, 'sortable', $orderby, 'sorted' );
|
2433 |
$data['order_direction_reverse'] = $this->make_order_array( $order_fields, 'desc', $orderby, ( 'desc' == $order ) ? 'desc' : 'asc' );
|
2434 |
$data['search'] = array( 'fields' => array( 'name', 'last_modified' ), 'value' => isset ( $_REQUEST['s'] ) ? $_REQUEST ['s'] : '' );
|
2435 |
$data['yop_poll_templates'] = Yop_Poll_Model::get_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'], $data['page_no'] - 1, $data['per_page'] );
|
2436 |
$data['total_templates'] = self::count_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'] );
|
2437 |
$data['message'] = array( 'error' => $message['error'], 'succes' => $message['success'] );
|
2438 |
$data['templates'] = YOP_POLL_MODEL::get_yop_poll_templates_search( 'id', 'desc' );
|
2439 |
$n = count( $data['templates'] );
|
2440 |
for( $i = 0; $i < $n; $i ++ ) {
|
2441 |
$data['templates'][$i]['preview'] = YOP_POLL_Poll_Model::return_template_preview_html( $data['templates'][$i]['id'] );
|
2442 |
}
|
2443 |
if ( intval( $data['page_no'] ) > intval( $data['total_templates'] ) ){
|
2444 |
$data['page_no'] = 1;
|
2445 |
}
|
2446 |
$args = array(
|
2447 |
'base' => remove_query_arg(
|
2448 |
'page_no',
|
2449 |
$_SERVER ['REQUEST_URI'] ) . '%_%',
|
2450 |
'format' => '&page_no=%#%',
|
2451 |
'current' => max( 1, $data['page_no'] ),
|
2452 |
'total' => ceil( $data['total_templates'] / $data['per_page'] ),
|
2453 |
'prev_next' => true,
|
2454 |
'prev_text' => __( '«' ),
|
2455 |
'next_text' => __( '»' )
|
2456 |
);
|
2457 |
$data['pagination'] = paginate_links( $args );
|
2458 |
$_SERVER ['REQUEST_URI'] = remove_query_arg( array( 'action' ), $_SERVER ['REQUEST_URI'] );
|
2459 |
$data['request']['uri'] = $_SERVER["REQUEST_URI"];
|
2460 |
$this->display( 'templates.html', $data );
|
2461 |
}
|
2462 |
private function view_add_edit_templates( $act ) {
|
2463 |
global $action, $current_user;
|
2464 |
add_filter( 'wp_default_editor', 'force_default_editor' );
|
2465 |
$data['title'] = __yop_poll( "Templates" );
|
2466 |
$data['page_name'] = __yop_poll( "Add New Poll Template" );
|
2467 |
$data['action_type'] = $action;
|
2468 |
$data['template_id'] = '';
|
2469 |
if ( 'edit' == $data['action_type'] ){
|
2470 |
$data['template_id'] = ( isset ( $_GET ['id'] ) ? intval( $_GET ['id'] ) : 0 );
|
2471 |
}
|
2472 |
$data['current_template'] = self::get_poll_template_from_database_by_id( $data['template_id'] );
|
2473 |
$data['template_author_name'] = self::get_poll_template_field_from_database_by_id( 1 );
|
2474 |
$this->display( 'templates_add_edit.html', $data );
|
2475 |
}
|
2476 |
public static function count_yop_poll_templates_search( $orderby = 'last_modified', $order = 'desc', $search = array( 'fields' => array(), 'value' => NULL ) ) {
|
2477 |
global $wpdb;
|
2478 |
$sql = "SELECT COUNT(*) AS templates_no FROM " . $wpdb->yop_poll_templates;
|
2479 |
$sql_search = '';
|
2480 |
if ( count( $search['fields'] ) > 0 ){
|
2481 |
$sql_search .= ' ( ';
|
2482 |
foreach ( $search['fields'] as $field ) {
|
2483 |
$sql_search .= $wpdb->prepare( ' `' . $field . '` like \'%%%s%%\' OR', $search['value'] );
|
2484 |
}
|
2485 |
$sql_search = trim( $sql_search, 'OR' );
|
2486 |
$sql_search .= ' ) ';
|
2487 |
}
|
2488 |
if ( count( $search['fields'] ) > 0 ){
|
2489 |
$sql .= ' WHERE ' . $sql_search;
|
2490 |
}
|
2491 |
$sql .= ' ORDER BY ' . $orderby . ' ' . $order;
|
2492 |
$result = $wpdb->get_var( $sql );
|
2493 |
return $result;
|
2494 |
}
|
2495 |
private function delete_templates( $request ) {
|
2496 |
global $message;
|
2497 |
$message['success'] = "";
|
2498 |
$message['error'] = "";
|
2499 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
2500 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
2501 |
foreach ( $bulktemplates as $template_id ) {
|
2502 |
$template_id = ( int )$template_id;
|
2503 |
$message = self::delete_template_from_db( $template_id );
|
2504 |
}
|
2505 |
return $message;
|
2506 |
}
|
2507 |
else {
|
2508 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2509 |
if ( isset ( $_REQUEST ['id'] ) ){
|
2510 |
if(self::id_used_template( $_REQUEST ['id'])){
|
2511 |
self::delete_template_from_db( $_REQUEST['id'] );
|
2512 |
}
|
2513 |
else $message['error']='This template is used to display a poll';
|
2514 |
}
|
2515 |
}
|
2516 |
else {
|
2517 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
2518 |
}
|
2519 |
}
|
2520 |
return $message;
|
2521 |
}
|
2522 |
private function delete_template_from_db( $template_id ) {
|
2523 |
global $wpdb;
|
2524 |
$response['success'] = "";
|
2525 |
$response['error'] = "";
|
2526 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2527 |
if ( current_user_can( 'delete_own_yop_polls_templates' ) ){
|
2528 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2529 |
$template_id ) );
|
2530 |
if ( $sql ){
|
2531 |
$response['success'] = __yop_poll( 'Template deleted' );
|
2532 |
}
|
2533 |
else {
|
2534 |
$response['error'] = __yop_poll( 'Could not delete template from database! Please try again!' );
|
2535 |
}
|
2536 |
}
|
2537 |
else {
|
2538 |
$response['error'] = __yop_poll( 'You do not have enough permission to delete a template' );
|
2539 |
}
|
2540 |
return $response;
|
2541 |
}
|
2542 |
else {
|
2543 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
2544 |
}
|
2545 |
}
|
2546 |
private function clone_templates( $request ) {
|
2547 |
global $message;
|
2548 |
$message['success'] = "";
|
2549 |
$message['error'] = "";
|
2550 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
2551 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
2552 |
foreach ( $bulktemplates as $template_id ) {
|
2553 |
$template_details = self::get_poll_template_from_database_by_id( $template_id );
|
2554 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
2555 |
if ( $template_details ){
|
2556 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
2557 |
$message = self::insert_poll_template_to_database( $template );
|
2558 |
}
|
2559 |
}
|
2560 |
$this->view_templates();
|
2561 |
}
|
2562 |
else {
|
2563 |
if ( isset ( $_REQUEST ['id'] ) ){
|
2564 |
$template_details = self::get_poll_template_from_database_by_id( $_REQUEST ['id'] );
|
2565 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
2566 |
if ( $template_details ){
|
2567 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
2568 |
return self::insert_poll_template_to_database( $template );
|
2569 |
}
|
2570 |
}
|
2571 |
$this->view_templates();
|
2572 |
}
|
2573 |
$this->view_templates();
|
2574 |
}
|
2575 |
private static function get_poll_template_from_database_by_id( $template_id = 0 ) {
|
2576 |
global $wpdb;
|
2577 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
2578 |
return $result;
|
2579 |
}
|
2580 |
private static function count_poll_template_from_database_like_name( $template_name ) {
|
2581 |
global $wpdb;
|
2582 |
$result = $wpdb->get_var( $wpdb->prepare( "
|
2583 |
return $result;
|
2584 |
}
|
2585 |
private static function insert_poll_template_to_database( $template ) {
|
2586 |
$response['success'] = "";
|
2587 |
$response['error'] = "";
|
2588 |
global $wpdb;
|
2589 |
global $current_user;
|
2590 |
wp_get_current_user();
|
2591 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2592 |
if ( current_user_can( 'clone_own_yop_polls_templates' ) ){
|
2593 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2594 |
if ( $sql ){
|
2595 |
$response['success'] = __yop_poll( 'Template cloned!' );
|
2596 |
}
|
2597 |
else {
|
2598 |
$response['error'] = __yop_poll( 'Could not clone template from database! Please try again!' );
|
2599 |
}
|
2600 |
}
|
2601 |
else {
|
2602 |
$response['error'] = __yop_poll( 'You do not have enough permission to clone a template' );
|
2603 |
}
|
2604 |
return $response;
|
2605 |
}
|
2606 |
else {
|
2607 |
wp_die( __yop_poll( 'You do not have enough permission to add a template' ) );
|
2608 |
}
|
2609 |
}
|
2610 |
public function do_add_edit_template() {
|
2611 |
if ( 'add-new' == $_POST['action'] ){
|
2612 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
2613 |
wp_die( __yop_poll( 'You are not allowed to edit this item.' ) );
|
2614 |
}
|
2615 |
}
|
2616 |
self::save_template();
|
2617 |
}
|
2618 |
public function do_reset_template() {
|
2619 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
2620 |
wp_die( __yop_poll( 'You are not allowed to reset this item.' ) );
|
2621 |
}
|
2622 |
self::reset_template();
|
2623 |
}
|
2624 |
private static function reset_template() {
|
2625 |
$template['name'] = $_POST['yop_poll_template_name'];
|
2626 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
2627 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
2628 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
2629 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
2630 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
2631 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
2632 |
$template['status'] = "other";
|
2633 |
$template['id'] = $_POST['template_id'];
|
2634 |
$data['action'] = $_POST['action'];
|
2635 |
$data['name'] = $_POST['yop_poll_reset_template_id'];
|
2636 |
$result = self::add_update_templates_in_database( $data['action'], $data['name'], $template['name'] );
|
2637 |
if ( $result ){
|
2638 |
wp_die( __yop_poll( 'Template reseted!' ) );
|
2639 |
}
|
2640 |
else {
|
2641 |
wp_die( __yop_poll( 'Could not resete template in database! Please try again!' ) );
|
2642 |
}
|
2643 |
}
|
2644 |
private static function save_template() {
|
2645 |
$template['name'] = $_POST['yop_poll_template_name'];
|
2646 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
2647 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
2648 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
2649 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
2650 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
2651 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
2652 |
$template['status'] = "other";
|
2653 |
$template['id'] = $_POST['template_id'];
|
2654 |
if ( $_POST['action_type'] == "add-new-template" ){
|
2655 |
if ( $template['name'] != "" ){
|
2656 |
$result = self::get_poll_template_from_database_by_name( $template['name'] );
|
2657 |
if ( $result ){
|
2658 |
wp_die( __yop_poll( 'This template already exists! Please choose another name!' ) );
|
2659 |
}
|
2660 |
}
|
2661 |
else {
|
2662 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
2663 |
}
|
2664 |
$result = self:: insert_poll_template_to_database( $template );
|
2665 |
if ( $result ){
|
2666 |
wp_die( __yop_poll( 'Template added!' ) );
|
2667 |
}
|
2668 |
else {
|
2669 |
wp_die( __yop_poll( 'Could not add template in database! Please try again!' ) );
|
2670 |
}
|
2671 |
}
|
2672 |
else {
|
2673 |
if ( $_POST['action_type'] == "edit" ){
|
2674 |
if ( $template['name'] == "" ){
|
2675 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
2676 |
}
|
2677 |
else {
|
2678 |
$result = self:: update_poll_template_in_database( $template );
|
2679 |
if ( $result ){
|
2680 |
wp_die( __yop_poll( 'Template edited!' ) );
|
2681 |
}
|
2682 |
else {
|
2683 |
wp_die( __yop_poll( 'Could not edit template in database! Please try again!' ) );
|
2684 |
}
|
2685 |
}
|
2686 |
}
|
2687 |
}
|
2688 |
}
|
2689 |
private static function get_poll_template_field_from_database_by_id( $template_id ) {
|
2690 |
global $wpdb;
|
2691 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
2692 |
return $result;
|
2693 |
}
|
2694 |
private static function get_poll_template_from_database_by_name( $template_name ) {
|
2695 |
global $wpdb;
|
2696 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2697 |
return $sql;
|
2698 |
}
|
2699 |
private static function update_poll_template_in_database( $template ) {
|
2700 |
global $wpdb;
|
2701 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2702 |
return $sql;
|
2703 |
}
|
2704 |
private static function add_update_templates_in_database( $action = 'add', $template_name, $template_to_reset ) {
|
2705 |
global $wpdb;
|
2706 |
global $current_user;
|
2707 |
wp_get_current_user();
|
2708 |
$sql = "UPDATE `" . $wpdb->yop_poll_templates . "` SET ";
|
2709 |
$before_vote_template = <<<NOWDOC
|
2710 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2711 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2712 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2713 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2714 |
[ANSWER_RESULT_CONTAINER]
|
2715 |
[/ANSWER_RESULT_CONTAINER]
|
2716 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
2717 |
$after_vote_template = <<<NOWDOC
|
2718 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2719 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2720 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2721 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2722 |
class = "pds-feedback-result-%POLL-ID%">
|
2723 |
<div>
|
2724 |
%POLL-ANSWER-RESULT-BAR%
|
2725 |
</div>
|
2726 |
$after_vote_template = addslashes( $after_vote_template );
|
2727 |
$before_start_date_template = <<<NOWDOC
|
2728 |
start on %POLL-START-DATE%<br>
|
2729 |
$before_start_date_template = addslashes( $before_start_date_template );
|
2730 |
$after_end_date_template = <<<NOWDOC
|
2731 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2732 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2733 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2734 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2735 |
class = "pds-feedback-result-%POLL-ID%">
|
2736 |
<div>
|
2737 |
%POLL-ANSWER-RESULT-BAR%
|
2738 |
</div>
|
2739 |
$after_end_date_template = addslashes( $after_end_date_template );
|
2740 |
$js = <<<NOWDOC
|
2741 |
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
2742 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
2743 |
var quest=0;
|
2744 |
if ( findWidest ) {
|
2745 |
obj.each(function() {
|
2746 |
var thisWidth = jQuery(this).width();
|
2747 |
width = parseInt(thisWidth / cols);
|
2748 |
jQuery(this).width(width);
|
2749 |
jQuery(this).css("float", "left");
|
2750 |
});
|
2751 |
}
|
2752 |
else {
|
2753 |
var widest = 0;
|
2754 |
var count = 0;
|
2755 |
var poz_each_question=0;
|
2756 |
obj.each(function() {
|
2757 |
count++;
|
2758 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
2759 |
var thisWidth = jQuery(this).width();
|
2760 |
if(thisWidth > widest) {
|
2761 |
widest = thisWidth;
|
2762 |
}
|
2763 |
if(count<cols[quest][2])
|
2764 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
2765 |
if(cols[quest][0]==1)
|
2766 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("width","100%");
|
2767 |
else
|
2768 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2769 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2770 |
}
|
2771 |
else
|
2772 |
{
|
2773 |
count=0;
|
2774 |
width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
2775 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2776 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2777 |
quest++;
|
2778 |
}
|
2779 |
});
|
2780 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
2781 |
var quest=0;
|
2782 |
if ( findWidest ) {
|
2783 |
obj.each(function() {
|
2784 |
var thisWidth = jQuery(this).width();
|
2785 |
width = parseInt(thisWidth / cols);
|
2786 |
jQuery(this).width(width);
|
2787 |
jQuery(this).css("float", "left");
|
2788 |
});
|
2789 |
}
|
2790 |
else {
|
2791 |
var widest = 0;
|
2792 |
var count = 0;
|
2793 |
var poz_each_question=0;
|
2794 |
obj.each(function() {
|
2795 |
count++;
|
2796 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
2797 |
var thisWidth = jQuery(this).width();
|
2798 |
if(thisWidth > widest) {
|
2799 |
widest = thisWidth;
|
2800 |
}
|
2801 |
if(count<cols[quest][2])
|
2802 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
2803 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2804 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2805 |
}
|
2806 |
else
|
2807 |
{
|
2808 |
count=0;
|
2809 |
width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
2810 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2811 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2812 |
quest++;
|
2813 |
}
|
2814 |
});
|
2815 |
$js = addslashes( $js );
|
2816 |
$css = "";
|
2817 |
switch( $template_name ) {
|
2818 |
case 'White':
|
2819 |
{ //White
|
2820 |
$css = <<<NOWDOC
|
2821 |
Main Container
|
2822 |
---------------------------------------------------------------------------
|
2823 |
background:#fff;
|
2824 |
box-sizing: border-box;
|
2825 |
color: #555;
|
2826 |
display: inline-block;
|
2827 |
font-size: 14px;
|
2828 |
padding: 10px;
|
2829 |
width: %POLL-WIDTH%;
|
2830 |
zoom: 1;
|
2831 |
Error message
|
2832 |
..................................
|
2833 |
font-size:.8em;
|
2834 |
font-style:italic;
|
2835 |
color:red;
|
2836 |
text-transform:lowercase;
|
2837 |
text-align:center;
|
2838 |
Success message
|
2839 |
..................................
|
2840 |
font-size:.8em;
|
2841 |
font-style:italic;
|
2842 |
color:green;
|
2843 |
text-align:center;
|
2844 |
Poll Question
|
2845 |
---------------------------------------------------------------------------
|
2846 |
border: 0 none;
|
2847 |
margin: 0 0 2em;
|
2848 |
padding: .25em;
|
2849 |
text-align: center;
|
2850 |
font-size: 14px;
|
2851 |
Poll Options / Answers
|
2852 |
---------------------------------------------------------------------------
|
2853 |
list-style: none;
|
2854 |
margin: 0;
|
2855 |
padding: 0;
|
2856 |
list-style: none;
|
2857 |
margin: 0;
|
2858 |
padding: 0;
|
2859 |
font-size: 14px;
|
2860 |
line-height: 2em;
|
2861 |
Label
|
2862 |
..................................
|
2863 |
margin:0px;
|
2864 |
font-style:normal;
|
2865 |
font-weight:normal;
|
2866 |
font-size:14px;
|
2867 |
float:none;
|
2868 |
display:inline-block;
|
2869 |
Custom answer / Other
|
2870 |
..................................
|
2871 |
width: 100%;
|
2872 |
overflow: hidden;
|
2873 |
width: 94%;
|
2874 |
overflow: hidden;
|
2875 |
Custom checkbox and radio button style
|
2876 |
---------------------------------------------------------------------------
|
2877 |
Custom fields
|
2878 |
---------------------------------------------------------------------------
|
2879 |
clear: both;
|
2880 |
list-style: none;
|
2881 |
margin: 0;
|
2882 |
padding: 0;
|
2883 |
overflow: hidden;
|
2884 |
width: 100%;
|
2885 |
display: block;
|
2886 |
font-size:14px;
|
2887 |
list-style: none;
|
2888 |
display: block;
|
2889 |
width: 94%;
|
2890 |
Vote Button
|
2891 |
---------------------------------------------------------------------------
|
2892 |
cursor:pointer;
|
2893 |
display: block;
|
2894 |
font-size:14px;
|
2895 |
margin: 0 auto;
|
2896 |
}
|
2897 |
Results
|
2898 |
---------------------------------------------------------------------------
|
2899 |
font-size: 12px;
|
2900 |
font-style: italic;
|
2901 |
font-weight: normal;
|
2902 |
margin-left: 15px;
|
2903 |
color: #38595E;
|
2904 |
Style for results that are displayed on columns
|
2905 |
..................................
|
2906 |
float: left;
|
2907 |
display: inline-block;
|
2908 |
width: 46%;
|
2909 |
padding: 1%;
|
2910 |
margin: 1%;
|
2911 |
float: right;
|
2912 |
width: auto;
|
2913 |
color:#000;
|
2914 |
text-decoration:underline;
|
2915 |
font-size:12px;
|
2916 |
color:#000;
|
2917 |
text-decoration:underline;
|
2918 |
font-size:12px;
|
2919 |
color:#000;
|
2920 |
text-decoration:underline;
|
2921 |
font-size:12px;
|
2922 |
float:left;
|
2923 |
width:100%;
|
2924 |
Result Bar
|
2925 |
..................................
|
2926 |
---------------------------------------------------------------------------
|
2927 |
EXTRAS
|
2928 |
---------------------------------------------------------------------------
|
2929 |
CAPTCHA
|
2930 |
..................................
|
2931 |
width:30px;
|
2932 |
float:left;
|
2933 |
margin-left:5px;
|
2934 |
height:0px;
|
2935 |
break;
|
2936 |
}
|
2937 |
case 'Grey':
|
2938 |
{ //Grey
|
2939 |
$css = <<<NOWDOC
|
2940 |
Main Container
|
2941 |
---------------------------------------------------------------------------
|
2942 |
background:#eee;
|
2943 |
box-sizing: border-box;
|
2944 |
color: #fff;
|
2945 |
display: inline-block;
|
2946 |
font-size: 14px;
|
2947 |
color:#000;
|
2948 |
padding: 10px;
|
2949 |
width: %POLL-WIDTH%;
|
2950 |
zoom: 1;
|
2951 |
Error message
|
2952 |
..................................
|
2953 |
font-size:.8em;
|
2954 |
font-style:italic;
|
2955 |
color:red;
|
2956 |
text-transform:lowercase;
|
2957 |
text-align:center;
|
2958 |
Success message
|
2959 |
..................................
|
2960 |
font-size:.8em;
|
2961 |
font-style:italic;
|
2962 |
color:green;
|
2963 |
text-align:center;
|
2964 |
Poll Question
|
2965 |
---------------------------------------------------------------------------
|
2966 |
border: 0 none;
|
2967 |
margin: 0 0 2em;
|
2968 |
padding: .25em;
|
2969 |
text-align: center;
|
2970 |
font-size: 14px;
|
2971 |
Poll Options / Answers
|
2972 |
---------------------------------------------------------------------------
|
2973 |
list-style: none;
|
2974 |
margin: 0;
|
2975 |
padding: 0;
|
2976 |
list-style: none;
|
2977 |
margin: 0;
|
2978 |
padding: 0;
|
2979 |
font-size: 14px;
|
2980 |
line-height: 2em;
|
2981 |
Label
|
2982 |
..................................
|
2983 |
margin:0px;
|
2984 |
font-style:normal;
|
2985 |
font-weight:normal;
|
2986 |
font-size:14px;
|
2987 |
float:none;
|
2988 |
display:inline-block;
|
2989 |
Custom answer / Other
|
2990 |
..................................
|
2991 |
width: 100%;
|
2992 |
overflow: hidden;
|
2993 |
width: 94%;
|
2994 |
overflow: hidden;
|
2995 |
Custom checkbox and radio button style
|
2996 |
---------------------------------------------------------------------------
|
2997 |
Custom fields
|
2998 |
---------------------------------------------------------------------------
|
2999 |
clear: both;
|
3000 |
list-style: none;
|
3001 |
margin: 0;
|
3002 |
padding: 0;
|
3003 |
overflow: hidden;
|
3004 |
width: 100%;
|
3005 |
display: block;
|
3006 |
font-size:14px;
|
3007 |
list-style: none;
|
3008 |
display: block;
|
3009 |
width: 94%;
|
3010 |
Vote Button
|
3011 |
---------------------------------------------------------------------------
|
3012 |
cursor:pointer;
|
3013 |
display: block;
|
3014 |
font-size:14px;
|
3015 |
margin: 0 auto;
|
3016 |
}
|
3017 |
Results
|
3018 |
---------------------------------------------------------------------------
|
3019 |
font-size: 12px;
|
3020 |
font-style: italic;
|
3021 |
font-weight: normal;
|
3022 |
margin-left: 15px;
|
3023 |
color: #38595E;
|
3024 |
Style for results that are displayed on columns
|
3025 |
..................................
|
3026 |
float: left;
|
3027 |
display: inline-block;
|
3028 |
width: 46%;
|
3029 |
padding: 1%;
|
3030 |
margin: 1%;
|
3031 |
float: right;
|
3032 |
width: auto;
|
3033 |
color:#000;
|
3034 |
text-decoration:underline;
|
3035 |
font-size:12px;
|
3036 |
color:#000;
|
3037 |
text-decoration:underline;
|
3038 |
font-size:12px;
|
3039 |
color:#000;
|
3040 |
text-decoration:underline;
|
3041 |
font-size:12px;
|
3042 |
float:left;
|
3043 |
width:100%;
|
3044 |
Result Bar
|
3045 |
..................................
|
3046 |
---------------------------------------------------------------------------
|
3047 |
EXTRAS
|
3048 |
---------------------------------------------------------------------------
|
3049 |
CAPTCHA
|
3050 |
..................................
|
3051 |
width:30px;
|
3052 |
float:left;
|
3053 |
margin-left:5px;
|
3054 |
height:0px;
|
3055 |
break;
|
3056 |
}
|
3057 |
case 'Dark':
|
3058 |
{ //Dark
|
3059 |
$css = <<<NOWDOC
|
3060 |
Main Container
|
3061 |
---------------------------------------------------------------------------
|
3062 |
background:#555;
|
3063 |
box-sizing: border-box;
|
3064 |
color: #fff;
|
3065 |
display: inline-block;
|
3066 |
font-size: 14px;
|
3067 |
padding: 10px;
|
3068 |
width: %POLL-WIDTH%;
|
3069 |
zoom: 1;
|
3070 |
Error message
|
3071 |
..................................
|
3072 |
font-size:.8em;
|
3073 |
font-style:italic;
|
3074 |
color:red;
|
3075 |
text-transform:lowercase;
|
3076 |
text-align:center;
|
3077 |
Success message
|
3078 |
..................................
|
3079 |
font-size:.8em;
|
3080 |
font-style:italic;
|
3081 |
color:green;
|
3082 |
text-align:center;
|
3083 |
Poll Question
|
3084 |
---------------------------------------------------------------------------
|
3085 |
border: 0 none;
|
3086 |
margin: 0 0 2em;
|
3087 |
padding: .25em;
|
3088 |
text-align: center;
|
3089 |
font-size: 14px;
|
3090 |
Poll Options / Answers
|
3091 |
---------------------------------------------------------------------------
|
3092 |
list-style: none;
|
3093 |
margin: 0;
|
3094 |
padding: 0;
|
3095 |
list-style: none;
|
3096 |
margin: 0;
|
3097 |
padding: 0;
|
3098 |
font-size: 14px;
|
3099 |
line-height: 2em;
|
3100 |
Label
|
3101 |
..................................
|
3102 |
margin:0px;
|
3103 |
font-style:normal;
|
3104 |
font-weight:normal;
|
3105 |
font-size:14px;
|
3106 |
float:none;
|
3107 |
display:inline-block;
|
3108 |
Custom answer / Other
|
3109 |
..................................
|
3110 |
width: 100%;
|
3111 |
overflow: hidden;
|
3112 |
width: 94%;
|
3113 |
overflow: hidden;
|
3114 |
Custom checkbox and radio button style
|
3115 |
---------------------------------------------------------------------------
|
3116 |
Custom fields
|
3117 |
---------------------------------------------------------------------------
|
3118 |
clear: both;
|
3119 |
list-style: none;
|
3120 |
margin: 0;
|
3121 |
padding: 0;
|
3122 |
overflow: hidden;
|
3123 |
width: 100%;
|
3124 |
display: block;
|
3125 |
font-size:14px;
|
3126 |
list-style: none;
|
3127 |
display: block;
|
3128 |
width: 94%;
|
3129 |
Vote Button
|
3130 |
---------------------------------------------------------------------------
|
3131 |
cursor:pointer;
|
3132 |
display: block;
|
3133 |
font-size:14px;
|
3134 |
margin: 0 auto;
|
3135 |
}
|
3136 |
Results
|
3137 |
---------------------------------------------------------------------------
|
3138 |
font-size: 12px;
|
3139 |
font-style: italic;
|
3140 |
font-weight: normal;
|
3141 |
margin-left: 15px;
|
3142 |
color: #38595E;
|
3143 |
Style for results that are displayed on columns
|
3144 |
..................................
|
3145 |
float: left;
|
3146 |
display: inline-block;
|
3147 |
width: 46%;
|
3148 |
padding: 1%;
|
3149 |
margin: 1%;
|
3150 |
float: right;
|
3151 |
width: auto;
|
3152 |
color:#000;
|
3153 |
text-decoration:underline;
|
3154 |
font-size:12px;
|
3155 |
color:#000;
|
3156 |
text-decoration:underline;
|
3157 |
font-size:12px;
|
3158 |
color:#000;
|
3159 |
text-decoration:underline;
|
3160 |
font-size:12px;
|
3161 |
float:left;
|
3162 |
width:100%;
|
3163 |
Result Bar
|
3164 |
..................................
|
3165 |
---------------------------------------------------------------------------
|
3166 |
EXTRAS
|
3167 |
---------------------------------------------------------------------------
|
3168 |
CAPTCHA
|
3169 |
..................................
|
3170 |
width:30px;
|
3171 |
float:left;
|
3172 |
margin-left:5px;
|
3173 |
height:0px;
|
3174 |
break;
|
3175 |
}
|
3176 |
case 'Blue v1':
|
3177 |
{ //Blue v1
|
3178 |
$css = <<<NOWDOC
|
3179 |
Main Container
|
3180 |
---------------------------------------------------------------------------
|
3181 |
background:#327BD6;
|
3182 |
box-sizing: border-box;
|
3183 |
color: #fff;
|
3184 |
display: inline-block;
|
3185 |
font-size: 14px;
|
3186 |
padding: 10px;
|
3187 |
width: %POLL-WIDTH%;
|
3188 |
zoom: 1;
|
3189 |
Error message
|
3190 |
..................................
|
3191 |
font-size:.8em;
|
3192 |
font-style:italic;
|
3193 |
color:red;
|
3194 |
text-transform:lowercase;
|
3195 |
text-align:center;
|
3196 |
Success message
|
3197 |
..................................
|
3198 |
font-size:.8em;
|
3199 |
font-style:italic;
|
3200 |
color:green;
|
3201 |
text-align:center;
|
3202 |
Poll Question
|
3203 |
---------------------------------------------------------------------------
|
3204 |
border: 0 none;
|
3205 |
margin: 0 0 2em;
|
3206 |
padding: .25em;
|
3207 |
text-align: center;
|
3208 |
font-size: 14px;
|
3209 |
Poll Options / Answers
|
3210 |
---------------------------------------------------------------------------
|
3211 |
list-style: none;
|
3212 |
margin: 0;
|
3213 |
padding: 0;
|
3214 |
list-style: none;
|
3215 |
margin: 0;
|
3216 |
padding: 0;
|
3217 |
font-size: 14px;
|
3218 |
line-height: 2em;
|
3219 |
Label
|
3220 |
..................................
|
3221 |
margin:0px;
|
3222 |
font-style:normal;
|
3223 |
font-weight:normal;
|
3224 |
font-size:14px;
|
3225 |
float:none;
|
3226 |
display:inline-block;
|
3227 |
Custom answer / Other
|
3228 |
..................................
|
3229 |
width: 100%;
|
3230 |
overflow: hidden;
|
3231 |
width: 94%;
|
3232 |
overflow: hidden;
|
3233 |
Custom checkbox and radio button style
|
3234 |
---------------------------------------------------------------------------
|
3235 |
Custom fields
|
3236 |
---------------------------------------------------------------------------
|
3237 |
clear: both;
|
3238 |
list-style: none;
|
3239 |
margin: 0;
|
3240 |
padding: 0;
|
3241 |
overflow: hidden;
|
3242 |
width: 100%;
|
3243 |
display: block;
|
3244 |
font-size:14px;
|
3245 |
list-style: none;
|
3246 |
display: block;
|
3247 |
width: 94%;
|
3248 |
Vote Button
|
3249 |
---------------------------------------------------------------------------
|
3250 |
cursor:pointer;
|
3251 |
display: block;
|
3252 |
font-size:14px;
|
3253 |
margin: 0 auto;
|
3254 |
}
|
3255 |
Results
|
3256 |
---------------------------------------------------------------------------
|
3257 |
font-size: 12px;
|
3258 |
font-style: italic;
|
3259 |
font-weight: normal;
|
3260 |
margin-left: 15px;
|
3261 |
color: #38595E;
|
3262 |
Style for results that are displayed on columns
|
3263 |
..................................
|
3264 |
float: left;
|
3265 |
display: inline-block;
|
3266 |
width: 46%;
|
3267 |
padding: 1%;
|
3268 |
margin: 1%;
|
3269 |
float: right;
|
3270 |
width: auto;
|
3271 |
color:#000;
|
3272 |
text-decoration:underline;
|
3273 |
font-size:12px;
|
3274 |
color:#000;
|
3275 |
text-decoration:underline;
|
3276 |
font-size:12px;
|
3277 |
color:#000;
|
3278 |
text-decoration:underline;
|
3279 |
font-size:12px;
|
3280 |
float:left;
|
3281 |
width:100%;
|
3282 |
Result Bar
|
3283 |
..................................
|
3284 |
---------------------------------------------------------------------------
|
3285 |
EXTRAS
|
3286 |
---------------------------------------------------------------------------
|
3287 |
CAPTCHA
|
3288 |
..................................
|
3289 |
width:30px;
|
3290 |
float:left;
|
3291 |
margin-left:5px;
|
3292 |
height:0px;
|
3293 |
break;
|
3294 |
}
|
3295 |
case 'Blue v2':
|
3296 |
{ //Blue v2
|
3297 |
$css = <<<NOWDOC
|
3298 |
Main Container
|
3299 |
---------------------------------------------------------------------------
|
3300 |
background:#fff;
|
3301 |
box-sizing: border-box;
|
3302 |
display: inline-block;
|
3303 |
font-size: 14px;
|
3304 |
color:#555;
|
3305 |
padding: 10px;
|
3306 |
width: %POLL-WIDTH%;
|
3307 |
zoom: 1;
|
3308 |
Error message
|
3309 |
..................................
|
3310 |
font-size:.8em;
|
3311 |
font-style:italic;
|
3312 |
color:red;
|
3313 |
text-transform:lowercase;
|
3314 |
text-align:center;
|
3315 |
Success message
|
3316 |
..................................
|
3317 |
font-size:.8em;
|
3318 |
font-style:italic;
|
3319 |
color:green;
|
3320 |
text-align:center;
|
3321 |
Poll Question
|
3322 |
---------------------------------------------------------------------------
|
3323 |
background:#327BD6;
|
3324 |
color:#fff;
|
3325 |
border: 0 none;
|
3326 |
margin: 0 0 2em;
|
3327 |
padding: .25em;
|
3328 |
text-align: center;
|
3329 |
font-size: 14px;
|
3330 |
Poll Options / Answers
|
3331 |
---------------------------------------------------------------------------
|
3332 |
list-style: none;
|
3333 |
margin: 0;
|
3334 |
padding: 0;
|
3335 |
list-style: none;
|
3336 |
margin: 0;
|
3337 |
padding: 0;
|
3338 |
font-size: 14px;
|
3339 |
line-height: 2em;
|
3340 |
Label
|
3341 |
..................................
|
3342 |
margin:0px;
|
3343 |
font-style:normal;
|
3344 |
font-weight:normal;
|
3345 |
font-size:14px;
|
3346 |
float:none;
|
3347 |
display:inline-block;
|
3348 |
Custom answer / Other
|
3349 |
..................................
|
3350 |
width: 100%;
|
3351 |
overflow: hidden;
|
3352 |
width: 94%;
|
3353 |
overflow: hidden;
|
3354 |
Custom checkbox and radio button style
|
3355 |
---------------------------------------------------------------------------
|
3356 |
Custom fields
|
3357 |
---------------------------------------------------------------------------
|
3358 |
clear: both;
|
3359 |
list-style: none;
|
3360 |
margin: 0;
|
3361 |
padding: 0;
|
3362 |
overflow: hidden;
|
3363 |
width: 100%;
|
3364 |
display: block;
|
3365 |
font-size:14px;
|
3366 |
list-style: none;
|
3367 |
display: block;
|
3368 |
width: 94%;
|
3369 |
Vote Button
|
3370 |
---------------------------------------------------------------------------
|
3371 |
cursor:pointer;
|
3372 |
display: block;
|
3373 |
font-size:14px;
|
3374 |
margin: 0 auto;
|
3375 |
}
|
3376 |
Results
|
3377 |
---------------------------------------------------------------------------
|
3378 |
font-size: 12px;
|
3379 |
font-style: italic;
|
3380 |
font-weight: normal;
|
3381 |
margin-left: 15px;
|
3382 |
color: #38595E;
|
3383 |
Style for results that are displayed on columns
|
3384 |
..................................
|
3385 |
float: left;
|
3386 |
display: inline-block;
|
3387 |
width: 46%;
|
3388 |
padding: 1%;
|
3389 |
margin: 1%;
|
3390 |
float: right;
|
3391 |
width: auto;
|
3392 |
color:#000;
|
3393 |
text-decoration:underline;
|
3394 |
font-size:12px;
|
3395 |
color:#000;
|
3396 |
text-decoration:underline;
|
3397 |
font-size:12px;
|
3398 |
color:#000;
|
3399 |
text-decoration:underline;
|
3400 |
font-size:12px;
|
3401 |
float:left;
|
3402 |
width:100%;
|
3403 |
Result Bar
|
3404 |
..................................
|
3405 |
---------------------------------------------------------------------------
|
3406 |
EXTRAS
|
3407 |
---------------------------------------------------------------------------
|
3408 |
CAPTCHA
|
3409 |
..................................
|
3410 |
width:30px;
|
3411 |
float:left;
|
3412 |
margin-left:5px;
|
3413 |
height:0px;
|
3414 |
break;
|
3415 |
}
|
3416 |
case 'Blue v3':
|
3417 |
{ //Blue v3
|
3418 |
$css = <<<NOWDOC
|
3419 |
Main Container
|
3420 |
---------------------------------------------------------------------------
|
3421 |
background:#fff;
|
3422 |
box-sizing: border-box;
|
3423 |
display: inline-block;
|
3424 |
font-size: 14px;
|
3425 |
color:#555;
|
3426 |
padding: 10px;
|
3427 |
width: %POLL-WIDTH%;
|
3428 |
zoom: 1;
|
3429 |
border: 5px solid #327BD6;
|
3430 |
Error message
|
3431 |
..................................
|
3432 |
font-size:.8em;
|
3433 |
font-style:italic;
|
3434 |
color:red;
|
3435 |
text-transform:lowercase;
|
3436 |
text-align:center;
|
3437 |
Success message
|
3438 |
..................................
|
3439 |
font-size:.8em;
|
3440 |
font-style:italic;
|
3441 |
color:green;
|
3442 |
text-align:center;
|
3443 |
Poll Question
|
3444 |
---------------------------------------------------------------------------
|
3445 |
border: 0 none;
|
3446 |
margin: 0 0 2em;
|
3447 |
padding: .25em;
|
3448 |
text-align: center;
|
3449 |
font-size: 14px;
|
3450 |
Poll Options / Answers
|
3451 |
---------------------------------------------------------------------------
|
3452 |
list-style: none;
|
3453 |
margin: 0;
|
3454 |
padding: 0;
|
3455 |
list-style: none;
|
3456 |
margin: 0;
|
3457 |
padding: 0;
|
3458 |
font-size: 14px;
|
3459 |
line-height: 2em;
|
3460 |
Label
|
3461 |
..................................
|
3462 |
margin:0px;
|
3463 |
font-style:normal;
|
3464 |
font-weight:normal;
|
3465 |
font-size:14px;
|
3466 |
float:none;
|
3467 |
display:inline-block;
|
3468 |
Custom answer / Other
|
3469 |
..................................
|
3470 |
width: 100%;
|
3471 |
overflow: hidden;
|
3472 |
width: 94%;
|
3473 |
overflow: hidden;
|
3474 |
Custom checkbox and radio button style
|
3475 |
---------------------------------------------------------------------------
|
3476 |
Custom fields
|
3477 |
---------------------------------------------------------------------------
|
3478 |
clear: both;
|
3479 |
list-style: none;
|
3480 |
margin: 0;
|
3481 |
padding: 0;
|
3482 |
overflow: hidden;
|
3483 |
width: 100%;
|
3484 |
display: block;
|
3485 |
font-size:14px;
|
3486 |
list-style: none;
|
3487 |
display: block;
|
3488 |
width: 94%;
|
3489 |
Vote Button
|
3490 |
---------------------------------------------------------------------------
|
3491 |
cursor:pointer;
|
3492 |
display: block;
|
3493 |
font-size:14px;
|
3494 |
margin: 0 auto;
|
3495 |
}
|
3496 |
Results
|
3497 |
---------------------------------------------------------------------------
|
3498 |
font-size: 12px;
|
3499 |
font-style: italic;
|
3500 |
font-weight: normal;
|
3501 |
margin-left: 15px;
|
3502 |
color: #38595E;
|
3503 |
Style for results that are displayed on columns
|
3504 |
..................................
|
3505 |
float: left;
|
3506 |
display: inline-block;
|
3507 |
width: 46%;
|
3508 |
padding: 1%;
|
3509 |
margin: 1%;
|
3510 |
float: right;
|
3511 |
width: auto;
|
3512 |
color:#000;
|
3513 |
text-decoration:underline;
|
3514 |
font-size:12px;
|
3515 |
color:#000;
|
3516 |
text-decoration:underline;
|
3517 |
font-size:12px;
|
3518 |
color:#000;
|
3519 |
text-decoration:underline;
|
3520 |
font-size:12px;
|
3521 |
float:left;
|
3522 |
width:100%;
|
3523 |
Result Bar
|
3524 |
..................................
|
3525 |
---------------------------------------------------------------------------
|
3526 |
EXTRAS
|
3527 |
---------------------------------------------------------------------------
|
3528 |
CAPTCHA
|
3529 |
..................................
|
3530 |
width:30px;
|
3531 |
float:left;
|
3532 |
margin-left:5px;
|
3533 |
height:0px;
|
3534 |
break;
|
3535 |
}
|
3536 |
case 'Red v1':
|
3537 |
{ //Red v1
|
3538 |
$css = <<<NOWDOC
|
3539 |
Main Container
|
3540 |
---------------------------------------------------------------------------
|
3541 |
background:#B70004;
|
3542 |
box-sizing: border-box;
|
3543 |
display: inline-block;
|
3544 |
font-size: 14px;
|
3545 |
color:white;
|
3546 |
padding: 10px;
|
3547 |
width: %POLL-WIDTH%;
|
3548 |
zoom: 1;
|
3549 |
Error message
|
3550 |
..................................
|
3551 |
font-size:.8em;
|
3552 |
font-style:italic;
|
3553 |
color:red;
|
3554 |
text-transform:lowercase;
|
3555 |
text-align:center;
|
3556 |
Success message
|
3557 |
..................................
|
3558 |
font-size:.8em;
|
3559 |
font-style:italic;
|
3560 |
color:green;
|
3561 |
text-align:center;
|
3562 |
Poll Question
|
3563 |
---------------------------------------------------------------------------
|
3564 |
border: 0 none;
|
3565 |
margin: 0 0 2em;
|
3566 |
padding: .25em;
|
3567 |
text-align: center;
|
3568 |
font-size: 14px;
|
3569 |
Poll Options / Answers
|
3570 |
---------------------------------------------------------------------------
|
3571 |
list-style: none;
|
3572 |
margin: 0;
|
3573 |
padding: 0;
|
3574 |
list-style: none;
|
3575 |
margin: 0;
|
3576 |
padding: 0;
|
3577 |
font-size: 14px;
|
3578 |
line-height: 2em;
|
3579 |
Label
|
3580 |
..................................
|
3581 |
margin:0px;
|
3582 |
font-style:normal;
|
3583 |
font-weight:normal;
|
3584 |
font-size:14px;
|
3585 |
float:none;
|
3586 |
display:inline-block;
|
3587 |
Custom answer / Other
|
3588 |
..................................
|
3589 |
width: 100%;
|
3590 |
overflow: hidden;
|
3591 |
width: 94%;
|
3592 |
overflow: hidden;
|
3593 |
Custom checkbox and radio button style
|
3594 |
---------------------------------------------------------------------------
|
3595 |
Custom fields
|
3596 |
---------------------------------------------------------------------------
|
3597 |
clear: both;
|
3598 |
list-style: none;
|
3599 |
margin: 0;
|
3600 |
padding: 0;
|
3601 |
overflow: hidden;
|
3602 |
width: 100%;
|
3603 |
display: block;
|
3604 |
font-size:14px;
|
3605 |
list-style: none;
|
3606 |
display: block;
|
3607 |
width: 94%;
|
3608 |
Vote Button
|
3609 |
---------------------------------------------------------------------------
|
3610 |
cursor:pointer;
|
3611 |
display: block;
|
3612 |
font-size:14px;
|
3613 |
margin: 0 auto;
|
3614 |
}
|
3615 |
Results
|
3616 |
---------------------------------------------------------------------------
|
3617 |
font-size: 12px;
|
3618 |
font-style: italic;
|
3619 |
font-weight: normal;
|
3620 |
margin-left: 15px;
|
3621 |
color: #38595E;
|
3622 |
Style for results that are displayed on columns
|
3623 |
..................................
|
3624 |
float: left;
|
3625 |
display: inline-block;
|
3626 |
width: 46%;
|
3627 |
padding: 1%;
|
3628 |
margin: 1%;
|
3629 |
float: right;
|
3630 |
width: auto;
|
3631 |
color:#000;
|
3632 |
text-decoration:underline;
|
3633 |
font-size:12px;
|
3634 |
color:#000;
|
3635 |
text-decoration:underline;
|
3636 |
font-size:12px;
|
3637 |
color:#000;
|
3638 |
text-decoration:underline;
|
3639 |
font-size:12px;
|
3640 |
float:left;
|
3641 |
width:100%;
|
3642 |
Result Bar
|
3643 |
..................................
|
3644 |
---------------------------------------------------------------------------
|
3645 |
EXTRAS
|
3646 |
---------------------------------------------------------------------------
|
3647 |
CAPTCHA
|
3648 |
..................................
|
3649 |
width:30px;
|
3650 |
float:left;
|
3651 |
margin-left:5px;
|
3652 |
height:0px;
|
3653 |
break;
|
3654 |
}
|
3655 |
case 'Red v2':
|
3656 |
{ //Red v2
|
3657 |
$css = <<<NOWDOC
|
3658 |
Main Container
|
3659 |
---------------------------------------------------------------------------
|
3660 |
background:#fff;
|
3661 |
box-sizing: border-box;
|
3662 |
display: inline-block;
|
3663 |
font-size: 14px;
|
3664 |
color:#555;
|
3665 |
padding: 10px;
|
3666 |
width: %POLL-WIDTH%;
|
3667 |
zoom: 1;
|
3668 |
Error message
|
3669 |
..................................
|
3670 |
font-size:.8em;
|
3671 |
font-style:italic;
|
3672 |
color:red;
|
3673 |
text-transform:lowercase;
|
3674 |
text-align:center;
|
3675 |
Success message
|
3676 |
..................................
|
3677 |
font-size:.8em;
|
3678 |
font-style:italic;
|
3679 |
color:green;
|
3680 |
text-align:center;
|
3681 |
Poll Question
|
3682 |
---------------------------------------------------------------------------
|
3683 |
background:#B70004;
|
3684 |
color:#fff;
|
3685 |
border: 0 none;
|
3686 |
margin: 0 0 2em;
|
3687 |
padding: .25em;
|
3688 |
text-align: center;
|
3689 |
font-size: 14px;
|
3690 |
Poll Options / Answers
|
3691 |
---------------------------------------------------------------------------
|
3692 |
list-style: none;
|
3693 |
margin: 0;
|
3694 |
padding: 0;
|
3695 |
list-style: none;
|
3696 |
margin: 0;
|
3697 |
padding: 0;
|
3698 |
font-size: 14px;
|
3699 |
line-height: 2em;
|
3700 |
Label
|
3701 |
..................................
|
3702 |
margin:0px;
|
3703 |
font-style:normal;
|
3704 |
font-weight:normal;
|
3705 |
font-size:14px;
|
3706 |
float:none;
|
3707 |
display:inline-block;
|
3708 |
Custom answer / Other
|
3709 |
..................................
|
3710 |
width: 100%;
|
3711 |
overflow: hidden;
|
3712 |
width: 94%;
|
3713 |
overflow: hidden;
|
3714 |
Custom checkbox and radio button style
|
3715 |
---------------------------------------------------------------------------
|
3716 |
Custom fields
|
3717 |
---------------------------------------------------------------------------
|
3718 |
clear: both;
|
3719 |
list-style: none;
|
3720 |
margin: 0;
|
3721 |
padding: 0;
|
3722 |
overflow: hidden;
|
3723 |
width: 100%;
|
3724 |
display: block;
|
3725 |
font-size:14px;
|
3726 |
list-style: none;
|
3727 |
display: block;
|
3728 |
width: 94%;
|
3729 |
Vote Button
|
3730 |
---------------------------------------------------------------------------
|
3731 |
cursor:pointer;
|
3732 |
display: block;
|
3733 |
font-size:14px;
|
3734 |
margin: 0 auto;
|
3735 |
}
|
3736 |
Results
|
3737 |
---------------------------------------------------------------------------
|
3738 |
font-size: 12px;
|
3739 |
font-style: italic;
|
3740 |
font-weight: normal;
|
3741 |
margin-left: 15px;
|
3742 |
color: #38595E;
|
3743 |
Style for results that are displayed on columns
|
3744 |
..................................
|
3745 |
float: left;
|
3746 |
display: inline-block;
|
3747 |
width: 46%;
|
3748 |
padding: 1%;
|
3749 |
margin: 1%;
|
3750 |
float: right;
|
3751 |
width: auto;
|
3752 |
color:#000;
|
3753 |
text-decoration:underline;
|
3754 |
font-size:12px;
|
3755 |
color:#000;
|
3756 |
text-decoration:underline;
|
3757 |
font-size:12px;
|
3758 |
color:#000;
|
3759 |
text-decoration:underline;
|
3760 |
font-size:12px;
|
3761 |
float:left;
|
3762 |
width:100%;
|
3763 |
Result Bar
|
3764 |
..................................
|
3765 |
---------------------------------------------------------------------------
|
3766 |
EXTRAS
|
3767 |
---------------------------------------------------------------------------
|
3768 |
CAPTCHA
|
3769 |
..................................
|
3770 |
width:30px;
|
3771 |
float:left;
|
3772 |
margin-left:5px;
|
3773 |
height:0px;
|
3774 |
break;
|
3775 |
}
|
3776 |
case 'Red v3':
|
3777 |
{ //Red v3
|
3778 |
$css = <<<NOWDOC
|
3779 |
Main Container
|
3780 |
---------------------------------------------------------------------------
|
3781 |
background:#fff;
|
3782 |
box-sizing: border-box;
|
3783 |
display: inline-block;
|
3784 |
font-size: 14px;
|
3785 |
color:#555;
|
3786 |
padding: 10px;
|
3787 |
width: %POLL-WIDTH%;
|
3788 |
zoom: 1;
|
3789 |
border:5px solid #B70004;
|
3790 |
Error message
|
3791 |
..................................
|
3792 |
font-size:.8em;
|
3793 |
font-style:italic;
|
3794 |
color:red;
|
3795 |
text-transform:lowercase;
|
3796 |
text-align:center;
|
3797 |
Success message
|
3798 |
..................................
|
3799 |
font-size:.8em;
|
3800 |
font-style:italic;
|
3801 |
color:green;
|
3802 |
text-align:center;
|
3803 |
Poll Question
|
3804 |
---------------------------------------------------------------------------
|
3805 |
border: 0 none;
|
3806 |
margin: 0 0 2em;
|
3807 |
padding: .25em;
|
3808 |
text-align: center;
|
3809 |
font-size: 14px;
|
3810 |
Poll Options / Answers
|
3811 |
---------------------------------------------------------------------------
|
3812 |
list-style: none;
|
3813 |
margin: 0;
|
3814 |
padding: 0;
|
3815 |
list-style: none;
|
3816 |
margin: 0;
|
3817 |
padding: 0;
|
3818 |
font-size: 14px;
|
3819 |
line-height: 2em;
|
3820 |
Label
|
3821 |
..................................
|
3822 |
margin:0px;
|
3823 |
font-style:normal;
|
3824 |
font-weight:normal;
|
3825 |
font-size:14px;
|
3826 |
float:none;
|
3827 |
display:inline-block;
|
3828 |
Custom answer / Other
|
3829 |
..................................
|
3830 |
width: 100%;
|
3831 |
overflow: hidden;
|
3832 |
width: 94%;
|
3833 |
overflow: hidden;
|
3834 |
Custom checkbox and radio button style
|
3835 |
---------------------------------------------------------------------------
|
3836 |
Custom fields
|
3837 |
---------------------------------------------------------------------------
|
3838 |
clear: both;
|
3839 |
list-style: none;
|
3840 |
margin: 0;
|
3841 |
padding: 0;
|
3842 |
overflow: hidden;
|
3843 |
width: 100%;
|
3844 |
display: block;
|
3845 |
font-size:14px;
|
3846 |
list-style: none;
|
3847 |
display: block;
|
3848 |
width: 94%;
|
3849 |
Vote Button
|
3850 |
---------------------------------------------------------------------------
|
3851 |
cursor:pointer;
|
3852 |
display: block;
|
3853 |
font-size:14px;
|
3854 |
margin: 0 auto;
|
3855 |
}
|
3856 |
Results
|
3857 |
---------------------------------------------------------------------------
|
3858 |
font-size: 12px;
|
3859 |
font-style: italic;
|
3860 |
font-weight: normal;
|
3861 |
margin-left: 15px;
|
3862 |
color: #38595E;
|
3863 |
Style for results that are displayed on columns
|
3864 |
..................................
|
3865 |
float: left;
|
3866 |
display: inline-block;
|
3867 |
width: 46%;
|
3868 |
padding: 1%;
|
3869 |
margin: 1%;
|
3870 |
float: right;
|
3871 |
width: auto;
|
3872 |
color:#000;
|
3873 |
text-decoration:underline;
|
3874 |
font-size:12px;
|
3875 |
color:#000;
|
3876 |
text-decoration:underline;
|
3877 |
font-size:12px;
|
3878 |
color:#000;
|
3879 |
text-decoration:underline;
|
3880 |
font-size:12px;
|
3881 |
float:left;
|
3882 |
width:100%;
|
3883 |
Result Bar
|
3884 |
..................................
|
3885 |
---------------------------------------------------------------------------
|
3886 |
EXTRAS
|
3887 |
---------------------------------------------------------------------------
|
3888 |
CAPTCHA
|
3889 |
..................................
|
3890 |
width:30px;
|
3891 |
float:left;
|
3892 |
margin-left:5px;
|
3893 |
height:0px;
|
3894 |
break;
|
3895 |
}
|
3896 |
case 'Green v1':
|
3897 |
{ //Green v1
|
3898 |
$css = <<<NOWDOC
|
3899 |
Main Container
|
3900 |
---------------------------------------------------------------------------
|
3901 |
background:#3F8B43;
|
3902 |
box-sizing: border-box;
|
3903 |
display: inline-block;
|
3904 |
font-size: 14px;
|
3905 |
color:white;
|
3906 |
padding: 10px;
|
3907 |
width: %POLL-WIDTH%;
|
3908 |
zoom: 1;
|
3909 |
Error message
|
3910 |
..................................
|
3911 |
font-size:.8em;
|
3912 |
font-style:italic;
|
3913 |
color:red;
|
3914 |
text-transform:lowercase;
|
3915 |
text-align:center;
|
3916 |
Success message
|
3917 |
..................................
|
3918 |
font-size:.8em;
|
3919 |
font-style:italic;
|
3920 |
color:green;
|
3921 |
text-align:center;
|
3922 |
Poll Question
|
3923 |
---------------------------------------------------------------------------
|
3924 |
border: 0 none;
|
3925 |
margin: 0 0 2em;
|
3926 |
padding: .25em;
|
3927 |
text-align: center;
|
3928 |
font-size: 14px;
|
3929 |
Poll Options / Answers
|
3930 |
---------------------------------------------------------------------------
|
3931 |
list-style: none;
|
3932 |
margin: 0;
|
3933 |
padding: 0;
|
3934 |
list-style: none;
|
3935 |
margin: 0;
|
3936 |
padding: 0;
|
3937 |
font-size: 14px;
|
3938 |
line-height: 2em;
|
3939 |
Label
|
3940 |
..................................
|
3941 |
margin:0px;
|
3942 |
font-style:normal;
|
3943 |
font-weight:normal;
|
3944 |
font-size:14px;
|
3945 |
float:none;
|
3946 |
display:inline-block;
|
3947 |
Custom answer / Other
|
3948 |
..................................
|
3949 |
width: 100%;
|
3950 |
overflow: hidden;
|
3951 |
width: 94%;
|
3952 |
overflow: hidden;
|
3953 |
Custom checkbox and radio button style
|
3954 |
---------------------------------------------------------------------------
|
3955 |
Custom fields
|
3956 |
---------------------------------------------------------------------------
|
3957 |
clear: both;
|
3958 |
list-style: none;
|
3959 |
margin: 0;
|
3960 |
padding: 0;
|
3961 |
overflow: hidden;
|
3962 |
width: 100%;
|
3963 |
display: block;
|
3964 |
font-size:14px;
|
3965 |
list-style: none;
|
3966 |
display: block;
|
3967 |
width: 94%;
|
3968 |
Vote Button
|
3969 |
---------------------------------------------------------------------------
|
3970 |
cursor:pointer;
|
3971 |
display: block;
|
3972 |
font-size:14px;
|
3973 |
margin: 0 auto;
|
3974 |
}
|
3975 |
Results
|
3976 |
---------------------------------------------------------------------------
|
3977 |
font-size: 12px;
|
3978 |
font-style: italic;
|
3979 |
font-weight: normal;
|
3980 |
margin-left: 15px;
|
3981 |
color: #38595E;
|
3982 |
Style for results that are displayed on columns
|
3983 |
..................................
|
3984 |
float: left;
|
3985 |
display: inline-block;
|
3986 |
width: 46%;
|
3987 |
padding: 1%;
|
3988 |
margin: 1%;
|
3989 |
float: right;
|
3990 |
width: auto;
|
3991 |
color:#000;
|
3992 |
text-decoration:underline;
|
3993 |
font-size:12px;
|
3994 |
color:#000;
|
3995 |
text-decoration:underline;
|
3996 |
font-size:12px;
|
3997 |
color:#000;
|
3998 |
text-decoration:underline;
|
3999 |
font-size:12px;
|
4000 |
float:left;
|
4001 |
width:100%;
|
4002 |
Result Bar
|
4003 |
..................................
|
4004 |
---------------------------------------------------------------------------
|
4005 |
EXTRAS
|
4006 |
---------------------------------------------------------------------------
|
4007 |
CAPTCHA
|
4008 |
..................................
|
4009 |
width:30px;
|
4010 |
float:left;
|
4011 |
margin-left:5px;
|
4012 |
height:0px;
|
4013 |
break;
|
4014 |
}
|
4015 |
case 'Green v2':
|
4016 |
{ //Green v2
|
4017 |
$css = <<<NOWDOC
|
4018 |
Main Container
|
4019 |
---------------------------------------------------------------------------
|
4020 |
background:#fff;
|
4021 |
box-sizing: border-box;
|
4022 |
display: inline-block;
|
4023 |
font-size: 14px;
|
4024 |
color:#555;
|
4025 |
padding: 10px;
|
4026 |
width: %POLL-WIDTH%;
|
4027 |
zoom: 1;
|
4028 |
Error message
|
4029 |
..................................
|
4030 |
font-size:.8em;
|
4031 |
font-style:italic;
|
4032 |
color:red;
|
4033 |
text-transform:lowercase;
|
4034 |
text-align:center;
|
4035 |
Success message
|
4036 |
..................................
|
4037 |
font-size:.8em;
|
4038 |
font-style:italic;
|
4039 |
color:green;
|
4040 |
text-align:center;
|
4041 |
Poll Question
|
4042 |
---------------------------------------------------------------------------
|
4043 |
background:#3F8B43;
|
4044 |
color:#fff;
|
4045 |
border: 0 none;
|
4046 |
margin: 0 0 2em;
|
4047 |
padding: .25em;
|
4048 |
text-align: center;
|
4049 |
font-size: 14px;
|
4050 |
Poll Options / Answers
|
4051 |
---------------------------------------------------------------------------
|
4052 |
list-style: none;
|
4053 |
margin: 0;
|
4054 |
padding: 0;
|
4055 |
list-style: none;
|
4056 |
margin: 0;
|
4057 |
padding: 0;
|
4058 |
font-size: 14px;
|
4059 |
line-height: 2em;
|
4060 |
Label
|
4061 |
..................................
|
4062 |
margin:0px;
|
4063 |
font-style:normal;
|
4064 |
font-weight:normal;
|
4065 |
font-size:14px;
|
4066 |
float:none;
|
4067 |
display:inline-block;
|
4068 |
Custom answer / Other
|
4069 |
..................................
|
4070 |
width: 100%;
|
4071 |
overflow: hidden;
|
4072 |
width: 94%;
|
4073 |
overflow: hidden;
|
4074 |
Custom checkbox and radio button style
|
4075 |
---------------------------------------------------------------------------
|
4076 |
Custom fields
|
4077 |
---------------------------------------------------------------------------
|
4078 |
clear: both;
|
4079 |
list-style: none;
|
4080 |
margin: 0;
|
4081 |
padding: 0;
|
4082 |
overflow: hidden;
|
4083 |
width: 100%;
|
4084 |
display: block;
|
4085 |
font-size:14px;
|
4086 |
list-style: none;
|
4087 |
display: block;
|
4088 |
width: 94%;
|
4089 |
Vote Button
|
4090 |
---------------------------------------------------------------------------
|
4091 |
cursor:pointer;
|
4092 |
display: block;
|
4093 |
font-size:14px;
|
4094 |
margin: 0 auto;
|
4095 |
}
|
4096 |
Results
|
4097 |
---------------------------------------------------------------------------
|
4098 |
font-size: 12px;
|
4099 |
font-style: italic;
|
4100 |
font-weight: normal;
|
4101 |
margin-left: 15px;
|
4102 |
color: #38595E;
|
4103 |
Style for results that are displayed on columns
|
4104 |
..................................
|
4105 |
float: left;
|
4106 |
display: inline-block;
|
4107 |
width: 46%;
|
4108 |
padding: 1%;
|
4109 |
margin: 1%;
|
4110 |
float: right;
|
4111 |
width: auto;
|
4112 |
color:#000;
|
4113 |
text-decoration:underline;
|
4114 |
font-size:12px;
|
4115 |
color:#000;
|
4116 |
text-decoration:underline;
|
4117 |
font-size:12px;
|
4118 |
color:#000;
|
4119 |
text-decoration:underline;
|
4120 |
font-size:12px;
|
4121 |
float:left;
|
4122 |
width:100%;
|
4123 |
Result Bar
|
4124 |
..................................
|
4125 |
---------------------------------------------------------------------------
|
4126 |
EXTRAS
|
4127 |
---------------------------------------------------------------------------
|
4128 |
CAPTCHA
|
4129 |
..................................
|
4130 |
width:30px;
|
4131 |
float:left;
|
4132 |
margin-left:5px;
|
4133 |
height:0px;
|
4134 |
break;
|
4135 |
}
|
4136 |
case 'Green v3':
|
4137 |
{ //Green v3
|
4138 |
$css = <<<NOWDOC
|
4139 |
Main Container
|
4140 |
---------------------------------------------------------------------------
|
4141 |
background:#fff;
|
4142 |
box-sizing: border-box;
|
4143 |
display: inline-block;
|
4144 |
font-size: 14px;
|
4145 |
color:#555;
|
4146 |
padding: 10px;
|
4147 |
width: %POLL-WIDTH%;
|
4148 |
zoom: 1;
|
4149 |
border:5px solid #3F8B43;
|
4150 |
Error message
|
4151 |
..................................
|
4152 |
font-size:.8em;
|
4153 |
font-style:italic;
|
4154 |
color:red;
|
4155 |
text-transform:lowercase;
|
4156 |
text-align:center;
|
4157 |
Success message
|
4158 |
..................................
|
4159 |
font-size:.8em;
|
4160 |
font-style:italic;
|
4161 |
color:green;
|
4162 |
text-align:center;
|
4163 |
Poll Question
|
4164 |
---------------------------------------------------------------------------
|
4165 |
border: 0 none;
|
4166 |
margin: 0 0 2em;
|
4167 |
padding: .25em;
|
4168 |
text-align: center;
|
4169 |
font-size: 14px;
|
4170 |
Poll Options / Answers
|
4171 |
---------------------------------------------------------------------------
|
4172 |
list-style: none;
|
4173 |
margin: 0;
|
4174 |
padding: 0;
|
4175 |
list-style: none;
|
4176 |
margin: 0;
|
4177 |
padding: 0;
|
4178 |
font-size: 14px;
|
4179 |
line-height: 2em;
|
4180 |
Label
|
4181 |
..................................
|
4182 |
margin:0px;
|
4183 |
font-style:normal;
|
4184 |
font-weight:normal;
|
4185 |
font-size:14px;
|
4186 |
float:none;
|
4187 |
display:inline-block;
|
4188 |
Custom answer / Other
|
4189 |
..................................
|
4190 |
width: 100%;
|
4191 |
overflow: hidden;
|
4192 |
width: 94%;
|
4193 |
overflow: hidden;
|
4194 |
Custom checkbox and radio button style
|
4195 |
---------------------------------------------------------------------------
|
4196 |
Custom fields
|
4197 |
---------------------------------------------------------------------------
|
4198 |
clear: both;
|
4199 |
list-style: none;
|
4200 |
margin: 0;
|
4201 |
padding: 0;
|
4202 |
overflow: hidden;
|
4203 |
width: 100%;
|
4204 |
display: block;
|
4205 |
font-size:14px;
|
4206 |
list-style: none;
|
4207 |
display: block;
|
4208 |
width: 94%;
|
4209 |
Vote Button
|
4210 |
---------------------------------------------------------------------------
|
4211 |
cursor:pointer;
|
4212 |
display: block;
|
4213 |
font-size:14px;
|
4214 |
margin: 0 auto;
|
4215 |
}
|
4216 |
Results
|
4217 |
---------------------------------------------------------------------------
|
4218 |
font-size: 12px;
|
4219 |
font-style: italic;
|
4220 |
font-weight: normal;
|
4221 |
margin-left: 15px;
|
4222 |
color: #38595E;
|
4223 |
Style for results that are displayed on columns
|
4224 |
..................................
|
4225 |
float: left;
|
4226 |
display: inline-block;
|
4227 |
width: 46%;
|
4228 |
padding: 1%;
|
4229 |
margin: 1%;
|
4230 |
float: right;
|
4231 |
width: auto;
|
4232 |
color:#000;
|
4233 |
text-decoration:underline;
|
4234 |
font-size:12px;
|
4235 |
color:#000;
|
4236 |
text-decoration:underline;
|
4237 |
font-size:12px;
|
4238 |
color:#000;
|
4239 |
text-decoration:underline;
|
4240 |
font-size:12px;
|
4241 |
float:left;
|
4242 |
width:100%;
|
4243 |
Result Bar
|
4244 |
..................................
|
4245 |
---------------------------------------------------------------------------
|
4246 |
EXTRAS
|
4247 |
---------------------------------------------------------------------------
|
4248 |
CAPTCHA
|
4249 |
..................................
|
4250 |
width:30px;
|
4251 |
float:left;
|
4252 |
margin-left:5px;
|
4253 |
height:0px;
|
4254 |
break;
|
4255 |
}
|
4256 |
case 'Orange v1':
|
4257 |
{ //Orange v1
|
4258 |
$css = <<<NOWDOC
|
4259 |
Main Container
|
4260 |
---------------------------------------------------------------------------
|
4261 |
background:#FB6911;
|
4262 |
box-sizing: border-box;
|
4263 |
display: inline-block;
|
4264 |
font-size: 14px;
|
4265 |
color:white;
|
4266 |
padding: 10px;
|
4267 |
width: %POLL-WIDTH%;
|
4268 |
zoom: 1;
|
4269 |
Error message
|
4270 |
..................................
|
4271 |
font-size:.8em;
|
4272 |
font-style:italic;
|
4273 |
color:red;
|
4274 |
text-transform:lowercase;
|
4275 |
text-align:center;
|
4276 |
Success message
|
4277 |
..................................
|
4278 |
font-size:.8em;
|
4279 |
font-style:italic;
|
4280 |
color:green;
|
4281 |
text-align:center;
|
4282 |
Poll Question
|
4283 |
---------------------------------------------------------------------------
|
4284 |
border: 0 none;
|
4285 |
margin: 0 0 2em;
|
4286 |
padding: .25em;
|
4287 |
text-align: center;
|
4288 |
font-size: 14px;
|
4289 |
Poll Options / Answers
|
4290 |
---------------------------------------------------------------------------
|
4291 |
list-style: none;
|
4292 |
margin: 0;
|
4293 |
padding: 0;
|
4294 |
list-style: none;
|
4295 |
margin: 0;
|
4296 |
padding: 0;
|
4297 |
font-size: 14px;
|
4298 |
line-height: 2em;
|
4299 |
Label
|
4300 |
..................................
|
4301 |
margin:0px;
|
4302 |
font-style:normal;
|
4303 |
font-weight:normal;
|
4304 |
font-size:14px;
|
4305 |
float:none;
|
4306 |
display:inline-block;
|
4307 |
Custom answer / Other
|
4308 |
..................................
|
4309 |
width: 100%;
|
4310 |
overflow: hidden;
|
4311 |
width: 94%;
|
4312 |
overflow: hidden;
|
4313 |
Custom checkbox and radio button style
|
4314 |
---------------------------------------------------------------------------
|
4315 |
Custom fields
|
4316 |
---------------------------------------------------------------------------
|
4317 |
clear: both;
|
4318 |
list-style: none;
|
4319 |
margin: 0;
|
4320 |
padding: 0;
|
4321 |
overflow: hidden;
|
4322 |
width: 100%;
|
4323 |
display: block;
|
4324 |
font-size:14px;
|
4325 |
list-style: none;
|
4326 |
display: block;
|
4327 |
width: 94%;
|
4328 |
Vote Button
|
4329 |
---------------------------------------------------------------------------
|
4330 |
cursor:pointer;
|
4331 |
display: block;
|
4332 |
font-size:14px;
|
4333 |
margin: 0 auto;
|
4334 |
}
|
4335 |
Results
|
4336 |
---------------------------------------------------------------------------
|
4337 |
font-size: 12px;
|
4338 |
font-style: italic;
|
4339 |
font-weight: normal;
|
4340 |
margin-left: 15px;
|
4341 |
color: #38595E;
|
4342 |
Style for results that are displayed on columns
|
4343 |
..................................
|
4344 |
float: left;
|
4345 |
display: inline-block;
|
4346 |
width: 46%;
|
4347 |
padding: 1%;
|
4348 |
margin: 1%;
|
4349 |
float: right;
|
4350 |
width: auto;
|
4351 |
color:#000;
|
4352 |
text-decoration:underline;
|
4353 |
font-size:12px;
|
4354 |
color:#000;
|
4355 |
text-decoration:underline;
|
4356 |
font-size:12px;
|
4357 |
color:#000;
|
4358 |
text-decoration:underline;
|
4359 |
font-size:12px;
|
4360 |
float:left;
|
4361 |
width:100%;
|
4362 |
Result Bar
|
4363 |
..................................
|
4364 |
---------------------------------------------------------------------------
|
4365 |
EXTRAS
|
4366 |
---------------------------------------------------------------------------
|
4367 |
CAPTCHA
|
4368 |
..................................
|
4369 |
width:30px;
|
4370 |
float:left;
|
4371 |
margin-left:5px;
|
4372 |
height:0px;
|
4373 |
break;
|
4374 |
}
|
4375 |
case 'Orange v2':
|
4376 |
{ //Orange v2
|
4377 |
$css = <<<NOWDOC
|
4378 |
Main Container
|
4379 |
---------------------------------------------------------------------------
|
4380 |
background:#fff;
|
4381 |
box-sizing: border-box;
|
4382 |
display: inline-block;
|
4383 |
font-size: 14px;
|
4384 |
color:#555;
|
4385 |
padding: 10px;
|
4386 |
width: %POLL-WIDTH%;
|
4387 |
zoom: 1;
|
4388 |
Error message
|
4389 |
..................................
|
4390 |
font-size:.8em;
|
4391 |
font-style:italic;
|
4392 |
color:red;
|
4393 |
text-transform:lowercase;
|
4394 |
text-align:center;
|
4395 |
Success message
|
4396 |
..................................
|
4397 |
font-size:.8em;
|
4398 |
font-style:italic;
|
4399 |
color:green;
|
4400 |
text-align:center;
|
4401 |
Poll Question
|
4402 |
---------------------------------------------------------------------------
|
4403 |
background:#FB6911;
|
4404 |
color:#fff;
|
4405 |
border: 0 none;
|
4406 |
margin: 0 0 2em;
|
4407 |
padding: .25em;
|
4408 |
text-align: center;
|
4409 |
font-size: 14px;
|
4410 |
Poll Options / Answers
|
4411 |
---------------------------------------------------------------------------
|
4412 |
list-style: none;
|
4413 |
margin: 0;
|
4414 |
padding: 0;
|
4415 |
list-style: none;
|
4416 |
margin: 0;
|
4417 |
padding: 0;
|
4418 |
font-size: 14px;
|
4419 |
line-height: 2em;
|
4420 |
Label
|
4421 |
..................................
|
4422 |
margin:0px;
|
4423 |
font-style:normal;
|
4424 |
font-weight:normal;
|
4425 |
font-size:14px;
|
4426 |
float:none;
|
4427 |
display:inline-block;
|
4428 |
Custom answer / Other
|
4429 |
..................................
|
4430 |
width: 100%;
|
4431 |
overflow: hidden;
|
4432 |
width: 94%;
|
4433 |
overflow: hidden;
|
4434 |
Custom checkbox and radio button style
|
4435 |
---------------------------------------------------------------------------
|
4436 |
Custom fields
|
4437 |
---------------------------------------------------------------------------
|
4438 |
clear: both;
|
4439 |
list-style: none;
|
4440 |
margin: 0;
|
4441 |
padding: 0;
|
4442 |
overflow: hidden;
|
4443 |
width: 100%;
|
4444 |
display: block;
|
4445 |
font-size:14px;
|
4446 |
list-style: none;
|
4447 |
display: block;
|
4448 |
width: 94%;
|
4449 |
Vote Button
|
4450 |
---------------------------------------------------------------------------
|
4451 |
cursor:pointer;
|
4452 |
display: block;
|
4453 |
font-size:14px;
|
4454 |
margin: 0 auto;
|
4455 |
}
|
4456 |
Results
|
4457 |
---------------------------------------------------------------------------
|
4458 |
font-size: 12px;
|
4459 |
font-style: italic;
|
4460 |
font-weight: normal;
|
4461 |
margin-left: 15px;
|
4462 |
color: #38595E;
|
4463 |
Style for results that are displayed on columns
|
4464 |
..................................
|
4465 |
float: left;
|
4466 |
display: inline-block;
|
4467 |
width: 46%;
|
4468 |
padding: 1%;
|
4469 |
margin: 1%;
|
4470 |
float: right;
|
4471 |
width: auto;
|
4472 |
color:#000;
|
4473 |
text-decoration:underline;
|
4474 |
font-size:12px;
|
4475 |
color:#000;
|
4476 |
text-decoration:underline;
|
4477 |
font-size:12px;
|
4478 |
color:#000;
|
4479 |
text-decoration:underline;
|
4480 |
font-size:12px;
|
4481 |
float:left;
|
4482 |
width:100%;
|
4483 |
Result Bar
|
4484 |
..................................
|
4485 |
---------------------------------------------------------------------------
|
4486 |
EXTRAS
|
4487 |
---------------------------------------------------------------------------
|
4488 |
CAPTCHA
|
4489 |
..................................
|
4490 |
width:30px;
|
4491 |
float:left;
|
4492 |
margin-left:5px;
|
4493 |
height:0px;
|
4494 |
break;
|
4495 |
}
|
4496 |
case 'Orange v3':
|
4497 |
{ //Orange v3
|
4498 |
$css = <<<NOWDOC
|
4499 |
Main Container
|
4500 |
---------------------------------------------------------------------------
|
4501 |
background:#fff;
|
4502 |
box-sizing: border-box;
|
4503 |
display: inline-block;
|
4504 |
font-size: 14px;
|
4505 |
color:#555;
|
4506 |
padding: 10px;
|
4507 |
width: %POLL-WIDTH%;
|
4508 |
zoom: 1;
|
4509 |
border:5px solid #FB6911;
|
4510 |
Error message
|
4511 |
..................................
|
4512 |
font-size:.8em;
|
4513 |
font-style:italic;
|
4514 |
color:red;
|
4515 |
text-transform:lowercase;
|
4516 |
text-align:center;
|
4517 |
Success message
|
4518 |
..................................
|
4519 |
font-size:.8em;
|
4520 |
font-style:italic;
|
4521 |
color:green;
|
4522 |
text-align:center;
|
4523 |
Poll Question
|
4524 |
---------------------------------------------------------------------------
|
4525 |
border: 0 none;
|
4526 |
margin: 0 0 2em;
|
4527 |
padding: .25em;
|
4528 |
text-align: center;
|
4529 |
font-size: 14px;
|
4530 |
Poll Options / Answers
|
4531 |
---------------------------------------------------------------------------
|
4532 |
list-style: none;
|
4533 |
margin: 0;
|
4534 |
padding: 0;
|
4535 |
list-style: none;
|
4536 |
margin: 0;
|
4537 |
padding: 0;
|
4538 |
font-size: 14px;
|
4539 |
line-height: 2em;
|
4540 |
Label
|
4541 |
..................................
|
4542 |
margin:0px;
|
4543 |
font-style:normal;
|
4544 |
font-weight:normal;
|
4545 |
font-size:14px;
|
4546 |
float:none;
|
4547 |
display:inline-block;
|
4548 |
Custom answer / Other
|
4549 |
..................................
|
4550 |
width: 100%;
|
4551 |
overflow: hidden;
|
4552 |
width: 94%;
|
4553 |
overflow: hidden;
|
4554 |
Custom checkbox and radio button style
|
4555 |
---------------------------------------------------------------------------
|
4556 |
Custom fields
|
4557 |
---------------------------------------------------------------------------
|
4558 |
clear: both;
|
4559 |
list-style: none;
|
4560 |
margin: 0;
|
4561 |
padding: 0;
|
4562 |
overflow: hidden;
|
4563 |
width: 100%;
|
4564 |
display: block;
|
4565 |
font-size:14px;
|
4566 |
list-style: none;
|
4567 |
display: block;
|
4568 |
width: 94%;
|
4569 |
Vote Button
|
4570 |
---------------------------------------------------------------------------
|
4571 |
cursor:pointer;
|
4572 |
display: block;
|
4573 |
font-size:14px;
|
4574 |
margin: 0 auto;
|
4575 |
}
|
4576 |
Results
|
4577 |
---------------------------------------------------------------------------
|
4578 |
font-size: 12px;
|
4579 |
font-style: italic;
|
4580 |
font-weight: normal;
|
4581 |
margin-left: 15px;
|
4582 |
color: #38595E;
|
4583 |
Style for results that are displayed on columns
|
4584 |
..................................
|
4585 |
float: left;
|
4586 |
display: inline-block;
|
4587 |
width: 46%;
|
4588 |
padding: 1%;
|
4589 |
margin: 1%;
|
4590 |
float: right;
|
4591 |
width: auto;
|
4592 |
color:#000;
|
4593 |
text-decoration:underline;
|
4594 |
font-size:12px;
|
4595 |
color:#000;
|
4596 |
text-decoration:underline;
|
4597 |
font-size:12px;
|
4598 |
color:#000;
|
4599 |
text-decoration:underline;
|
4600 |
font-size:12px;
|
4601 |
float:left;
|
4602 |
width:100%;
|
4603 |
Result Bar
|
4604 |
..................................
|
4605 |
---------------------------------------------------------------------------
|
4606 |
EXTRAS
|
4607 |
---------------------------------------------------------------------------
|
4608 |
CAPTCHA
|
4609 |
..................................
|
4610 |
width:30px;
|
4611 |
float:left;
|
4612 |
margin-left:5px;
|
4613 |
height:0px;
|
4614 |
break;
|
4615 |
}
|
4616 |
}
|
4617 |
$css.= "#yop-poll-container-%POLL-ID% img {
|
4618 |
max-width: %POLL-WIDTH%;
|
4619 |
$css = addslashes($css);
|
4620 |
$before_vote_template = addslashes( $before_vote_template );
|
4621 |
$sql .= "`before_vote_template` = '{$before_vote_template}',
|
4622 |
$sql .= $wpdb->prepare( ' WHERE name = %s', $template_to_reset );
|
4623 |
return $wpdb->query( $sql );
|
4624 |
}
|
4625 |
return 'html';
|
|
|
1 |
private static $_instance = NULL;
|
2 |
protected function __construct() {
|
3 |
parent::__construct( 'templates' );
|
4 |
}
|
5 |
public static function get_instance() {
|
6 |
if ( self::$_instance == NULL ){
|
7 |
$class = __CLASS__;
|
8 |
self::$_instance = new $class;
|
9 |
}
|
10 |
return self::$_instance;
|
11 |
}
|
12 |
public function manage_templates() {
|
13 |
switch ( $GLOBALS['page'] ) {
|
14 |
default:
|
15 |
$this->manage_options();
|
16 |
break;
|
17 |
}
|
18 |
}
|
19 |
public function admin_loader() {
|
20 |
$this->wp_ajax_action( 'yop_poll_add_new_template_config' );
|
21 |
}
|
22 |
public function manage_load_templates() {
|
23 |
wp_enqueue_script( 'yop-poll-admin-templates-js', YOP_POLL_URL . "js/yop-poll-admin-templates.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
24 |
wp_enqueue_style( 'yop-poll-timepicker', YOP_POLL_URL . "css/timepicker.css", array(), YOP_POLL_VERSION );
|
25 |
wp_enqueue_style( 'yop-poll-jquery-ui', YOP_POLL_URL . "css/jquery-ui.css", array(), YOP_POLL_VERSION );
|
26 |
}
|
27 |
public function id_used_template($id){
|
28 |
global $wpdb;
|
29 |
$results = $wpdb->get_results( $wpdb->prepare( "
|
30 |
foreach($results as $result){
|
31 |
$meta=unserialize($result->meta_value);
|
32 |
// yop_poll_dump($result );
|
33 |
if($meta['template']==$id||$meta['widget']==$id){
|
34 |
return false;
|
35 |
}
|
36 |
}
|
37 |
return true;
|
38 |
}
|
39 |
private function manage_options() {
|
40 |
global $page, $action, $message;
|
41 |
switch ( $action ) {
|
42 |
case "after-buy":
|
43 |
YOP_POLL_Pro_Admin::after_buy();
|
44 |
break;
|
45 |
case "do-buy":
|
46 |
YOP_POLL_Pro_Admin::do_buy();
|
47 |
break;
|
48 |
case 'add-new-template':
|
49 |
{
|
50 |
self:: view_add_edit_templates( 'add-new' );
|
51 |
break;
|
52 |
}
|
53 |
case 'delete':
|
54 |
{
|
55 |
$message = $this->delete_templates( $_GET );
|
56 |
$this->view_templates();
|
57 |
break;
|
58 |
}
|
59 |
case 'clone':
|
60 |
{
|
61 |
$message = $this->clone_templates( $_POST );
|
62 |
$this->view_templates();
|
63 |
break;
|
64 |
}
|
65 |
case 'edit':
|
66 |
{
|
67 |
self:: view_add_edit_templates( 'edit' );
|
68 |
break;
|
69 |
}
|
70 |
default: {
|
71 |
$this->view_templates();
|
72 |
break;
|
73 |
}
|
74 |
}
|
75 |
}
|
76 |
public function view_templates() {
|
77 |
wp_enqueue_script( 'yop-poll-admin-js', YOP_POLL_URL . '/js/polls/yop-poll-admin.js', array(
|
78 |
'jquery',
|
79 |
'jquery-ui-datepicker'
|
80 |
), YOP_POLL_VERSION, true );
|
81 |
wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
|
82 |
wp_enqueue_script( 'yop-poll-slider-js', YOP_POLL_URL . 'js/yop-poll-slider.js', array(
|
83 |
'jquery',
|
84 |
'jquery-ui-dialog'
|
85 |
), YOP_POLL_VERSION, true );
|
86 |
global $wpdb, $message;
|
87 |
global $page, $action, $orderby, $order, $current_user;
|
88 |
$orderby = ( empty ( $GLOBALS['orderby'] ) ) ? 'name' : $GLOBALS['orderby'];
|
89 |
$order = ( empty ( $GLOBALS['order'] ) ) ? 'desc' : $GLOBALS['order'];
|
90 |
$data['per_page'] = ( isset ( $_REQUEST ['per_page'] ) ? intval( $_REQUEST ['per_page'] ) : 100 );
|
91 |
$data['page_no'] = isset ( $_REQUEST ['page_no'] ) ? ( int )$_REQUEST ['page_no'] : 1;
|
92 |
$order_fields = array( 'name', 'last_modified' );
|
93 |
$data['title'] = __yop_poll( "Templates" );
|
94 |
$data['REQUEST'] = $_REQUEST;
|
95 |
$data['poll_url'] =YOP_POLL_URL;
|
96 |
$data['orderby'] = ( empty ( $data['REQUEST']['orderby'] ) ) ? 'name' : $data['REQUEST']['orderby'];
|
97 |
$data['order'] = ( empty ( $data['REQUEST']['order'] ) ) ? 'desc' : $data['REQUEST']['order'];
|
98 |
$data['order_direction'] = $this->make_order_array( $order_fields, 'asc', $orderby, ( 'desc' == $order ) ? 'asc' : 'desc' );
|
99 |
$data['order_sortable'] = $this->make_order_array( $order_fields, 'sortable', $orderby, 'sorted' );
|
100 |
$data['order_direction_reverse'] = $this->make_order_array( $order_fields, 'desc', $orderby, ( 'desc' == $order ) ? 'desc' : 'asc' );
|
101 |
$data['search'] = array( 'fields' => array( 'name', 'last_modified' ), 'value' => isset ( $_REQUEST['s'] ) ? $_REQUEST ['s'] : '' );
|
102 |
$data['yop_poll_templates'] = Yop_Poll_Model::get_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'], $data['page_no'] - 1, $data['per_page'] );
|
103 |
$data['total_templates'] = self::count_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'] );
|
104 |
$data['message'] = array( 'error' => $message['error'], 'succes' => $message['success'] );
|
105 |
$data['templates'] = YOP_POLL_MODEL::get_yop_poll_templates_search( 'id', 'desc' );
|
106 |
$n = count( $data['templates'] );
|
107 |
for( $i = 0; $i < $n; $i ++ ) {
|
108 |
$data['templates'][$i]['preview'] = YOP_POLL_Poll_Model::return_template_preview_html( $data['templates'][$i]['id'] );
|
109 |
}
|
110 |
if ( intval( $data['page_no'] ) > intval( $data['total_templates'] ) ){
|
111 |
$data['page_no'] = 1;
|
112 |
}
|
113 |
$args = array(
|
114 |
'base' => remove_query_arg(
|
115 |
'page_no',
|
116 |
$_SERVER ['REQUEST_URI'] ) . '%_%',
|
117 |
'format' => '&page_no=%#%',
|
118 |
'current' => max( 1, $data['page_no'] ),
|
119 |
'total' => ceil( $data['total_templates'] / $data['per_page'] ),
|
120 |
'prev_next' => true,
|
121 |
'prev_text' => __( '«' ),
|
122 |
'next_text' => __( '»' )
|
123 |
);
|
124 |
$data['pagination'] = paginate_links( $args );
|
125 |
$_SERVER ['REQUEST_URI'] = remove_query_arg( array( 'action' ), $_SERVER ['REQUEST_URI'] );
|
126 |
$data['request']['uri'] = $_SERVER["REQUEST_URI"];
|
127 |
$this->display( 'templates.html', $data );
|
128 |
}
|
129 |
private function view_add_edit_templates( $act ) {
|
130 |
global $action, $current_user;
|
131 |
add_filter( 'wp_default_editor', 'force_default_editor' );
|
132 |
$data['title'] = __yop_poll( "Templates" );
|
133 |
$data['page_name'] = __yop_poll( "Add New Poll Template" );
|
134 |
$data['action_type'] = $action;
|
135 |
$data['template_id'] = '';
|
136 |
if ( 'edit' == $data['action_type'] ){
|
137 |
$data['template_id'] = ( isset ( $_GET ['id'] ) ? intval( $_GET ['id'] ) : 0 );
|
138 |
}
|
139 |
$data['current_template'] = self::get_poll_template_from_database_by_id( $data['template_id'] );
|
140 |
$data['template_author_name'] = self::get_poll_template_field_from_database_by_id( 1 );
|
141 |
$this->display( 'templates_add_edit.html', $data );
|
142 |
}
|
143 |
public static function count_yop_poll_templates_search( $orderby = 'last_modified', $order = 'desc', $search = array( 'fields' => array(), 'value' => NULL ) ) {
|
144 |
global $wpdb;
|
145 |
$sql = "SELECT COUNT(*) AS templates_no FROM " . $wpdb->yop_poll_templates;
|
146 |
$sql_search = '';
|
147 |
if ( count( $search['fields'] ) > 0 ){
|
148 |
$sql_search .= ' ( ';
|
149 |
foreach ( $search['fields'] as $field ) {
|
150 |
$sql_search .= $wpdb->prepare( ' `' . $field . '` like \'%%%s%%\' OR', $search['value'] );
|
151 |
}
|
152 |
$sql_search = trim( $sql_search, 'OR' );
|
153 |
$sql_search .= ' ) ';
|
154 |
}
|
155 |
if ( count( $search['fields'] ) > 0 ){
|
156 |
$sql .= ' WHERE ' . $sql_search;
|
157 |
}
|
158 |
$sql .= ' ORDER BY ' . $orderby . ' ' . $order;
|
159 |
$result = $wpdb->get_var( $sql );
|
160 |
return $result;
|
161 |
}
|
162 |
private function delete_templates( $request ) {
|
163 |
global $message;
|
164 |
$message['success'] = "";
|
165 |
$message['error'] = "";
|
166 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
167 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
168 |
foreach ( $bulktemplates as $template_id ) {
|
169 |
$template_id = ( int )$template_id;
|
170 |
$message = self::delete_template_from_db( $template_id );
|
171 |
}
|
172 |
return $message;
|
173 |
}
|
174 |
else {
|
175 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
176 |
if ( isset ( $_REQUEST ['id'] ) ){
|
177 |
if(self::id_used_template( $_REQUEST ['id'])){
|
178 |
self::delete_template_from_db( $_REQUEST['id'] );
|
179 |
}
|
180 |
else $message['error']='This template is used to display a poll';
|
181 |
}
|
182 |
}
|
183 |
else {
|
184 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
185 |
}
|
186 |
}
|
187 |
return $message;
|
188 |
}
|
189 |
private function delete_template_from_db( $template_id ) {
|
190 |
global $wpdb;
|
191 |
$response['success'] = "";
|
192 |
$response['error'] = "";
|
193 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
194 |
if ( current_user_can( 'delete_own_yop_polls_templates' ) ){
|
195 |
$sql = $wpdb->query( $wpdb->prepare( "
|
196 |
$template_id ) );
|
197 |
if ( $sql ){
|
198 |
$response['success'] = __yop_poll( 'Template deleted' );
|
199 |
}
|
200 |
else {
|
201 |
$response['error'] = __yop_poll( 'Could not delete template from database! Please try again!' );
|
202 |
}
|
203 |
}
|
204 |
else {
|
205 |
$response['error'] = __yop_poll( 'You do not have enough permission to delete a template' );
|
206 |
}
|
207 |
return $response;
|
208 |
}
|
209 |
else {
|
210 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
211 |
}
|
212 |
}
|
213 |
private function clone_templates( $request ) {
|
214 |
global $message;
|
215 |
$message['success'] = "";
|
216 |
$message['error'] = "";
|
217 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
218 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
219 |
foreach ( $bulktemplates as $template_id ) {
|
220 |
$template_details = self::get_poll_template_from_database_by_id( $template_id );
|
221 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
222 |
if ( $template_details ){
|
223 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
224 |
$message = self::insert_poll_template_to_database( $template );
|
225 |
}
|
226 |
}
|
227 |
$this->view_templates();
|
228 |
}
|
229 |
else {
|
230 |
if ( isset ( $_REQUEST ['id'] ) ){
|
231 |
$template_details = self::get_poll_template_from_database_by_id( $_REQUEST ['id'] );
|
232 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
233 |
if ( $template_details ){
|
234 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
235 |
return self::insert_poll_template_to_database( $template );
|
236 |
}
|
237 |
}
|
238 |
$this->view_templates();
|
239 |
}
|
240 |
$this->view_templates();
|
241 |
}
|
242 |
private static function get_poll_template_from_database_by_id( $template_id = 0 ) {
|
243 |
global $wpdb;
|
244 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
245 |
return $result;
|
246 |
}
|
247 |
private static function count_poll_template_from_database_like_name( $template_name ) {
|
248 |
global $wpdb;
|
249 |
$result = $wpdb->get_var( $wpdb->prepare( "
|
250 |
return $result;
|
251 |
}
|
252 |
private static function insert_poll_template_to_database( $template ) {
|
253 |
$response['success'] = "";
|
254 |
$response['error'] = "";
|
255 |
global $wpdb;
|
256 |
global $current_user;
|
257 |
wp_get_current_user();
|
258 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
259 |
if ( current_user_can( 'clone_own_yop_polls_templates' ) ){
|
260 |
$sql = $wpdb->query( $wpdb->prepare( "
|
261 |
if ( $sql ){
|
262 |
$response['success'] = __yop_poll( 'Template cloned!' );
|
263 |
}
|
264 |
else {
|
265 |
$response['error'] = __yop_poll( 'Could not clone template from database! Please try again!' );
|
266 |
}
|
267 |
}
|
268 |
else {
|
269 |
$response['error'] = __yop_poll( 'You do not have enough permission to clone a template' );
|
270 |
}
|
271 |
return $response;
|
272 |
}
|
273 |
else {
|
274 |
wp_die( __yop_poll( 'You do not have enough permission to add a template' ) );
|
275 |
}
|
276 |
}
|
277 |
public function do_add_edit_template() {
|
278 |
if ( 'add-new' == $_POST['action'] ){
|
279 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
280 |
wp_die( __yop_poll( 'You are not allowed to edit this item.' ) );
|
281 |
}
|
282 |
}
|
283 |
self::save_template();
|
284 |
}
|
285 |
public function do_reset_template() {
|
286 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
287 |
wp_die( __yop_poll( 'You are not allowed to reset this item.' ) );
|
288 |
}
|
289 |
self::reset_template();
|
290 |
}
|
291 |
private static function reset_template() {
|
292 |
$template['name'] = $_POST['yop_poll_template_name'];
|
293 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
294 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
295 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
296 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
297 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
298 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
299 |
$template['status'] = "other";
|
300 |
$template['id'] = $_POST['template_id'];
|
301 |
$data['action'] = $_POST['action'];
|
302 |
$data['name'] = $_POST['yop_poll_reset_template_id'];
|
303 |
$result = self::add_update_templates_in_database( $data['action'], $data['name'], $template['name'] );
|
304 |
if ( $result ){
|
305 |
wp_die( __yop_poll( 'Template reseted!' ) );
|
306 |
}
|
307 |
else {
|
308 |
wp_die( __yop_poll( 'Could not resete template in database! Please try again!' ) );
|
309 |
}
|
310 |
}
|
311 |
private static function save_template() {
|
312 |
$template['name'] = $_POST['yop_poll_template_name'];
|
313 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
314 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
315 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
316 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
317 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
318 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
319 |
$template['status'] = "other";
|
320 |
$template['id'] = $_POST['template_id'];
|
321 |
if ( $_POST['action_type'] == "add-new-template" ){
|
322 |
if ( $template['name'] != "" ){
|
323 |
$result = self::get_poll_template_from_database_by_name( $template['name'] );
|
324 |
if ( $result ){
|
325 |
wp_die( __yop_poll( 'This template already exists! Please choose another name!' ) );
|
326 |
}
|
327 |
}
|
328 |
else {
|
329 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
330 |
}
|
331 |
$result = self:: insert_poll_template_to_database( $template );
|
332 |
if ( $result ){
|
333 |
wp_die( __yop_poll( 'Template added!' ) );
|
334 |
}
|
335 |
else {
|
336 |
wp_die( __yop_poll( 'Could not add template in database! Please try again!' ) );
|
337 |
}
|
338 |
}
|
339 |
else {
|
340 |
if ( $_POST['action_type'] == "edit" ){
|
341 |
if ( $template['name'] == "" ){
|
342 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
343 |
}
|
344 |
else {
|
345 |
$result = self:: update_poll_template_in_database( $template );
|
346 |
if ( $result ){
|
347 |
wp_die( __yop_poll( 'Template edited!' ) );
|
348 |
}
|
349 |
else {
|
350 |
wp_die( __yop_poll( 'Could not edit template in database! Please try again!' ) );
|
351 |
}
|
352 |
}
|
353 |
}
|
354 |
}
|
355 |
}
|
356 |
private static function get_poll_template_field_from_database_by_id( $template_id ) {
|
357 |
global $wpdb;
|
358 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
359 |
return $result;
|
360 |
}
|
361 |
private static function get_poll_template_from_database_by_name( $template_name ) {
|
362 |
global $wpdb;
|
363 |
$sql = $wpdb->query( $wpdb->prepare( "
|
364 |
return $sql;
|
365 |
}
|
366 |
private static function update_poll_template_in_database( $template ) {
|
367 |
global $wpdb;
|
368 |
$sql = $wpdb->query( $wpdb->prepare( "
|
369 |
return $sql;
|
370 |
}
|
371 |
private static function add_update_templates_in_database( $action = 'add', $template_name, $template_to_reset ) {
|
372 |
global $wpdb;
|
373 |
global $current_user;
|
374 |
wp_get_current_user();
|
375 |
$sql = "UPDATE `" . $wpdb->yop_poll_templates . "` SET ";
|
376 |
$before_vote_template = <<<NOWDOC
|
377 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
378 |
[ANSWER_DESCRIPTION_CONTAINER]
|
379 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
380 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
381 |
[ANSWER_RESULT_CONTAINER]
|
382 |
[/ANSWER_RESULT_CONTAINER]
|
383 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
384 |
$after_vote_template = <<<NOWDOC
|
385 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
386 |
[ANSWER_DESCRIPTION_CONTAINER]
|
387 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
388 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
389 |
class = "pds-feedback-result-%POLL-ID%">
|
390 |
<div>
|
391 |
%POLL-ANSWER-RESULT-BAR%
|
392 |
</div>
|
393 |
$after_vote_template = addslashes( $after_vote_template );
|
394 |
$before_start_date_template = <<<NOWDOC
|
395 |
start on %POLL-START-DATE%<br>
|
396 |
$before_start_date_template = addslashes( $before_start_date_template );
|
397 |
$after_end_date_template = <<<NOWDOC
|
398 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
399 |
[ANSWER_DESCRIPTION_CONTAINER]
|
400 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
401 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
402 |
class = "pds-feedback-result-%POLL-ID%">
|
403 |
<div>
|
404 |
%POLL-ANSWER-RESULT-BAR%
|
405 |
</div>
|
406 |
$after_end_date_template = addslashes( $after_end_date_template );
|
407 |
$js = <<<NOWDOC
|
408 |
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
409 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
410 |
var quest=0;
|
411 |
if ( findWidest ) {
|
412 |
obj.each(function() {
|
413 |
var thisWidth = jQuery(this).width();
|
414 |
width = parseInt(thisWidth / cols);
|
415 |
jQuery(this).width(width);
|
416 |
jQuery(this).css("float", "left");
|
417 |
});
|
418 |
}
|
419 |
else {
|
420 |
var widest = 0;
|
421 |
var count = 0;
|
422 |
var poz_each_question=0;
|
423 |
obj.each(function() {
|
424 |
count++;
|
425 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
426 |
var thisWidth = jQuery(this).width();
|
427 |
if(thisWidth > widest) {
|
428 |
widest = thisWidth;
|
429 |
}
|
430 |
if(count<cols[quest][2])
|
431 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
432 |
if(cols[quest][0]==1)
|
433 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("width","100%");
|
434 |
else
|
435 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
436 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
437 |
}
|
438 |
else
|
439 |
{
|
440 |
count=0;
|
441 |
width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
442 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
443 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
444 |
quest++;
|
445 |
}
|
446 |
});
|
447 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
448 |
var quest=0;
|
449 |
if ( findWidest ) {
|
450 |
obj.each(function() {
|
451 |
var thisWidth = jQuery(this).width();
|
452 |
width = parseInt(thisWidth / cols);
|
453 |
jQuery(this).width(width);
|
454 |
jQuery(this).css("float", "left");
|
455 |
});
|
456 |
}
|
457 |
else {
|
458 |
var widest = 0;
|
459 |
var count = 0;
|
460 |
var poz_each_question=0;
|
461 |
obj.each(function() {
|
462 |
count++;
|
463 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
464 |
var thisWidth = jQuery(this).width();
|
465 |
if(thisWidth > widest) {
|
466 |
widest = thisWidth;
|
467 |
}
|
468 |
if(count<cols[quest][2])
|
469 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
470 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
471 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
472 |
}
|
473 |
else
|
474 |
{
|
475 |
count=0;
|
476 |
width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
477 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
478 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
479 |
quest++;
|
480 |
}
|
481 |
});
|
482 |
$js = addslashes( $js );
|
483 |
$css = "";
|
484 |
switch( $template_name ) {
|
485 |
case 'White':
|
486 |
{ //White
|
487 |
$css = <<<NOWDOC
|
488 |
Main Container
|
489 |
---------------------------------------------------------------------------
|
490 |
border:1px solid #000000;
|
491 |
color:#000000;
|
492 |
color:#000000;
|
493 |
background:#fff;
|
494 |
box-sizing: border-box;
|
495 |
color: #555;
|
496 |
display: inline-block;
|
497 |
font-size: 14px;
|
498 |
padding: 10px;
|
499 |
width: %POLL-WIDTH%;
|
500 |
zoom: 1;
|
501 |
Error message
|
502 |
..................................
|
503 |
font-size:.8em;
|
504 |
font-style:italic;
|
505 |
color:red;
|
506 |
text-transform:lowercase;
|
507 |
text-align:center;
|
508 |
Success message
|
509 |
..................................
|
510 |
font-size:.8em;
|
511 |
font-style:italic;
|
512 |
color:green;
|
513 |
text-align:center;
|
514 |
Poll Question
|
515 |
---------------------------------------------------------------------------
|
516 |
border: 0 none;
|
517 |
margin: 0 0 2em;
|
518 |
padding: .25em;
|
519 |
text-align: center;
|
520 |
font-size: 14px;
|
521 |
Poll Options / Answers
|
522 |
---------------------------------------------------------------------------
|
523 |
list-style: none;
|
524 |
margin: 0;
|
525 |
padding: 0;
|
526 |
list-style: none;
|
527 |
margin: 0;
|
528 |
padding: 0;
|
529 |
font-size: 14px;
|
530 |
line-height: 2em;
|
531 |
Label
|
532 |
..................................
|
533 |
margin:0px;
|
534 |
font-style:normal;
|
535 |
font-weight:normal;
|
536 |
font-size:14px;
|
537 |
float:none;
|
538 |
display:inline-block;
|
539 |
Custom answer / Other
|
540 |
..................................
|
541 |
width: 100%;
|
542 |
overflow: hidden;
|
543 |
width: 94%;
|
544 |
overflow: hidden;
|
545 |
Custom checkbox and radio button style
|
546 |
---------------------------------------------------------------------------
|
547 |
Custom fields
|
548 |
---------------------------------------------------------------------------
|
549 |
clear: both;
|
550 |
list-style: none;
|
551 |
margin: 0;
|
552 |
padding: 0;
|
553 |
overflow: hidden;
|
554 |
width: 100%;
|
555 |
display: block;
|
556 |
font-size:14px;
|
557 |
list-style: none;
|
558 |
display: block;
|
559 |
width: 94%;
|
560 |
Vote Button
|
561 |
---------------------------------------------------------------------------
|
562 |
cursor:pointer;
|
563 |
display: block;
|
564 |
font-size:14px;
|
565 |
margin: 0 auto;
|
566 |
}
|
567 |
Results
|
568 |
---------------------------------------------------------------------------
|
569 |
font-size: 12px;
|
570 |
font-style: italic;
|
571 |
font-weight: normal;
|
572 |
margin-left: 15px;
|
573 |
color: #38595E;
|
574 |
Style for results that are displayed on columns
|
575 |
..................................
|
576 |
float: left;
|
577 |
display: inline-block;
|
578 |
width: 100%;
|
579 |
padding: 1%;
|
580 |
margin: 1%;
|
581 |
float: right;
|
582 |
width: auto;
|
583 |
color:#000;
|
584 |
text-decoration:underline;
|
585 |
font-size:12px;
|
586 |
color:#000;
|
587 |
text-decoration:underline;
|
588 |
font-size:12px;
|
589 |
color:#000;
|
590 |
text-decoration:underline;
|
591 |
font-size:12px;
|
592 |
float:left;
|
593 |
width:100%;
|
594 |
Result Bar
|
595 |
..................................
|
596 |
---------------------------------------------------------------------------
|
597 |
EXTRAS
|
598 |
---------------------------------------------------------------------------
|
599 |
CAPTCHA
|
600 |
..................................
|
601 |
width:30px;
|
602 |
float:left;
|
603 |
margin-left:5px;
|
604 |
height:0px;
|
605 |
break;
|
606 |
}
|
607 |
case 'Grey':
|
608 |
{ //Grey
|
609 |
$css = <<<NOWDOC
|
610 |
Main Container
|
611 |
---------------------------------------------------------------------------
|
612 |
border:1px solid #000000;
|
613 |
color:#000000;
|
614 |
color:#000000;
|
615 |
background:#eee;
|
616 |
box-sizing: border-box;
|
617 |
color: #fff;
|
618 |
display: inline-block;
|
619 |
font-size: 14px;
|
620 |
color:#000;
|
621 |
padding: 10px;
|
622 |
width: %POLL-WIDTH%;
|
623 |
zoom: 1;
|
624 |
Error message
|
625 |
..................................
|
626 |
font-size:.8em;
|
627 |
font-style:italic;
|
628 |
color:red;
|
629 |
text-transform:lowercase;
|
630 |
text-align:center;
|
631 |
Success message
|
632 |
..................................
|
633 |
font-size:.8em;
|
634 |
font-style:italic;
|
635 |
color:green;
|
636 |
text-align:center;
|
637 |
Poll Question
|
638 |
---------------------------------------------------------------------------
|
639 |
border: 0 none;
|
640 |
margin: 0 0 2em;
|
641 |
padding: .25em;
|
642 |
text-align: center;
|
643 |
font-size: 14px;
|
644 |
Poll Options / Answers
|
645 |
---------------------------------------------------------------------------
|
646 |
list-style: none;
|
647 |
margin: 0;
|
648 |
padding: 0;
|
649 |
list-style: none;
|
650 |
margin: 0;
|
651 |
padding: 0;
|
652 |
font-size: 14px;
|
653 |
line-height: 2em;
|
654 |
Label
|
655 |
..................................
|
656 |
margin:0px;
|
657 |
font-style:normal;
|
658 |
font-weight:normal;
|
659 |
font-size:14px;
|
660 |
float:none;
|
661 |
display:inline-block;
|
662 |
Custom answer / Other
|
663 |
..................................
|
664 |
width: 100%;
|
665 |
overflow: hidden;
|
666 |
width: 94%;
|
667 |
overflow: hidden;
|
668 |
Custom checkbox and radio button style
|
669 |
---------------------------------------------------------------------------
|
670 |
Custom fields
|
671 |
---------------------------------------------------------------------------
|
672 |
clear: both;
|
673 |
list-style: none;
|
674 |
margin: 0;
|
675 |
padding: 0;
|
676 |
overflow: hidden;
|
677 |
width: 100%;
|
678 |
display: block;
|
679 |
font-size:14px;
|
680 |
list-style: none;
|
681 |
display: block;
|
682 |
width: 94%;
|
683 |
Vote Button
|
684 |
---------------------------------------------------------------------------
|
685 |
cursor:pointer;
|
686 |
display: block;
|
687 |
font-size:14px;
|
688 |
margin: 0 auto;
|
689 |
}
|
690 |
Results
|
691 |
---------------------------------------------------------------------------
|
692 |
font-size: 12px;
|
693 |
font-style: italic;
|
694 |
font-weight: normal;
|
695 |
margin-left: 15px;
|
696 |
color: #38595E;
|
697 |
Style for results that are displayed on columns
|
698 |
..................................
|
699 |
float: left;
|
700 |
display: inline-block;
|
701 |
width: 100%;
|
702 |
padding: 1%;
|
703 |
margin: 1%;
|
704 |
float: right;
|
705 |
width: auto;
|
706 |
color:#000;
|
707 |
text-decoration:underline;
|
708 |
font-size:12px;
|
709 |
color:#000;
|
710 |
text-decoration:underline;
|
711 |
font-size:12px;
|
712 |
color:#000;
|
713 |
text-decoration:underline;
|
714 |
font-size:12px;
|
715 |
float:left;
|
716 |
width:100%;
|
717 |
Result Bar
|
718 |
..................................
|
719 |
---------------------------------------------------------------------------
|
720 |
EXTRAS
|
721 |
---------------------------------------------------------------------------
|
722 |
CAPTCHA
|
723 |
..................................
|
724 |
width:30px;
|
725 |
float:left;
|
726 |
margin-left:5px;
|
727 |
height:0px;
|
728 |
break;
|
729 |
}
|
730 |
case 'Dark':
|
731 |
{ //Dark
|
732 |
$css = <<<NOWDOC
|
733 |
Main Container
|
734 |
---------------------------------------------------------------------------
|
735 |
color:#000000;
|
736 |
color:#000000;
|
737 |
background:#555;
|
738 |
box-sizing: border-box;
|
739 |
color: #fff;
|
740 |
display: inline-block;
|
741 |
font-size: 14px;
|
742 |
padding: 10px;
|
743 |
width: %POLL-WIDTH%;
|
744 |
zoom: 1;
|
745 |
Error message
|
746 |
..................................
|
747 |
font-size:.8em;
|
748 |
font-style:italic;
|
749 |
color:red;
|
750 |
text-transform:lowercase;
|
751 |
text-align:center;
|
752 |
Success message
|
753 |
..................................
|
754 |
font-size:.8em;
|
755 |
font-style:italic;
|
756 |
color:green;
|
757 |
text-align:center;
|
758 |
Poll Question
|
759 |
---------------------------------------------------------------------------
|
760 |
border: 0 none;
|
761 |
margin: 0 0 2em;
|
762 |
padding: .25em;
|
763 |
text-align: center;
|
764 |
font-size: 14px;
|
765 |
Poll Options / Answers
|
766 |
---------------------------------------------------------------------------
|
767 |
list-style: none;
|
768 |
margin: 0;
|
769 |
padding: 0;
|
770 |
list-style: none;
|
771 |
margin: 0;
|
772 |
padding: 0;
|
773 |
font-size: 14px;
|
774 |
line-height: 2em;
|
775 |
Label
|
776 |
..................................
|
777 |
margin:0px;
|
778 |
font-style:normal;
|
779 |
font-weight:normal;
|
780 |
font-size:14px;
|
781 |
float:none;
|
782 |
display:inline-block;
|
783 |
Custom answer / Other
|
784 |
..................................
|
785 |
width: 100%;
|
786 |
overflow: hidden;
|
787 |
width: 94%;
|
788 |
overflow: hidden;
|
789 |
Custom checkbox and radio button style
|
790 |
---------------------------------------------------------------------------
|
791 |
Custom fields
|
792 |
---------------------------------------------------------------------------
|
793 |
clear: both;
|
794 |
list-style: none;
|
795 |
margin: 0;
|
796 |
padding: 0;
|
797 |
overflow: hidden;
|
798 |
width: 100%;
|
799 |
display: block;
|
800 |
font-size:14px;
|
801 |
list-style: none;
|
802 |
display: block;
|
803 |
width: 94%;
|
804 |
Vote Button
|
805 |
---------------------------------------------------------------------------
|
806 |
cursor:pointer;
|
807 |
display: block;
|
808 |
font-size:14px;
|
809 |
margin: 0 auto;
|
810 |
}
|
811 |
Results
|
812 |
---------------------------------------------------------------------------
|
813 |
font-size: 12px;
|
814 |
font-style: italic;
|
815 |
font-weight: normal;
|
816 |
margin-left: 15px;
|
817 |
color: #38595E;
|
818 |
Style for results that are displayed on columns
|
819 |
..................................
|
820 |
float: left;
|
821 |
display: inline-block;
|
822 |
width: 100%;
|
823 |
padding: 1%;
|
824 |
margin: 1%;
|
825 |
float: right;
|
826 |
width: auto;
|
827 |
color:#000;
|
828 |
text-decoration:underline;
|
829 |
font-size:12px;
|
830 |
color:#000;
|
831 |
text-decoration:underline;
|
832 |
font-size:12px;
|
833 |
color:#000;
|
834 |
text-decoration:underline;
|
835 |
font-size:12px;
|
836 |
float:left;
|
837 |
width:100%;
|
838 |
Result Bar
|
839 |
..................................
|
840 |
---------------------------------------------------------------------------
|
841 |
EXTRAS
|
842 |
---------------------------------------------------------------------------
|
843 |
CAPTCHA
|
844 |
..................................
|
845 |
width:30px;
|
846 |
float:left;
|
847 |
margin-left:5px;
|
848 |
height:0px;
|
849 |
break;
|
850 |
}
|
851 |
case 'Blue v1':
|
852 |
{ //Blue v1
|
853 |
$css = <<<NOWDOC
|
854 |
Main Container
|
855 |
---------------------------------------------------------------------------
|
856 |
color:#000000;
|
857 |
color:#000000;
|
858 |
background:#327BD6;
|
859 |
box-sizing: border-box;
|
860 |
color: #fff;
|
861 |
display: inline-block;
|
862 |
font-size: 14px;
|
863 |
padding: 10px;
|
864 |
width: %POLL-WIDTH%;
|
865 |
zoom: 1;
|
866 |
Error message
|
867 |
..................................
|
868 |
font-size:.8em;
|
869 |
font-style:italic;
|
870 |
color:red;
|
871 |
text-transform:lowercase;
|
872 |
text-align:center;
|
873 |
Success message
|
874 |
..................................
|
875 |
font-size:.8em;
|
876 |
font-style:italic;
|
877 |
color:green;
|
878 |
text-align:center;
|
879 |
Poll Question
|
880 |
---------------------------------------------------------------------------
|
881 |
border: 0 none;
|
882 |
margin: 0 0 2em;
|
883 |
padding: .25em;
|
884 |
text-align: center;
|
885 |
font-size: 14px;
|
886 |
Poll Options / Answers
|
887 |
---------------------------------------------------------------------------
|
888 |
list-style: none;
|
889 |
margin: 0;
|
890 |
padding: 0;
|
891 |
list-style: none;
|
892 |
margin: 0;
|
893 |
padding: 0;
|
894 |
font-size: 14px;
|
895 |
line-height: 2em;
|
896 |
Label
|
897 |
..................................
|
898 |
margin:0px;
|
899 |
font-style:normal;
|
900 |
font-weight:normal;
|
901 |
font-size:14px;
|
902 |
float:none;
|
903 |
display:inline-block;
|
904 |
Custom answer / Other
|
905 |
..................................
|
906 |
width: 100%;
|
907 |
overflow: hidden;
|
908 |
width: 94%;
|
909 |
overflow: hidden;
|
910 |
Custom checkbox and radio button style
|
911 |
---------------------------------------------------------------------------
|
912 |
Custom fields
|
913 |
---------------------------------------------------------------------------
|
914 |
clear: both;
|
915 |
list-style: none;
|
916 |
margin: 0;
|
917 |
padding: 0;
|
918 |
overflow: hidden;
|
919 |
width: 100%;
|
920 |
display: block;
|
921 |
font-size:14px;
|
922 |
list-style: none;
|
923 |
display: block;
|
924 |
width: 94%;
|
925 |
Vote Button
|
926 |
---------------------------------------------------------------------------
|
927 |
cursor:pointer;
|
928 |
display: block;
|
929 |
font-size:14px;
|
930 |
margin: 0 auto;
|
931 |
}
|
932 |
Results
|
933 |
---------------------------------------------------------------------------
|
934 |
font-size: 12px;
|
935 |
font-style: italic;
|
936 |
font-weight: normal;
|
937 |
margin-left: 15px;
|
938 |
color: #38595E;
|
939 |
Style for results that are displayed on columns
|
940 |
..................................
|
941 |
float: left;
|
942 |
display: inline-block;
|
943 |
width: 100%;
|
944 |
padding: 1%;
|
945 |
margin: 1%;
|
946 |
float: right;
|
947 |
width: auto;
|
948 |
color:#000;
|
949 |
text-decoration:underline;
|
950 |
font-size:12px;
|
951 |
color:#000;
|
952 |
text-decoration:underline;
|
953 |
font-size:12px;
|
954 |
color:#000;
|
955 |
text-decoration:underline;
|
956 |
font-size:12px;
|
957 |
float:left;
|
958 |
width:100%;
|
959 |
Result Bar
|
960 |
..................................
|
961 |
---------------------------------------------------------------------------
|
962 |
EXTRAS
|
963 |
---------------------------------------------------------------------------
|
964 |
CAPTCHA
|
965 |
..................................
|
966 |
width:30px;
|
967 |
float:left;
|
968 |
margin-left:5px;
|
969 |
height:0px;
|
970 |
break;
|
971 |
}
|
972 |
case 'Blue v2':
|
973 |
{ //Blue v2
|
974 |
$css = <<<NOWDOC
|
975 |
Main Container
|
976 |
---------------------------------------------------------------------------
|
977 |
border:1px solid #000000;
|
978 |
color:#000000;
|
979 |
color:#000000;
|
980 |
background:#fff;
|
981 |
box-sizing: border-box;
|
982 |
display: inline-block;
|
983 |
font-size: 14px;
|
984 |
color:#555;
|
985 |
padding: 10px;
|
986 |
width: %POLL-WIDTH%;
|
987 |
zoom: 1;
|
988 |
Error message
|
989 |
..................................
|
990 |
font-size:.8em;
|
991 |
font-style:italic;
|
992 |
color:red;
|
993 |
text-transform:lowercase;
|
994 |
text-align:center;
|
995 |
Success message
|
996 |
..................................
|
997 |
font-size:.8em;
|
998 |
font-style:italic;
|
999 |
color:green;
|
1000 |
text-align:center;
|
1001 |
Poll Question
|
1002 |
---------------------------------------------------------------------------
|
1003 |
background:#327BD6;
|
1004 |
color:#fff;
|
1005 |
border: 0 none;
|
1006 |
margin: 0 0 2em;
|
1007 |
padding: .25em;
|
1008 |
text-align: center;
|
1009 |
font-size: 14px;
|
1010 |
Poll Options / Answers
|
1011 |
---------------------------------------------------------------------------
|
1012 |
list-style: none;
|
1013 |
margin: 0;
|
1014 |
padding: 0;
|
1015 |
list-style: none;
|
1016 |
margin: 0;
|
1017 |
padding: 0;
|
1018 |
font-size: 14px;
|
1019 |
line-height: 2em;
|
1020 |
Label
|
1021 |
..................................
|
1022 |
margin:0px;
|
1023 |
font-style:normal;
|
1024 |
font-weight:normal;
|
1025 |
font-size:14px;
|
1026 |
float:none;
|
1027 |
display:inline-block;
|
1028 |
Custom answer / Other
|
1029 |
..................................
|
1030 |
width: 100%;
|
1031 |
overflow: hidden;
|
1032 |
width: 94%;
|
1033 |
overflow: hidden;
|
1034 |
Custom checkbox and radio button style
|
1035 |
---------------------------------------------------------------------------
|
1036 |
Custom fields
|
1037 |
---------------------------------------------------------------------------
|
1038 |
clear: both;
|
1039 |
list-style: none;
|
1040 |
margin: 0;
|
1041 |
padding: 0;
|
1042 |
overflow: hidden;
|
1043 |
width: 100%;
|
1044 |
display: block;
|
1045 |
font-size:14px;
|
1046 |
list-style: none;
|
1047 |
display: block;
|
1048 |
width: 94%;
|
1049 |
Vote Button
|
1050 |
---------------------------------------------------------------------------
|
1051 |
cursor:pointer;
|
1052 |
display: block;
|
1053 |
font-size:14px;
|
1054 |
margin: 0 auto;
|
1055 |
}
|
1056 |
Results
|
1057 |
---------------------------------------------------------------------------
|
1058 |
font-size: 12px;
|
1059 |
font-style: italic;
|
1060 |
font-weight: normal;
|
1061 |
margin-left: 15px;
|
1062 |
color: #38595E;
|
1063 |
Style for results that are displayed on columns
|
1064 |
..................................
|
1065 |
float: left;
|
1066 |
display: inline-block;
|
1067 |
width: 100%;
|
1068 |
padding: 1%;
|
1069 |
margin: 1%;
|
1070 |
float: right;
|
1071 |
width: auto;
|
1072 |
color:#000;
|
1073 |
text-decoration:underline;
|
1074 |
font-size:12px;
|
1075 |
color:#000;
|
1076 |
text-decoration:underline;
|
1077 |
font-size:12px;
|
1078 |
color:#000;
|
1079 |
text-decoration:underline;
|
1080 |
font-size:12px;
|
1081 |
float:left;
|
1082 |
width:100%;
|
1083 |
Result Bar
|
1084 |
..................................
|
1085 |
---------------------------------------------------------------------------
|
1086 |
EXTRAS
|
1087 |
---------------------------------------------------------------------------
|
1088 |
CAPTCHA
|
1089 |
..................................
|
1090 |
width:30px;
|
1091 |
float:left;
|
1092 |
margin-left:5px;
|
1093 |
height:0px;
|
1094 |
break;
|
1095 |
}
|
1096 |
case 'Blue v3':
|
1097 |
{ //Blue v3
|
1098 |
$css = <<<NOWDOC
|
1099 |
Main Container
|
1100 |
---------------------------------------------------------------------------
|
1101 |
border:1px solid #000000;
|
1102 |
color:#000000;
|
1103 |
color:#000000;
|
1104 |
background:#fff;
|
1105 |
box-sizing: border-box;
|
1106 |
display: inline-block;
|
1107 |
font-size: 14px;
|
1108 |
color:#555;
|
1109 |
padding: 10px;
|
1110 |
width: %POLL-WIDTH%;
|
1111 |
zoom: 1;
|
1112 |
border: 5px solid #327BD6;
|
1113 |
Error message
|
1114 |
..................................
|
1115 |
font-size:.8em;
|
1116 |
font-style:italic;
|
1117 |
color:red;
|
1118 |
text-transform:lowercase;
|
1119 |
text-align:center;
|
1120 |
Success message
|
1121 |
..................................
|
1122 |
font-size:.8em;
|
1123 |
font-style:italic;
|
1124 |
color:green;
|
1125 |
text-align:center;
|
1126 |
Poll Question
|
1127 |
---------------------------------------------------------------------------
|
1128 |
border: 0 none;
|
1129 |
margin: 0 0 2em;
|
1130 |
padding: .25em;
|
1131 |
text-align: center;
|
1132 |
font-size: 14px;
|
1133 |
Poll Options / Answers
|
1134 |
---------------------------------------------------------------------------
|
1135 |
list-style: none;
|
1136 |
margin: 0;
|
1137 |
padding: 0;
|
1138 |
list-style: none;
|
1139 |
margin: 0;
|
1140 |
padding: 0;
|
1141 |
font-size: 14px;
|
1142 |
line-height: 2em;
|
1143 |
Label
|
1144 |
..................................
|
1145 |
margin:0px;
|
1146 |
font-style:normal;
|
1147 |
font-weight:normal;
|
1148 |
font-size:14px;
|
1149 |
float:none;
|
1150 |
display:inline-block;
|
1151 |
Custom answer / Other
|
1152 |
..................................
|
1153 |
width: 100%;
|
1154 |
overflow: hidden;
|
1155 |
width: 94%;
|
1156 |
overflow: hidden;
|
1157 |
Custom checkbox and radio button style
|
1158 |
---------------------------------------------------------------------------
|
1159 |
Custom fields
|
1160 |
---------------------------------------------------------------------------
|
1161 |
clear: both;
|
1162 |
list-style: none;
|
1163 |
margin: 0;
|
1164 |
padding: 0;
|
1165 |
overflow: hidden;
|
1166 |
width: 100%;
|
1167 |
display: block;
|
1168 |
font-size:14px;
|
1169 |
list-style: none;
|
1170 |
display: block;
|
1171 |
width: 94%;
|
1172 |
Vote Button
|
1173 |
---------------------------------------------------------------------------
|
1174 |
cursor:pointer;
|
1175 |
display: block;
|
1176 |
font-size:14px;
|
1177 |
margin: 0 auto;
|
1178 |
}
|
1179 |
Results
|
1180 |
---------------------------------------------------------------------------
|
1181 |
font-size: 12px;
|
1182 |
font-style: italic;
|
1183 |
font-weight: normal;
|
1184 |
margin-left: 15px;
|
1185 |
color: #38595E;
|
1186 |
Style for results that are displayed on columns
|
1187 |
..................................
|
1188 |
float: left;
|
1189 |
display: inline-block;
|
1190 |
width: 100%;
|
1191 |
padding: 1%;
|
1192 |
margin: 1%;
|
1193 |
float: right;
|
1194 |
width: auto;
|
1195 |
color:#000;
|
1196 |
text-decoration:underline;
|
1197 |
font-size:12px;
|
1198 |
color:#000;
|
1199 |
text-decoration:underline;
|
1200 |
font-size:12px;
|
1201 |
color:#000;
|
1202 |
text-decoration:underline;
|
1203 |
font-size:12px;
|
1204 |
float:left;
|
1205 |
width:100%;
|
1206 |
Result Bar
|
1207 |
..................................
|
1208 |
---------------------------------------------------------------------------
|
1209 |
EXTRAS
|
1210 |
---------------------------------------------------------------------------
|
1211 |
CAPTCHA
|
1212 |
..................................
|
1213 |
width:30px;
|
1214 |
float:left;
|
1215 |
margin-left:5px;
|
1216 |
height:0px;
|
1217 |
break;
|
1218 |
}
|
1219 |
case 'Red v1':
|
1220 |
{ //Red v1
|
1221 |
$css = <<<NOWDOC
|
1222 |
Main Container
|
1223 |
---------------------------------------------------------------------------
|
1224 |
color:#000000;
|
1225 |
color:#000000;
|
1226 |
background:#B70004;
|
1227 |
box-sizing: border-box;
|
1228 |
display: inline-block;
|
1229 |
font-size: 14px;
|
1230 |
color:white;
|
1231 |
padding: 10px;
|
1232 |
width: %POLL-WIDTH%;
|
1233 |
zoom: 1;
|
1234 |
Error message
|
1235 |
..................................
|
1236 |
font-size:.8em;
|
1237 |
font-style:italic;
|
1238 |
color:red;
|
1239 |
text-transform:lowercase;
|
1240 |
text-align:center;
|
1241 |
Success message
|
1242 |
..................................
|
1243 |
font-size:.8em;
|
1244 |
font-style:italic;
|
1245 |
color:green;
|
1246 |
text-align:center;
|
1247 |
Poll Question
|
1248 |
---------------------------------------------------------------------------
|
1249 |
border: 0 none;
|
1250 |
margin: 0 0 2em;
|
1251 |
padding: .25em;
|
1252 |
text-align: center;
|
1253 |
font-size: 14px;
|
1254 |
Poll Options / Answers
|
1255 |
---------------------------------------------------------------------------
|
1256 |
list-style: none;
|
1257 |
margin: 0;
|
1258 |
padding: 0;
|
1259 |
list-style: none;
|
1260 |
margin: 0;
|
1261 |
padding: 0;
|
1262 |
font-size: 14px;
|
1263 |
line-height: 2em;
|
1264 |
Label
|
1265 |
..................................
|
1266 |
margin:0px;
|
1267 |
font-style:normal;
|
1268 |
font-weight:normal;
|
1269 |
font-size:14px;
|
1270 |
float:none;
|
1271 |
display:inline-block;
|
1272 |
Custom answer / Other
|
1273 |
..................................
|
1274 |
width: 100%;
|
1275 |
overflow: hidden;
|
1276 |
width: 94%;
|
1277 |
overflow: hidden;
|
1278 |
Custom checkbox and radio button style
|
1279 |
---------------------------------------------------------------------------
|
1280 |
Custom fields
|
1281 |
---------------------------------------------------------------------------
|
1282 |
clear: both;
|
1283 |
list-style: none;
|
1284 |
margin: 0;
|
1285 |
padding: 0;
|
1286 |
overflow: hidden;
|
1287 |
width: 100%;
|
1288 |
display: block;
|
1289 |
font-size:14px;
|
1290 |
list-style: none;
|
1291 |
display: block;
|
1292 |
width: 94%;
|
1293 |
Vote Button
|
1294 |
---------------------------------------------------------------------------
|
1295 |
cursor:pointer;
|
1296 |
display: block;
|
1297 |
font-size:14px;
|
1298 |
margin: 0 auto;
|
1299 |
}
|
1300 |
Results
|
1301 |
---------------------------------------------------------------------------
|
1302 |
font-size: 12px;
|
1303 |
font-style: italic;
|
1304 |
font-weight: normal;
|
1305 |
margin-left: 15px;
|
1306 |
color: #38595E;
|
1307 |
Style for results that are displayed on columns
|
1308 |
..................................
|
1309 |
float: left;
|
1310 |
display: inline-block;
|
1311 |
width: 100%;
|
1312 |
padding: 1%;
|
1313 |
margin: 1%;
|
1314 |
float: right;
|
1315 |
width: auto;
|
1316 |
color:#000;
|
1317 |
text-decoration:underline;
|
1318 |
font-size:12px;
|
1319 |
color:#000;
|
1320 |
text-decoration:underline;
|
1321 |
font-size:12px;
|
1322 |
color:#000;
|
1323 |
text-decoration:underline;
|
1324 |
font-size:12px;
|
1325 |
float:left;
|
1326 |
width:100%;
|
1327 |
Result Bar
|
1328 |
..................................
|
1329 |
---------------------------------------------------------------------------
|
1330 |
EXTRAS
|
1331 |
---------------------------------------------------------------------------
|
1332 |
CAPTCHA
|
1333 |
..................................
|
1334 |
width:30px;
|
1335 |
float:left;
|
1336 |
margin-left:5px;
|
1337 |
height:0px;
|
1338 |
break;
|
1339 |
}
|
1340 |
case 'Red v2':
|
1341 |
{ //Red v2
|
1342 |
$css = <<<NOWDOC
|
1343 |
Main Container
|
1344 |
---------------------------------------------------------------------------
|
1345 |
border:1px solid #000000;
|
1346 |
color:#000000;
|
1347 |
color:#000000;
|
1348 |
background:#fff;
|
1349 |
box-sizing: border-box;
|
1350 |
display: inline-block;
|
1351 |
font-size: 14px;
|
1352 |
color:#555;
|
1353 |
padding: 10px;
|
1354 |
width: %POLL-WIDTH%;
|
1355 |
zoom: 1;
|
1356 |
Error message
|
1357 |
..................................
|
1358 |
font-size:.8em;
|
1359 |
font-style:italic;
|
1360 |
color:red;
|
1361 |
text-transform:lowercase;
|
1362 |
text-align:center;
|
1363 |
Success message
|
1364 |
..................................
|
1365 |
font-size:.8em;
|
1366 |
font-style:italic;
|
1367 |
color:green;
|
1368 |
text-align:center;
|
1369 |
Poll Question
|
1370 |
---------------------------------------------------------------------------
|
1371 |
background:#B70004;
|
1372 |
color:#fff;
|
1373 |
border: 0 none;
|
1374 |
margin: 0 0 2em;
|
1375 |
padding: .25em;
|
1376 |
text-align: center;
|
1377 |
font-size: 14px;
|
1378 |
Poll Options / Answers
|
1379 |
---------------------------------------------------------------------------
|
1380 |
list-style: none;
|
1381 |
margin: 0;
|
1382 |
padding: 0;
|
1383 |
list-style: none;
|
1384 |
margin: 0;
|
1385 |
padding: 0;
|
1386 |
font-size: 14px;
|
1387 |
line-height: 2em;
|
1388 |
Label
|
1389 |
..................................
|
1390 |
margin:0px;
|
1391 |
font-style:normal;
|
1392 |
font-weight:normal;
|
1393 |
font-size:14px;
|
1394 |
float:none;
|
1395 |
display:inline-block;
|
1396 |
Custom answer / Other
|
1397 |
..................................
|
1398 |
width: 100%;
|
1399 |
overflow: hidden;
|
1400 |
width: 94%;
|
1401 |
overflow: hidden;
|
1402 |
Custom checkbox and radio button style
|
1403 |
---------------------------------------------------------------------------
|
1404 |
Custom fields
|
1405 |
---------------------------------------------------------------------------
|
1406 |
clear: both;
|
1407 |
list-style: none;
|
1408 |
margin: 0;
|
1409 |
padding: 0;
|
1410 |
overflow: hidden;
|
1411 |
width: 100%;
|
1412 |
display: block;
|
1413 |
font-size:14px;
|
1414 |
list-style: none;
|
1415 |
display: block;
|
1416 |
width: 94%;
|
1417 |
Vote Button
|
1418 |
---------------------------------------------------------------------------
|
1419 |
cursor:pointer;
|
1420 |
display: block;
|
1421 |
font-size:14px;
|
1422 |
margin: 0 auto;
|
1423 |
}
|
1424 |
Results
|
1425 |
---------------------------------------------------------------------------
|
1426 |
font-size: 12px;
|
1427 |
font-style: italic;
|
1428 |
font-weight: normal;
|
1429 |
margin-left: 15px;
|
1430 |
color: #38595E;
|
1431 |
Style for results that are displayed on columns
|
1432 |
..................................
|
1433 |
float: left;
|
1434 |
display: inline-block;
|
1435 |
width: 100%;
|
1436 |
padding: 1%;
|
1437 |
margin: 1%;
|
1438 |
float: right;
|
1439 |
width: auto;
|
1440 |
color:#000;
|
1441 |
text-decoration:underline;
|
1442 |
font-size:12px;
|
1443 |
color:#000;
|
1444 |
text-decoration:underline;
|
1445 |
font-size:12px;
|
1446 |
color:#000;
|
1447 |
text-decoration:underline;
|
1448 |
font-size:12px;
|
1449 |
float:left;
|
1450 |
width:100%;
|
1451 |
Result Bar
|
1452 |
..................................
|
1453 |
---------------------------------------------------------------------------
|
1454 |
EXTRAS
|
1455 |
---------------------------------------------------------------------------
|
1456 |
CAPTCHA
|
1457 |
..................................
|
1458 |
width:30px;
|
1459 |
float:left;
|
1460 |
margin-left:5px;
|
1461 |
height:0px;
|
1462 |
break;
|
1463 |
}
|
1464 |
case 'Red v3':
|
1465 |
{ //Red v3
|
1466 |
$css = <<<NOWDOC
|
1467 |
Main Container
|
1468 |
---------------------------------------------------------------------------
|
1469 |
border:1px solid #000000;
|
1470 |
color:#000000;
|
1471 |
color:#000000;
|
1472 |
background:#fff;
|
1473 |
box-sizing: border-box;
|
1474 |
display: inline-block;
|
1475 |
font-size: 14px;
|
1476 |
color:#555;
|
1477 |
padding: 10px;
|
1478 |
width: %POLL-WIDTH%;
|
1479 |
zoom: 1;
|
1480 |
border:5px solid #B70004;
|
1481 |
Error message
|
1482 |
..................................
|
1483 |
font-size:.8em;
|
1484 |
font-style:italic;
|
1485 |
color:red;
|
1486 |
text-transform:lowercase;
|
1487 |
text-align:center;
|
1488 |
Success message
|
1489 |
..................................
|
1490 |
font-size:.8em;
|
1491 |
font-style:italic;
|
1492 |
color:green;
|
1493 |
text-align:center;
|
1494 |
Poll Question
|
1495 |
---------------------------------------------------------------------------
|
1496 |
border: 0 none;
|
1497 |
margin: 0 0 2em;
|
1498 |
padding: .25em;
|
1499 |
text-align: center;
|
1500 |
font-size: 14px;
|
1501 |
Poll Options / Answers
|
1502 |
---------------------------------------------------------------------------
|
1503 |
list-style: none;
|
1504 |
margin: 0;
|
1505 |
padding: 0;
|
1506 |
list-style: none;
|
1507 |
margin: 0;
|
1508 |
padding: 0;
|
1509 |
font-size: 14px;
|
1510 |
line-height: 2em;
|
1511 |
Label
|
1512 |
..................................
|
1513 |
margin:0px;
|
1514 |
font-style:normal;
|
1515 |
font-weight:normal;
|
1516 |
font-size:14px;
|
1517 |
float:none;
|
1518 |
display:inline-block;
|
1519 |
Custom answer / Other
|
1520 |
..................................
|
1521 |
width: 100%;
|
1522 |
overflow: hidden;
|
1523 |
width: 94%;
|
1524 |
overflow: hidden;
|
1525 |
Custom checkbox and radio button style
|
1526 |
---------------------------------------------------------------------------
|
1527 |
Custom fields
|
1528 |
---------------------------------------------------------------------------
|
1529 |
clear: both;
|
1530 |
list-style: none;
|
1531 |
margin: 0;
|
1532 |
padding: 0;
|
1533 |
overflow: hidden;
|
1534 |
width: 100%;
|
1535 |
display: block;
|
1536 |
font-size:14px;
|
1537 |
list-style: none;
|
1538 |
display: block;
|
1539 |
width: 94%;
|
1540 |
Vote Button
|
1541 |
---------------------------------------------------------------------------
|
1542 |
cursor:pointer;
|
1543 |
display: block;
|
1544 |
font-size:14px;
|
1545 |
margin: 0 auto;
|
1546 |
}
|
1547 |
Results
|
1548 |
---------------------------------------------------------------------------
|
1549 |
font-size: 12px;
|
1550 |
font-style: italic;
|
1551 |
font-weight: normal;
|
1552 |
margin-left: 15px;
|
1553 |
color: #38595E;
|
1554 |
Style for results that are displayed on columns
|
1555 |
..................................
|
1556 |
float: left;
|
1557 |
display: inline-block;
|
1558 |
width: 100%;
|
1559 |
padding: 1%;
|
1560 |
margin: 1%;
|
1561 |
float: right;
|
1562 |
width: auto;
|
1563 |
color:#000;
|
1564 |
text-decoration:underline;
|
1565 |
font-size:12px;
|
1566 |
color:#000;
|
1567 |
text-decoration:underline;
|
1568 |
font-size:12px;
|
1569 |
color:#000;
|
1570 |
text-decoration:underline;
|
1571 |
font-size:12px;
|
1572 |
float:left;
|
1573 |
width:100%;
|
1574 |
Result Bar
|
1575 |
..................................
|
1576 |
---------------------------------------------------------------------------
|
1577 |
EXTRAS
|
1578 |
---------------------------------------------------------------------------
|
1579 |
CAPTCHA
|
1580 |
..................................
|
1581 |
width:30px;
|
1582 |
float:left;
|
1583 |
margin-left:5px;
|
1584 |
height:0px;
|
1585 |
break;
|
1586 |
}
|
1587 |
case 'Green v1':
|
1588 |
{ //Green v1
|
1589 |
$css = <<<NOWDOC
|
1590 |
Main Container
|
1591 |
---------------------------------------------------------------------------
|
1592 |
color:#000000;
|
1593 |
color:#000000;
|
1594 |
background:#3F8B43;
|
1595 |
box-sizing: border-box;
|
1596 |
display: inline-block;
|
1597 |
font-size: 14px;
|
1598 |
color:white;
|
1599 |
padding: 10px;
|
1600 |
width: %POLL-WIDTH%;
|
1601 |
zoom: 1;
|
1602 |
Error message
|
1603 |
..................................
|
1604 |
font-size:.8em;
|
1605 |
font-style:italic;
|
1606 |
color:red;
|
1607 |
text-transform:lowercase;
|
1608 |
text-align:center;
|
1609 |
Success message
|
1610 |
..................................
|
1611 |
font-size:.8em;
|
1612 |
font-style:italic;
|
1613 |
color:green;
|
1614 |
text-align:center;
|
1615 |
Poll Question
|
1616 |
---------------------------------------------------------------------------
|
1617 |
border: 0 none;
|
1618 |
margin: 0 0 2em;
|
1619 |
padding: .25em;
|
1620 |
text-align: center;
|
1621 |
font-size: 14px;
|
1622 |
Poll Options / Answers
|
1623 |
---------------------------------------------------------------------------
|
1624 |
list-style: none;
|
1625 |
margin: 0;
|
1626 |
padding: 0;
|
1627 |
list-style: none;
|
1628 |
margin: 0;
|
1629 |
padding: 0;
|
1630 |
font-size: 14px;
|
1631 |
line-height: 2em;
|
1632 |
Label
|
1633 |
..................................
|
1634 |
margin:0px;
|
1635 |
font-style:normal;
|
1636 |
font-weight:normal;
|
1637 |
font-size:14px;
|
1638 |
float:none;
|
1639 |
display:inline-block;
|
1640 |
Custom answer / Other
|
1641 |
..................................
|
1642 |
width: 100%;
|
1643 |
overflow: hidden;
|
1644 |
width: 94%;
|
1645 |
overflow: hidden;
|
1646 |
Custom checkbox and radio button style
|
1647 |
---------------------------------------------------------------------------
|
1648 |
Custom fields
|
1649 |
---------------------------------------------------------------------------
|
1650 |
clear: both;
|
1651 |
list-style: none;
|
1652 |
margin: 0;
|
1653 |
padding: 0;
|
1654 |
overflow: hidden;
|
1655 |
width: 100%;
|
1656 |
display: block;
|
1657 |
font-size:14px;
|
1658 |
list-style: none;
|
1659 |
display: block;
|
1660 |
width: 94%;
|
1661 |
Vote Button
|
1662 |
---------------------------------------------------------------------------
|
1663 |
cursor:pointer;
|
1664 |
display: block;
|
1665 |
font-size:14px;
|
1666 |
margin: 0 auto;
|
1667 |
}
|
1668 |
Results
|
1669 |
---------------------------------------------------------------------------
|
1670 |
font-size: 12px;
|
1671 |
font-style: italic;
|
1672 |
font-weight: normal;
|
1673 |
margin-left: 15px;
|
1674 |
color: #38595E;
|
1675 |
Style for results that are displayed on columns
|
1676 |
..................................
|
1677 |
float: left;
|
1678 |
display: inline-block;
|
1679 |
width: 100%;
|
1680 |
padding: 1%;
|
1681 |
margin: 1%;
|
1682 |
float: right;
|
1683 |
width: auto;
|
1684 |
color:#000;
|
1685 |
text-decoration:underline;
|
1686 |
font-size:12px;
|
1687 |
color:#000;
|
1688 |
text-decoration:underline;
|
1689 |
font-size:12px;
|
1690 |
color:#000;
|
1691 |
text-decoration:underline;
|
1692 |
font-size:12px;
|
1693 |
float:left;
|
1694 |
width:100%;
|
1695 |
Result Bar
|
1696 |
..................................
|
1697 |
---------------------------------------------------------------------------
|
1698 |
EXTRAS
|
1699 |
---------------------------------------------------------------------------
|
1700 |
CAPTCHA
|
1701 |
..................................
|
1702 |
width:30px;
|
1703 |
float:left;
|
1704 |
margin-left:5px;
|
1705 |
height:0px;
|
1706 |
break;
|
1707 |
}
|
1708 |
case 'Green v2':
|
1709 |
{ //Green v2
|
1710 |
$css = <<<NOWDOC
|
1711 |
Main Container
|
1712 |
---------------------------------------------------------------------------
|
1713 |
border:1px solid #000000;
|
1714 |
color:#000000;
|
1715 |
color:#000000;
|
1716 |
background:#fff;
|
1717 |
box-sizing: border-box;
|
1718 |
display: inline-block;
|
1719 |
font-size: 14px;
|
1720 |
color:#555;
|
1721 |
padding: 10px;
|
1722 |
width: %POLL-WIDTH%;
|
1723 |
zoom: 1;
|
1724 |
Error message
|
1725 |
..................................
|
1726 |
font-size:.8em;
|
1727 |
font-style:italic;
|
1728 |
color:red;
|
1729 |
text-transform:lowercase;
|
1730 |
text-align:center;
|
1731 |
Success message
|
1732 |
..................................
|
1733 |
font-size:.8em;
|
1734 |
font-style:italic;
|
1735 |
color:green;
|
1736 |
text-align:center;
|
1737 |
Poll Question
|
1738 |
---------------------------------------------------------------------------
|
1739 |
background:#3F8B43;
|
1740 |
color:#fff;
|
1741 |
border: 0 none;
|
1742 |
margin: 0 0 2em;
|
1743 |
padding: .25em;
|
1744 |
text-align: center;
|
1745 |
font-size: 14px;
|
1746 |
Poll Options / Answers
|
1747 |
---------------------------------------------------------------------------
|
1748 |
list-style: none;
|
1749 |
margin: 0;
|
1750 |
padding: 0;
|
1751 |
list-style: none;
|
1752 |
margin: 0;
|
1753 |
padding: 0;
|
1754 |
font-size: 14px;
|
1755 |
line-height: 2em;
|
1756 |
Label
|
1757 |
..................................
|
1758 |
margin:0px;
|
1759 |
font-style:normal;
|
1760 |
font-weight:normal;
|
1761 |
font-size:14px;
|
1762 |
float:none;
|
1763 |
display:inline-block;
|
1764 |
Custom answer / Other
|
1765 |
..................................
|
1766 |
width: 100%;
|
1767 |
overflow: hidden;
|
1768 |
width: 94%;
|
1769 |
overflow: hidden;
|
1770 |
Custom checkbox and radio button style
|
1771 |
---------------------------------------------------------------------------
|
1772 |
Custom fields
|
1773 |
---------------------------------------------------------------------------
|
1774 |
clear: both;
|
1775 |
list-style: none;
|
1776 |
margin: 0;
|
1777 |
padding: 0;
|
1778 |
overflow: hidden;
|
1779 |
width: 100%;
|
1780 |
display: block;
|
1781 |
font-size:14px;
|
1782 |
list-style: none;
|
1783 |
display: block;
|
1784 |
width: 94%;
|
1785 |
Vote Button
|
1786 |
---------------------------------------------------------------------------
|
1787 |
cursor:pointer;
|
1788 |
display: block;
|
1789 |
font-size:14px;
|
1790 |
margin: 0 auto;
|
1791 |
}
|
1792 |
Results
|
1793 |
---------------------------------------------------------------------------
|
1794 |
font-size: 12px;
|
1795 |
font-style: italic;
|
1796 |
font-weight: normal;
|
1797 |
margin-left: 15px;
|
1798 |
color: #38595E;
|
1799 |
Style for results that are displayed on columns
|
1800 |
..................................
|
1801 |
float: left;
|
1802 |
display: inline-block;
|
1803 |
width: 100%;
|
1804 |
padding: 1%;
|
1805 |
margin: 1%;
|
1806 |
float: right;
|
1807 |
width: auto;
|
1808 |
color:#000;
|
1809 |
text-decoration:underline;
|
1810 |
font-size:12px;
|
1811 |
color:#000;
|
1812 |
text-decoration:underline;
|
1813 |
font-size:12px;
|
1814 |
color:#000;
|
1815 |
text-decoration:underline;
|
1816 |
font-size:12px;
|
1817 |
float:left;
|
1818 |
width:100%;
|
1819 |
Result Bar
|
1820 |
..................................
|
1821 |
---------------------------------------------------------------------------
|
1822 |
EXTRAS
|
1823 |
---------------------------------------------------------------------------
|
1824 |
CAPTCHA
|
1825 |
..................................
|
1826 |
width:30px;
|
1827 |
float:left;
|
1828 |
margin-left:5px;
|
1829 |
height:0px;
|
1830 |
break;
|
1831 |
}
|
1832 |
case 'Green v3':
|
1833 |
{ //Green v3
|
1834 |
$css = <<<NOWDOC
|
1835 |
Main Container
|
1836 |
---------------------------------------------------------------------------
|
1837 |
border:1px solid #000000;
|
1838 |
color:#000000;
|
1839 |
color:#000000;
|
1840 |
background:#fff;
|
1841 |
box-sizing: border-box;
|
1842 |
display: inline-block;
|
1843 |
font-size: 14px;
|
1844 |
color:#555;
|
1845 |
padding: 10px;
|
1846 |
width: %POLL-WIDTH%;
|
1847 |
zoom: 1;
|
1848 |
border:5px solid #3F8B43;
|
1849 |
Error message
|
1850 |
..................................
|
1851 |
font-size:.8em;
|
1852 |
font-style:italic;
|
1853 |
color:red;
|
1854 |
text-transform:lowercase;
|
1855 |
text-align:center;
|
1856 |
Success message
|
1857 |
..................................
|
1858 |
font-size:.8em;
|
1859 |
font-style:italic;
|
1860 |
color:green;
|
1861 |
text-align:center;
|
1862 |
Poll Question
|
1863 |
---------------------------------------------------------------------------
|
1864 |
border: 0 none;
|
1865 |
margin: 0 0 2em;
|
1866 |
padding: .25em;
|
1867 |
text-align: center;
|
1868 |
font-size: 14px;
|
1869 |
Poll Options / Answers
|
1870 |
---------------------------------------------------------------------------
|
1871 |
list-style: none;
|
1872 |
margin: 0;
|
1873 |
padding: 0;
|
1874 |
list-style: none;
|
1875 |
margin: 0;
|
1876 |
padding: 0;
|
1877 |
font-size: 14px;
|
1878 |
line-height: 2em;
|
1879 |
Label
|
1880 |
..................................
|
1881 |
margin:0px;
|
1882 |
font-style:normal;
|
1883 |
font-weight:normal;
|
1884 |
font-size:14px;
|
1885 |
float:none;
|
1886 |
display:inline-block;
|
1887 |
Custom answer / Other
|
1888 |
..................................
|
1889 |
width: 100%;
|
1890 |
overflow: hidden;
|
1891 |
width: 94%;
|
1892 |
overflow: hidden;
|
1893 |
Custom checkbox and radio button style
|
1894 |
---------------------------------------------------------------------------
|
1895 |
Custom fields
|
1896 |
---------------------------------------------------------------------------
|
1897 |
clear: both;
|
1898 |
list-style: none;
|
1899 |
margin: 0;
|
1900 |
padding: 0;
|
1901 |
overflow: hidden;
|
1902 |
width: 100%;
|
1903 |
display: block;
|
1904 |
font-size:14px;
|
1905 |
list-style: none;
|
1906 |
display: block;
|
1907 |
width: 94%;
|
1908 |
Vote Button
|
1909 |
---------------------------------------------------------------------------
|
1910 |
cursor:pointer;
|
1911 |
display: block;
|
1912 |
font-size:14px;
|
1913 |
margin: 0 auto;
|
1914 |
}
|
1915 |
Results
|
1916 |
---------------------------------------------------------------------------
|
1917 |
font-size: 12px;
|
1918 |
font-style: italic;
|
1919 |
font-weight: normal;
|
1920 |
margin-left: 15px;
|
1921 |
color: #38595E;
|
1922 |
Style for results that are displayed on columns
|
1923 |
..................................
|
1924 |
float: left;
|
1925 |
display: inline-block;
|
1926 |
width: 100%;
|
1927 |
padding: 1%;
|
1928 |
margin: 1%;
|
1929 |
float: right;
|
1930 |
width: auto;
|
1931 |
color:#000;
|
1932 |
text-decoration:underline;
|
1933 |
font-size:12px;
|
1934 |
color:#000;
|
1935 |
text-decoration:underline;
|
1936 |
font-size:12px;
|
1937 |
color:#000;
|
1938 |
text-decoration:underline;
|
1939 |
font-size:12px;
|
1940 |
float:left;
|
1941 |
width:100%;
|
1942 |
Result Bar
|
1943 |
..................................
|
1944 |
---------------------------------------------------------------------------
|
1945 |
EXTRAS
|
1946 |
---------------------------------------------------------------------------
|
1947 |
CAPTCHA
|
1948 |
..................................
|
1949 |
width:30px;
|
1950 |
float:left;
|
1951 |
margin-left:5px;
|
1952 |
height:0px;
|
1953 |
break;
|
1954 |
}
|
1955 |
case 'Orange v1':
|
1956 |
{ //Orange v1
|
1957 |
$css = <<<NOWDOC
|
1958 |
Main Container
|
1959 |
---------------------------------------------------------------------------
|
1960 |
color:#000000;
|
1961 |
color:#000000;
|
1962 |
background:#FB6911;
|
1963 |
box-sizing: border-box;
|
1964 |
display: inline-block;
|
1965 |
font-size: 14px;
|
1966 |
color:white;
|
1967 |
padding: 10px;
|
1968 |
width: %POLL-WIDTH%;
|
1969 |
zoom: 1;
|
1970 |
Error message
|
1971 |
..................................
|
1972 |
font-size:.8em;
|
1973 |
font-style:italic;
|
1974 |
color:red;
|
1975 |
text-transform:lowercase;
|
1976 |
text-align:center;
|
1977 |
Success message
|
1978 |
..................................
|
1979 |
font-size:.8em;
|
1980 |
font-style:italic;
|
1981 |
color:green;
|
1982 |
text-align:center;
|
1983 |
Poll Question
|
1984 |
---------------------------------------------------------------------------
|
1985 |
border: 0 none;
|
1986 |
margin: 0 0 2em;
|
1987 |
padding: .25em;
|
1988 |
text-align: center;
|
1989 |
font-size: 14px;
|
1990 |
Poll Options / Answers
|
1991 |
---------------------------------------------------------------------------
|
1992 |
list-style: none;
|
1993 |
margin: 0;
|
1994 |
padding: 0;
|
1995 |
list-style: none;
|
1996 |
margin: 0;
|
1997 |
padding: 0;
|
1998 |
font-size: 14px;
|
1999 |
line-height: 2em;
|
2000 |
Label
|
2001 |
..................................
|
2002 |
margin:0px;
|
2003 |
font-style:normal;
|
2004 |
font-weight:normal;
|
2005 |
font-size:14px;
|
2006 |
float:none;
|
2007 |
display:inline-block;
|
2008 |
Custom answer / Other
|
2009 |
..................................
|
2010 |
width: 100%;
|
2011 |
overflow: hidden;
|
2012 |
width: 94%;
|
2013 |
overflow: hidden;
|
2014 |
Custom checkbox and radio button style
|
2015 |
---------------------------------------------------------------------------
|
2016 |
Custom fields
|
2017 |
---------------------------------------------------------------------------
|
2018 |
clear: both;
|
2019 |
list-style: none;
|
2020 |
margin: 0;
|
2021 |
padding: 0;
|
2022 |
overflow: hidden;
|
2023 |
width: 100%;
|
2024 |
display: block;
|
2025 |
font-size:14px;
|
2026 |
list-style: none;
|
2027 |
display: block;
|
2028 |
width: 94%;
|
2029 |
Vote Button
|
2030 |
---------------------------------------------------------------------------
|
2031 |
cursor:pointer;
|
2032 |
display: block;
|
2033 |
font-size:14px;
|
2034 |
margin: 0 auto;
|
2035 |
}
|
2036 |
Results
|
2037 |
---------------------------------------------------------------------------
|
2038 |
font-size: 12px;
|
2039 |
font-style: italic;
|
2040 |
font-weight: normal;
|
2041 |
margin-left: 15px;
|
2042 |
color: #38595E;
|
2043 |
Style for results that are displayed on columns
|
2044 |
..................................
|
2045 |
float: left;
|
2046 |
display: inline-block;
|
2047 |
width: 100%;
|
2048 |
padding: 1%;
|
2049 |
margin: 1%;
|
2050 |
float: right;
|
2051 |
width: auto;
|
2052 |
color:#000;
|
2053 |
text-decoration:underline;
|
2054 |
font-size:12px;
|
2055 |
color:#000;
|
2056 |
text-decoration:underline;
|
2057 |
font-size:12px;
|
2058 |
color:#000;
|
2059 |
text-decoration:underline;
|
2060 |
font-size:12px;
|
2061 |
float:left;
|
2062 |
width:100%;
|
2063 |
Result Bar
|
2064 |
..................................
|
2065 |
---------------------------------------------------------------------------
|
2066 |
EXTRAS
|
2067 |
---------------------------------------------------------------------------
|
2068 |
CAPTCHA
|
2069 |
..................................
|
2070 |
width:30px;
|
2071 |
float:left;
|
2072 |
margin-left:5px;
|
2073 |
height:0px;
|
2074 |
break;
|
2075 |
}
|
2076 |
case 'Orange v2':
|
2077 |
{ //Orange v2
|
2078 |
$css = <<<NOWDOC
|
2079 |
Main Container
|
2080 |
---------------------------------------------------------------------------
|
2081 |
border:1px solid #000000;
|
2082 |
color:#000000;
|
2083 |
color:#000000;
|
2084 |
background:#fff;
|
2085 |
box-sizing: border-box;
|
2086 |
display: inline-block;
|
2087 |
font-size: 14px;
|
2088 |
color:#555;
|
2089 |
padding: 10px;
|
2090 |
width: %POLL-WIDTH%;
|
2091 |
zoom: 1;
|
2092 |
Error message
|
2093 |
..................................
|
2094 |
font-size:.8em;
|
2095 |
font-style:italic;
|
2096 |
color:red;
|
2097 |
text-transform:lowercase;
|
2098 |
text-align:center;
|
2099 |
Success message
|
2100 |
..................................
|
2101 |
font-size:.8em;
|
2102 |
font-style:italic;
|
2103 |
color:green;
|
2104 |
text-align:center;
|
2105 |
Poll Question
|
2106 |
---------------------------------------------------------------------------
|
2107 |
background:#FB6911;
|
2108 |
color:#fff;
|
2109 |
border: 0 none;
|
2110 |
margin: 0 0 2em;
|
2111 |
padding: .25em;
|
2112 |
text-align: center;
|
2113 |
font-size: 14px;
|
2114 |
Poll Options / Answers
|
2115 |
---------------------------------------------------------------------------
|
2116 |
list-style: none;
|
2117 |
margin: 0;
|
2118 |
padding: 0;
|
2119 |
list-style: none;
|
2120 |
margin: 0;
|
2121 |
padding: 0;
|
2122 |
font-size: 14px;
|
2123 |
line-height: 2em;
|
2124 |
Label
|
2125 |
..................................
|
2126 |
margin:0px;
|
2127 |
font-style:normal;
|
2128 |
font-weight:normal;
|
2129 |
font-size:14px;
|
2130 |
float:none;
|
2131 |
display:inline-block;
|
2132 |
Custom answer / Other
|
2133 |
..................................
|
2134 |
width: 100%;
|
2135 |
overflow: hidden;
|
2136 |
width: 94%;
|
2137 |
overflow: hidden;
|
2138 |
Custom checkbox and radio button style
|
2139 |
---------------------------------------------------------------------------
|
2140 |
Custom fields
|
2141 |
---------------------------------------------------------------------------
|
2142 |
clear: both;
|
2143 |
list-style: none;
|
2144 |
margin: 0;
|
2145 |
padding: 0;
|
2146 |
overflow: hidden;
|
2147 |
width: 100%;
|
2148 |
display: block;
|
2149 |
font-size:14px;
|
2150 |
list-style: none;
|
2151 |
display: block;
|
2152 |
width: 94%;
|
2153 |
Vote Button
|
2154 |
---------------------------------------------------------------------------
|
2155 |
cursor:pointer;
|
2156 |
display: block;
|
2157 |
font-size:14px;
|
2158 |
margin: 0 auto;
|
2159 |
}
|
2160 |
Results
|
2161 |
---------------------------------------------------------------------------
|
2162 |
font-size: 12px;
|
2163 |
font-style: italic;
|
2164 |
font-weight: normal;
|
2165 |
margin-left: 15px;
|
2166 |
color: #38595E;
|
2167 |
Style for results that are displayed on columns
|
2168 |
..................................
|
2169 |
float: left;
|
2170 |
display: inline-block;
|
2171 |
width: 100%;
|
2172 |
padding: 1%;
|
2173 |
margin: 1%;
|
2174 |
float: right;
|
2175 |
width: auto;
|
2176 |
color:#000;
|
2177 |
text-decoration:underline;
|
2178 |
font-size:12px;
|
2179 |
color:#000;
|
2180 |
text-decoration:underline;
|
2181 |
font-size:12px;
|
2182 |
color:#000;
|
2183 |
text-decoration:underline;
|
2184 |
font-size:12px;
|
2185 |
float:left;
|
2186 |
width:100%;
|
2187 |
Result Bar
|
2188 |
..................................
|
2189 |
---------------------------------------------------------------------------
|
2190 |
EXTRAS
|
2191 |
---------------------------------------------------------------------------
|
2192 |
CAPTCHA
|
2193 |
..................................
|
2194 |
width:30px;
|
2195 |
float:left;
|
2196 |
margin-left:5px;
|
2197 |
height:0px;
|
2198 |
break;
|
2199 |
}
|
2200 |
case 'Orange v3':
|
2201 |
{ //Orange v3
|
2202 |
$css = <<<NOWDOC
|
2203 |
Main Container
|
2204 |
---------------------------------------------------------------------------
|
2205 |
border:1px solid #000000;
|
2206 |
color:#000000;
|
2207 |
color:#000000;
|
2208 |
background:#fff;
|
2209 |
box-sizing: border-box;
|
2210 |
display: inline-block;
|
2211 |
font-size: 14px;
|
2212 |
color:#555;
|
2213 |
padding: 10px;
|
2214 |
width: %POLL-WIDTH%;
|
2215 |
zoom: 1;
|
2216 |
border:5px solid #FB6911;
|
2217 |
Error message
|
2218 |
..................................
|
2219 |
font-size:.8em;
|
2220 |
font-style:italic;
|
2221 |
color:red;
|
2222 |
text-transform:lowercase;
|
2223 |
text-align:center;
|
2224 |
Success message
|
2225 |
..................................
|
2226 |
font-size:.8em;
|
2227 |
font-style:italic;
|
2228 |
color:green;
|
2229 |
text-align:center;
|
2230 |
Poll Question
|
2231 |
---------------------------------------------------------------------------
|
2232 |
border: 0 none;
|
2233 |
margin: 0 0 2em;
|
2234 |
padding: .25em;
|
2235 |
text-align: center;
|
2236 |
font-size: 14px;
|
2237 |
Poll Options / Answers
|
2238 |
---------------------------------------------------------------------------
|
2239 |
list-style: none;
|
2240 |
margin: 0;
|
2241 |
padding: 0;
|
2242 |
list-style: none;
|
2243 |
margin: 0;
|
2244 |
padding: 0;
|
2245 |
font-size: 14px;
|
2246 |
line-height: 2em;
|
2247 |
Label
|
2248 |
..................................
|
2249 |
margin:0px;
|
2250 |
font-style:normal;
|
2251 |
font-weight:normal;
|
2252 |
font-size:14px;
|
2253 |
float:none;
|
2254 |
display:inline-block;
|
2255 |
Custom answer / Other
|
2256 |
..................................
|
2257 |
width: 100%;
|
2258 |
overflow: hidden;
|
2259 |
width: 94%;
|
2260 |
overflow: hidden;
|
2261 |
Custom checkbox and radio button style
|
2262 |
---------------------------------------------------------------------------
|
2263 |
Custom fields
|
2264 |
---------------------------------------------------------------------------
|
2265 |
clear: both;
|
2266 |
list-style: none;
|
2267 |
margin: 0;
|
2268 |
padding: 0;
|
2269 |
overflow: hidden;
|
2270 |
width: 100%;
|
2271 |
display: block;
|
2272 |
font-size:14px;
|
2273 |
list-style: none;
|
2274 |
display: block;
|
2275 |
width: 94%;
|
2276 |
Vote Button
|
2277 |
---------------------------------------------------------------------------
|
2278 |
cursor:pointer;
|
2279 |
display: block;
|
2280 |
font-size:14px;
|
2281 |
margin: 0 auto;
|
2282 |
}
|
2283 |
Results
|
2284 |
---------------------------------------------------------------------------
|
2285 |
font-size: 12px;
|
2286 |
font-style: italic;
|
2287 |
font-weight: normal;
|
2288 |
margin-left: 15px;
|
2289 |
color: #38595E;
|
2290 |
Style for results that are displayed on columns
|
2291 |
..................................
|
2292 |
float: left;
|
2293 |
display: inline-block;
|
2294 |
width: 100%;
|
2295 |
padding: 1%;
|
2296 |
margin: 1%;
|
2297 |
float: right;
|
2298 |
width: auto;
|
2299 |
color:#000;
|
2300 |
text-decoration:underline;
|
2301 |
font-size:12px;
|
2302 |
color:#000;
|
2303 |
text-decoration:underline;
|
2304 |
font-size:12px;
|
2305 |
color:#000;
|
2306 |
text-decoration:underline;
|
2307 |
font-size:12px;
|
2308 |
float:left;
|
2309 |
width:100%;
|
2310 |
Result Bar
|
2311 |
..................................
|
2312 |
---------------------------------------------------------------------------
|
2313 |
EXTRAS
|
2314 |
---------------------------------------------------------------------------
|
2315 |
CAPTCHA
|
2316 |
..................................
|
2317 |
width:30px;
|
2318 |
float:left;
|
2319 |
margin-left:5px;
|
2320 |
height:0px;
|
2321 |
break;
|
2322 |
}
|
2323 |
}
|
2324 |
$css.= "#yop-poll-container-%POLL-ID% img {
|
2325 |
max-width: %POLL-WIDTH%;
|
2326 |
$css = addslashes($css);
|
2327 |
$before_vote_template = addslashes( $before_vote_template );
|
2328 |
$sql .= "`before_vote_template` = '{$before_vote_template}',
|
2329 |
$sql .= $wpdb->prepare( ' WHERE name = %s', $template_to_reset );
|
2330 |
return $wpdb->query( $sql );
|
2331 |
}
|
2332 |
return 'html';
|
2333 |
+
<?php
|
2334 |
private static $_instance = NULL;
|
2335 |
protected function __construct() {
|
2336 |
parent::__construct( 'templates' );
|
2337 |
}
|
2338 |
public static function get_instance() {
|
2339 |
if ( self::$_instance == NULL ){
|
2340 |
$class = __CLASS__;
|
2341 |
self::$_instance = new $class;
|
2342 |
}
|
2343 |
return self::$_instance;
|
2344 |
}
|
2345 |
public function manage_templates() {
|
2346 |
switch ( $GLOBALS['page'] ) {
|
2347 |
default:
|
2348 |
$this->manage_options();
|
2349 |
break;
|
2350 |
}
|
2351 |
}
|
2352 |
public function admin_loader() {
|
2353 |
$this->wp_ajax_action( 'yop_poll_add_new_template_config' );
|
2354 |
}
|
2355 |
public function manage_load_templates() {
|
2356 |
wp_enqueue_script( 'yop-poll-admin-templates-js', YOP_POLL_URL . "js/yop-poll-admin-templates.js", array( 'jquery' ), YOP_POLL_VERSION, true );
|
2357 |
wp_enqueue_style( 'yop-poll-timepicker', YOP_POLL_URL . "css/timepicker.css", array(), YOP_POLL_VERSION );
|
2358 |
wp_enqueue_style( 'yop-poll-jquery-ui', YOP_POLL_URL . "css/jquery-ui.css", array(), YOP_POLL_VERSION );
|
2359 |
}
|
2360 |
public function id_used_template($id){
|
2361 |
global $wpdb;
|
2362 |
$results = $wpdb->get_results( $wpdb->prepare( "
|
2363 |
foreach($results as $result){
|
2364 |
$meta=unserialize($result->meta_value);
|
2365 |
// yop_poll_dump($result );
|
2366 |
if($meta['template']==$id||$meta['widget']==$id){
|
2367 |
return false;
|
2368 |
}
|
2369 |
}
|
2370 |
return true;
|
2371 |
}
|
2372 |
private function manage_options() {
|
2373 |
global $page, $action, $message;
|
2374 |
switch ( $action ) {
|
2375 |
case "after-buy":
|
2376 |
YOP_POLL_Pro_Admin::after_buy();
|
2377 |
break;
|
2378 |
case "do-buy":
|
2379 |
YOP_POLL_Pro_Admin::do_buy();
|
2380 |
break;
|
2381 |
case 'add-new-template':
|
2382 |
{
|
2383 |
self:: view_add_edit_templates( 'add-new' );
|
2384 |
break;
|
2385 |
}
|
2386 |
case 'delete':
|
2387 |
{
|
2388 |
$message = $this->delete_templates( $_GET );
|
2389 |
$this->view_templates();
|
2390 |
break;
|
2391 |
}
|
2392 |
case 'clone':
|
2393 |
{
|
2394 |
$message = $this->clone_templates( $_POST );
|
2395 |
$this->view_templates();
|
2396 |
break;
|
2397 |
}
|
2398 |
case 'edit':
|
2399 |
{
|
2400 |
self:: view_add_edit_templates( 'edit' );
|
2401 |
break;
|
2402 |
}
|
2403 |
default: {
|
2404 |
$this->view_templates();
|
2405 |
break;
|
2406 |
}
|
2407 |
}
|
2408 |
}
|
2409 |
public function view_templates() {
|
2410 |
wp_enqueue_script( 'yop-poll-admin-js', YOP_POLL_URL . '/js/polls/yop-poll-admin.js', array(
|
2411 |
'jquery',
|
2412 |
'jquery-ui-datepicker'
|
2413 |
), YOP_POLL_VERSION, true );
|
2414 |
wp_enqueue_style( 'yop-poll-slider-css', YOP_POLL_URL . 'css/yop-poll-slider.css', array(), YOP_POLL_VERSION );
|
2415 |
wp_enqueue_script( 'yop-poll-slider-js', YOP_POLL_URL . 'js/yop-poll-slider.js', array(
|
2416 |
'jquery',
|
2417 |
'jquery-ui-dialog'
|
2418 |
), YOP_POLL_VERSION, true );
|
2419 |
global $wpdb, $message;
|
2420 |
global $page, $action, $orderby, $order, $current_user;
|
2421 |
$orderby = ( empty ( $GLOBALS['orderby'] ) ) ? 'name' : $GLOBALS['orderby'];
|
2422 |
$order = ( empty ( $GLOBALS['order'] ) ) ? 'desc' : $GLOBALS['order'];
|
2423 |
$data['per_page'] = ( isset ( $_REQUEST ['per_page'] ) ? intval( $_REQUEST ['per_page'] ) : 100 );
|
2424 |
$data['page_no'] = isset ( $_REQUEST ['page_no'] ) ? ( int )$_REQUEST ['page_no'] : 1;
|
2425 |
$order_fields = array( 'name', 'last_modified' );
|
2426 |
$data['title'] = __yop_poll( "Templates" );
|
2427 |
$data['REQUEST'] = $_REQUEST;
|
2428 |
$data['poll_url'] =YOP_POLL_URL;
|
2429 |
$data['orderby'] = ( empty ( $data['REQUEST']['orderby'] ) ) ? 'name' : $data['REQUEST']['orderby'];
|
2430 |
$data['order'] = ( empty ( $data['REQUEST']['order'] ) ) ? 'desc' : $data['REQUEST']['order'];
|
2431 |
$data['order_direction'] = $this->make_order_array( $order_fields, 'asc', $orderby, ( 'desc' == $order ) ? 'asc' : 'desc' );
|
2432 |
$data['order_sortable'] = $this->make_order_array( $order_fields, 'sortable', $orderby, 'sorted' );
|
2433 |
$data['order_direction_reverse'] = $this->make_order_array( $order_fields, 'desc', $orderby, ( 'desc' == $order ) ? 'desc' : 'asc' );
|
2434 |
$data['search'] = array( 'fields' => array( 'name', 'last_modified' ), 'value' => isset ( $_REQUEST['s'] ) ? $_REQUEST ['s'] : '' );
|
2435 |
$data['yop_poll_templates'] = Yop_Poll_Model::get_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'], $data['page_no'] - 1, $data['per_page'] );
|
2436 |
$data['total_templates'] = self::count_yop_poll_templates_search( $data['orderby'], $data['order'], $data['search'] );
|
2437 |
$data['message'] = array( 'error' => $message['error'], 'succes' => $message['success'] );
|
2438 |
$data['templates'] = YOP_POLL_MODEL::get_yop_poll_templates_search( 'id', 'desc' );
|
2439 |
$n = count( $data['templates'] );
|
2440 |
for( $i = 0; $i < $n; $i ++ ) {
|
2441 |
$data['templates'][$i]['preview'] = YOP_POLL_Poll_Model::return_template_preview_html( $data['templates'][$i]['id'] );
|
2442 |
}
|
2443 |
if ( intval( $data['page_no'] ) > intval( $data['total_templates'] ) ){
|
2444 |
$data['page_no'] = 1;
|
2445 |
}
|
2446 |
$args = array(
|
2447 |
'base' => remove_query_arg(
|
2448 |
'page_no',
|
2449 |
$_SERVER ['REQUEST_URI'] ) . '%_%',
|
2450 |
'format' => '&page_no=%#%',
|
2451 |
'current' => max( 1, $data['page_no'] ),
|
2452 |
'total' => ceil( $data['total_templates'] / $data['per_page'] ),
|
2453 |
'prev_next' => true,
|
2454 |
'prev_text' => __( '«' ),
|
2455 |
'next_text' => __( '»' )
|
2456 |
);
|
2457 |
$data['pagination'] = paginate_links( $args );
|
2458 |
$_SERVER ['REQUEST_URI'] = remove_query_arg( array( 'action' ), $_SERVER ['REQUEST_URI'] );
|
2459 |
$data['request']['uri'] = $_SERVER["REQUEST_URI"];
|
2460 |
$this->display( 'templates.html', $data );
|
2461 |
}
|
2462 |
private function view_add_edit_templates( $act ) {
|
2463 |
global $action, $current_user;
|
2464 |
add_filter( 'wp_default_editor', 'force_default_editor' );
|
2465 |
$data['title'] = __yop_poll( "Templates" );
|
2466 |
$data['page_name'] = __yop_poll( "Add New Poll Template" );
|
2467 |
$data['action_type'] = $action;
|
2468 |
$data['template_id'] = '';
|
2469 |
if ( 'edit' == $data['action_type'] ){
|
2470 |
$data['template_id'] = ( isset ( $_GET ['id'] ) ? intval( $_GET ['id'] ) : 0 );
|
2471 |
}
|
2472 |
$data['current_template'] = self::get_poll_template_from_database_by_id( $data['template_id'] );
|
2473 |
$data['template_author_name'] = self::get_poll_template_field_from_database_by_id( 1 );
|
2474 |
$this->display( 'templates_add_edit.html', $data );
|
2475 |
}
|
2476 |
public static function count_yop_poll_templates_search( $orderby = 'last_modified', $order = 'desc', $search = array( 'fields' => array(), 'value' => NULL ) ) {
|
2477 |
global $wpdb;
|
2478 |
$sql = "SELECT COUNT(*) AS templates_no FROM " . $wpdb->yop_poll_templates;
|
2479 |
$sql_search = '';
|
2480 |
if ( count( $search['fields'] ) > 0 ){
|
2481 |
$sql_search .= ' ( ';
|
2482 |
foreach ( $search['fields'] as $field ) {
|
2483 |
$sql_search .= $wpdb->prepare( ' `' . $field . '` like \'%%%s%%\' OR', $search['value'] );
|
2484 |
}
|
2485 |
$sql_search = trim( $sql_search, 'OR' );
|
2486 |
$sql_search .= ' ) ';
|
2487 |
}
|
2488 |
if ( count( $search['fields'] ) > 0 ){
|
2489 |
$sql .= ' WHERE ' . $sql_search;
|
2490 |
}
|
2491 |
$sql .= ' ORDER BY ' . $orderby . ' ' . $order;
|
2492 |
$result = $wpdb->get_var( $sql );
|
2493 |
return $result;
|
2494 |
}
|
2495 |
private function delete_templates( $request ) {
|
2496 |
global $message;
|
2497 |
$message['success'] = "";
|
2498 |
$message['error'] = "";
|
2499 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
2500 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
2501 |
foreach ( $bulktemplates as $template_id ) {
|
2502 |
$template_id = ( int )$template_id;
|
2503 |
$message = self::delete_template_from_db( $template_id );
|
2504 |
}
|
2505 |
return $message;
|
2506 |
}
|
2507 |
else {
|
2508 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2509 |
if ( isset ( $_REQUEST ['id'] ) ){
|
2510 |
if(self::id_used_template( $_REQUEST ['id'])){
|
2511 |
self::delete_template_from_db( $_REQUEST['id'] );
|
2512 |
}
|
2513 |
else $message['error']='This template is used to display a poll';
|
2514 |
}
|
2515 |
}
|
2516 |
else {
|
2517 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
2518 |
}
|
2519 |
}
|
2520 |
return $message;
|
2521 |
}
|
2522 |
private function delete_template_from_db( $template_id ) {
|
2523 |
global $wpdb;
|
2524 |
$response['success'] = "";
|
2525 |
$response['error'] = "";
|
2526 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2527 |
if ( current_user_can( 'delete_own_yop_polls_templates' ) ){
|
2528 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2529 |
$template_id ) );
|
2530 |
if ( $sql ){
|
2531 |
$response['success'] = __yop_poll( 'Template deleted' );
|
2532 |
}
|
2533 |
else {
|
2534 |
$response['error'] = __yop_poll( 'Could not delete template from database! Please try again!' );
|
2535 |
}
|
2536 |
}
|
2537 |
else {
|
2538 |
$response['error'] = __yop_poll( 'You do not have enough permission to delete a template' );
|
2539 |
}
|
2540 |
return $response;
|
2541 |
}
|
2542 |
else {
|
2543 |
wp_die( __yop_poll('You do not have enough permission to add a template'));
|
2544 |
}
|
2545 |
}
|
2546 |
private function clone_templates( $request ) {
|
2547 |
global $message;
|
2548 |
$message['success'] = "";
|
2549 |
$message['error'] = "";
|
2550 |
if ( isset ( $_REQUEST ['templatecheck'] ) ){
|
2551 |
$bulktemplates = ( array )$_REQUEST ['templatecheck'];
|
2552 |
foreach ( $bulktemplates as $template_id ) {
|
2553 |
$template_details = self::get_poll_template_from_database_by_id( $template_id );
|
2554 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
2555 |
if ( $template_details ){
|
2556 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
2557 |
$message = self::insert_poll_template_to_database( $template );
|
2558 |
}
|
2559 |
}
|
2560 |
$this->view_templates();
|
2561 |
}
|
2562 |
else {
|
2563 |
if ( isset ( $_REQUEST ['id'] ) ){
|
2564 |
$template_details = self::get_poll_template_from_database_by_id( $_REQUEST ['id'] );
|
2565 |
$clone_number = self::count_poll_template_from_database_like_name( $template_details['name'] . ' - clone' );
|
2566 |
if ( $template_details ){
|
2567 |
$template = array( 'name' => $template_details['name'] . ' - clone' . ( 0 == $clone_number ? '' : $clone_number ), 'before_vote_template' => $template_details['before_vote_template'], 'after_vote_template' => $template_details['after_vote_template'], 'before_start_date_template' => $template_details['before_start_date_template'], 'after_end_date_template' => $template_details['after_end_date_template'], 'css' => $template_details['css'], 'js' => $template_details['js'], 'status' => ( 'default' == $template_details['status'] ) ? 'other' : $template_details['status'], 'date_added' => NULL, 'last_modified' => NULL );
|
2568 |
return self::insert_poll_template_to_database( $template );
|
2569 |
}
|
2570 |
}
|
2571 |
$this->view_templates();
|
2572 |
}
|
2573 |
$this->view_templates();
|
2574 |
}
|
2575 |
private static function get_poll_template_from_database_by_id( $template_id = 0 ) {
|
2576 |
global $wpdb;
|
2577 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
2578 |
return $result;
|
2579 |
}
|
2580 |
private static function count_poll_template_from_database_like_name( $template_name ) {
|
2581 |
global $wpdb;
|
2582 |
$result = $wpdb->get_var( $wpdb->prepare( "
|
2583 |
return $result;
|
2584 |
}
|
2585 |
private static function insert_poll_template_to_database( $template ) {
|
2586 |
$response['success'] = "";
|
2587 |
$response['error'] = "";
|
2588 |
global $wpdb;
|
2589 |
global $current_user;
|
2590 |
wp_get_current_user();
|
2591 |
if( check_admin_referer('yop-poll-templates-add-edit-action', 'yop-poll-templates-add-edit-name') ) {
|
2592 |
if ( current_user_can( 'clone_own_yop_polls_templates' ) ){
|
2593 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2594 |
if ( $sql ){
|
2595 |
$response['success'] = __yop_poll( 'Template cloned!' );
|
2596 |
}
|
2597 |
else {
|
2598 |
$response['error'] = __yop_poll( 'Could not clone template from database! Please try again!' );
|
2599 |
}
|
2600 |
}
|
2601 |
else {
|
2602 |
$response['error'] = __yop_poll( 'You do not have enough permission to clone a template' );
|
2603 |
}
|
2604 |
return $response;
|
2605 |
}
|
2606 |
else {
|
2607 |
wp_die( __yop_poll( 'You do not have enough permission to add a template' ) );
|
2608 |
}
|
2609 |
}
|
2610 |
public function do_add_edit_template() {
|
2611 |
if ( 'add-new' == $_POST['action'] ){
|
2612 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
2613 |
wp_die( __yop_poll( 'You are not allowed to edit this item.' ) );
|
2614 |
}
|
2615 |
}
|
2616 |
self::save_template();
|
2617 |
}
|
2618 |
public function do_reset_template() {
|
2619 |
if ( ( !current_user_can( 'edit_yop_polls_templates' ) ) && ( !current_user_can( 'edit_yop_polls' ) ) ){
|
2620 |
wp_die( __yop_poll( 'You are not allowed to reset this item.' ) );
|
2621 |
}
|
2622 |
self::reset_template();
|
2623 |
}
|
2624 |
private static function reset_template() {
|
2625 |
$template['name'] = $_POST['yop_poll_template_name'];
|
2626 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
2627 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
2628 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
2629 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
2630 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
2631 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
2632 |
$template['status'] = "other";
|
2633 |
$template['id'] = $_POST['template_id'];
|
2634 |
$data['action'] = $_POST['action'];
|
2635 |
$data['name'] = $_POST['yop_poll_reset_template_id'];
|
2636 |
$result = self::add_update_templates_in_database( $data['action'], $data['name'], $template['name'] );
|
2637 |
if ( $result ){
|
2638 |
wp_die( __yop_poll( 'Template reseted!' ) );
|
2639 |
}
|
2640 |
else {
|
2641 |
wp_die( __yop_poll( 'Could not resete template in database! Please try again!' ) );
|
2642 |
}
|
2643 |
}
|
2644 |
private static function save_template() {
|
2645 |
$template['name'] = $_POST['yop_poll_template_name'];
|
2646 |
$template['before_vote_template'] = $_POST['yop-poll-before-vote-template-input'];
|
2647 |
$template['after_vote_template'] = $_POST['yop-poll-after-vote-template-input'];
|
2648 |
$template['before_start_date_template'] = $_POST['yop-poll-template-before-start-date-input'];
|
2649 |
$template['after_end_date_template'] = $_POST['yop-poll-template-after-end-date-input'];
|
2650 |
$template['css'] = $_POST['yop-poll-template-css-input'];
|
2651 |
$template['js'] = $_POST['yop-poll-template-js-input'];
|
2652 |
$template['status'] = "other";
|
2653 |
$template['id'] = $_POST['template_id'];
|
2654 |
if ( $_POST['action_type'] == "add-new-template" ){
|
2655 |
if ( $template['name'] != "" ){
|
2656 |
$result = self::get_poll_template_from_database_by_name( $template['name'] );
|
2657 |
if ( $result ){
|
2658 |
wp_die( __yop_poll( 'This template already exists! Please choose another name!' ) );
|
2659 |
}
|
2660 |
}
|
2661 |
else {
|
2662 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
2663 |
}
|
2664 |
$result = self:: insert_poll_template_to_database( $template );
|
2665 |
if ( $result ){
|
2666 |
wp_die( __yop_poll( 'Template added!' ) );
|
2667 |
}
|
2668 |
else {
|
2669 |
wp_die( __yop_poll( 'Could not add template in database! Please try again!' ) );
|
2670 |
}
|
2671 |
}
|
2672 |
else {
|
2673 |
if ( $_POST['action_type'] == "edit" ){
|
2674 |
if ( $template['name'] == "" ){
|
2675 |
wp_die( __yop_poll( 'Please enter a template name!' ) );
|
2676 |
}
|
2677 |
else {
|
2678 |
$result = self:: update_poll_template_in_database( $template );
|
2679 |
if ( $result ){
|
2680 |
wp_die( __yop_poll( 'Template edited!' ) );
|
2681 |
}
|
2682 |
else {
|
2683 |
wp_die( __yop_poll( 'Could not edit template in database! Please try again!' ) );
|
2684 |
}
|
2685 |
}
|
2686 |
}
|
2687 |
}
|
2688 |
}
|
2689 |
private static function get_poll_template_field_from_database_by_id( $template_id ) {
|
2690 |
global $wpdb;
|
2691 |
$result = $wpdb->get_row( $wpdb->prepare( "
|
2692 |
return $result;
|
2693 |
}
|
2694 |
private static function get_poll_template_from_database_by_name( $template_name ) {
|
2695 |
global $wpdb;
|
2696 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2697 |
return $sql;
|
2698 |
}
|
2699 |
private static function update_poll_template_in_database( $template ) {
|
2700 |
global $wpdb;
|
2701 |
$sql = $wpdb->query( $wpdb->prepare( "
|
2702 |
return $sql;
|
2703 |
}
|
2704 |
private static function add_update_templates_in_database( $action = 'add', $template_name, $template_to_reset ) {
|
2705 |
global $wpdb;
|
2706 |
global $current_user;
|
2707 |
wp_get_current_user();
|
2708 |
$sql = "UPDATE `" . $wpdb->yop_poll_templates . "` SET ";
|
2709 |
$before_vote_template = <<<NOWDOC
|
2710 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2711 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2712 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2713 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2714 |
[ANSWER_RESULT_CONTAINER]
|
2715 |
[/ANSWER_RESULT_CONTAINER]
|
2716 |
class = "yop-poll-results-text-%POLL-ID%">%POLL-ANSWER-RESULT-LABEL%</span>
|
2717 |
$after_vote_template = <<<NOWDOC
|
2718 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2719 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2720 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2721 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2722 |
class = "pds-feedback-result-%POLL-ID%">
|
2723 |
<div>
|
2724 |
%POLL-ANSWER-RESULT-BAR%
|
2725 |
</div>
|
2726 |
$after_vote_template = addslashes( $after_vote_template );
|
2727 |
$before_start_date_template = <<<NOWDOC
|
2728 |
start on %POLL-START-DATE%<br>
|
2729 |
$before_start_date_template = addslashes( $before_start_date_template );
|
2730 |
$after_end_date_template = <<<NOWDOC
|
2731 |
class = "yop-poll-question-%POLL-ID%">%POLL-QUESTION%</div>
|
2732 |
[ANSWER_DESCRIPTION_CONTAINER]
|
2733 |
<span class = "yop-poll-description-%POLL-ID%">%ANSWER-DESCRIPTION%</span>
|
2734 |
[/ANSWER_DESCRIPTION_CONTAINER]
|
2735 |
class = "pds-feedback-result-%POLL-ID%">
|
2736 |
<div>
|
2737 |
%POLL-ANSWER-RESULT-BAR%
|
2738 |
</div>
|
2739 |
$after_end_date_template = addslashes( $after_end_date_template );
|
2740 |
$js = <<<NOWDOC
|
2741 |
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
2742 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
2743 |
var quest=0;
|
2744 |
if ( findWidest ) {
|
2745 |
obj.each(function() {
|
2746 |
var thisWidth = jQuery(this).width();
|
2747 |
width = parseInt(thisWidth / cols);
|
2748 |
jQuery(this).width(width);
|
2749 |
jQuery(this).css("float", "left");
|
2750 |
});
|
2751 |
}
|
2752 |
else {
|
2753 |
var widest = 0;
|
2754 |
var count = 0;
|
2755 |
var poz_each_question=0;
|
2756 |
obj.each(function() {
|
2757 |
count++;
|
2758 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
2759 |
var thisWidth = jQuery(this).width();
|
2760 |
if(thisWidth > widest) {
|
2761 |
widest = thisWidth;
|
2762 |
}
|
2763 |
if(count<cols[quest][2])
|
2764 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
2765 |
if(cols[quest][0]==1)
|
2766 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("width","100%");
|
2767 |
else
|
2768 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2769 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2770 |
}
|
2771 |
else
|
2772 |
{
|
2773 |
count=0;
|
2774 |
width = parseInt( %POLL-WIDTH% / cols[quest][0]);
|
2775 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2776 |
jQuery(".yop-poll-li-answer-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2777 |
quest++;
|
2778 |
}
|
2779 |
});
|
2780 |
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
|
2781 |
var quest=0;
|
2782 |
if ( findWidest ) {
|
2783 |
obj.each(function() {
|
2784 |
var thisWidth = jQuery(this).width();
|
2785 |
width = parseInt(thisWidth / cols);
|
2786 |
jQuery(this).width(width);
|
2787 |
jQuery(this).css("float", "left");
|
2788 |
});
|
2789 |
}
|
2790 |
else {
|
2791 |
var widest = 0;
|
2792 |
var count = 0;
|
2793 |
var poz_each_question=0;
|
2794 |
obj.each(function() {
|
2795 |
count++;
|
2796 |
cols[quest][2]=(jQuery('#yop-poll-answers-%POLL-ID%-'+ cols[quest][3] +' li').length);
|
2797 |
var thisWidth = jQuery(this).width();
|
2798 |
if(thisWidth > widest) {
|
2799 |
widest = thisWidth;
|
2800 |
}
|
2801 |
if(count<cols[quest][2])
|
2802 |
{ width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
2803 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2804 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2805 |
}
|
2806 |
else
|
2807 |
{
|
2808 |
count=0;
|
2809 |
width = parseInt( %POLL-WIDTH% / cols[quest][1]);
|
2810 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).width(width-20);
|
2811 |
jQuery(".yop-poll-li-result-%POLL-ID%-"+cols[quest][3]).css("float", "left");
|
2812 |
quest++;
|
2813 |
}
|
2814 |
});
|
2815 |
$js = addslashes( $js );
|
2816 |
$css = "";
|
2817 |
switch( $template_name ) {
|
2818 |
case 'White':
|
2819 |
{ //White
|
2820 |
$css = <<<NOWDOC
|
2821 |
Main Container
|
2822 |
---------------------------------------------------------------------------
|
2823 |
background:#fff;
|
2824 |
box-sizing: border-box;
|
2825 |
color: #555;
|
2826 |
display: inline-block;
|
2827 |
font-size: 14px;
|
2828 |
padding: 10px;
|
2829 |
width: %POLL-WIDTH%;
|
2830 |
zoom: 1;
|
2831 |
Error message
|
2832 |
..................................
|
2833 |
font-size:.8em;
|
2834 |
font-style:italic;
|
2835 |
color:red;
|
2836 |
text-transform:lowercase;
|
2837 |
text-align:center;
|
2838 |
Success message
|
2839 |
..................................
|
2840 |
font-size:.8em;
|
2841 |
font-style:italic;
|
2842 |
color:green;
|
2843 |
text-align:center;
|
2844 |
Poll Question
|
2845 |
---------------------------------------------------------------------------
|
2846 |
border: 0 none;
|
2847 |
margin: 0 0 2em;
|
2848 |
padding: .25em;
|
2849 |
text-align: center;
|
2850 |
font-size: 14px;
|
2851 |
Poll Options / Answers
|
2852 |
---------------------------------------------------------------------------
|
2853 |
list-style: none;
|
2854 |
margin: 0;
|
2855 |
padding: 0;
|
2856 |
list-style: none;
|
2857 |
margin: 0;
|
2858 |
padding: 0;
|
2859 |
font-size: 14px;
|
2860 |
line-height: 2em;
|
2861 |
Label
|
2862 |
..................................
|
2863 |
margin:0px;
|
2864 |
font-style:normal;
|
2865 |
font-weight:normal;
|
2866 |
font-size:14px;
|
2867 |
float:none;
|
2868 |
display:inline-block;
|
2869 |
Custom answer / Other
|
2870 |
..................................
|
2871 |
width: 100%;
|
2872 |
overflow: hidden;
|
2873 |
width: 94%;
|
2874 |
overflow: hidden;
|
2875 |
Custom checkbox and radio button style
|
2876 |
---------------------------------------------------------------------------
|
2877 |
Custom fields
|
2878 |
---------------------------------------------------------------------------
|
2879 |
clear: both;
|
2880 |
list-style: none;
|
2881 |
margin: 0;
|
2882 |
padding: 0;
|
2883 |
overflow: hidden;
|
2884 |
width: 100%;
|
2885 |
display: block;
|
2886 |
font-size:14px;
|
2887 |
list-style: none;
|
2888 |
display: block;
|
2889 |
width: 94%;
|
2890 |
Vote Button
|
2891 |
---------------------------------------------------------------------------
|
2892 |
cursor:pointer;
|
2893 |
display: block;
|
2894 |
font-size:14px;
|
2895 |
margin: 0 auto;
|
2896 |
}
|
2897 |
Results
|
2898 |
---------------------------------------------------------------------------
|
2899 |
font-size: 12px;
|
2900 |
font-style: italic;
|
2901 |
font-weight: normal;
|
2902 |
margin-left: 15px;
|
2903 |
color: #38595E;
|
2904 |
Style for results that are displayed on columns
|
2905 |
..................................
|
2906 |
float: left;
|
2907 |
display: inline-block;
|
2908 |
width: 46%;
|
2909 |
padding: 1%;
|
2910 |
margin: 1%;
|
2911 |
float: right;
|
2912 |
width: auto;
|
2913 |
color:#000;
|
2914 |
text-decoration:underline;
|
2915 |
font-size:12px;
|
2916 |
color:#000;
|
2917 |
text-decoration:underline;
|
2918 |
font-size:12px;
|
2919 |
color:#000;
|
2920 |
text-decoration:underline;
|
2921 |
font-size:12px;
|
2922 |
float:left;
|
2923 |
width:100%;
|
2924 |
Result Bar
|
2925 |
..................................
|
2926 |
---------------------------------------------------------------------------
|
2927 |
EXTRAS
|
2928 |
---------------------------------------------------------------------------
|
2929 |
CAPTCHA
|
2930 |
..................................
|
2931 |
width:30px;
|
2932 |
float:left;
|
2933 |
margin-left:5px;
|
2934 |
height:0px;
|
2935 |
break;
|
2936 |
}
|
2937 |
case 'Grey':
|
2938 |
{ //Grey
|
2939 |
$css = <<<NOWDOC
|
2940 |
Main Container
|
2941 |
---------------------------------------------------------------------------
|
2942 |
background:#eee;
|
2943 |
box-sizing: border-box;
|
2944 |
color: #fff;
|
2945 |
display: inline-block;
|
2946 |
font-size: 14px;
|
2947 |
color:#000;
|
2948 |
padding: 10px;
|
2949 |
width: %POLL-WIDTH%;
|
2950 |
zoom: 1;
|
2951 |
Error message
|
2952 |
..................................
|
2953 |
font-size:.8em;
|
2954 |
font-style:italic;
|
2955 |
color:red;
|
2956 |
text-transform:lowercase;
|
2957 |
text-align:center;
|
2958 |
Success message
|
2959 |
..................................
|
2960 |
font-size:.8em;
|
2961 |
font-style:italic;
|
2962 |
color:green;
|
2963 |
text-align:center;
|
2964 |
Poll Question
|
2965 |
---------------------------------------------------------------------------
|
2966 |
border: 0 none;
|
2967 |
margin: 0 0 2em;
|
2968 |
padding: .25em;
|
2969 |
text-align: center;
|
2970 |
font-size: 14px;
|
2971 |
Poll Options / Answers
|
2972 |
---------------------------------------------------------------------------
|
2973 |
list-style: none;
|
2974 |
margin: 0;
|
2975 |
padding: 0;
|
2976 |
list-style: none;
|
2977 |
margin: 0;
|
2978 |
padding: 0;
|
2979 |
font-size: 14px;
|
2980 |
line-height: 2em;
|
2981 |
Label
|
2982 |
..................................
|
2983 |
margin:0px;
|
2984 |
font-style:normal;
|
2985 |
font-weight:normal;
|
2986 |
font-size:14px;
|
2987 |
float:none;
|
2988 |
display:inline-block;
|
2989 |
Custom answer / Other
|
2990 |
..................................
|
2991 |
width: 100%;
|
2992 |
overflow: hidden;
|
2993 |
width: 94%;
|
2994 |
overflow: hidden;
|
2995 |
Custom checkbox and radio button style
|
2996 |
---------------------------------------------------------------------------
|
2997 |
Custom fields
|
2998 |
---------------------------------------------------------------------------
|
2999 |
clear: both;
|
3000 |
list-style: none;
|
3001 |
margin: 0;
|
3002 |
padding: 0;
|
3003 |
overflow: hidden;
|
3004 |
width: 100%;
|
3005 |
display: block;
|
3006 |
font-size:14px;
|
3007 |
list-style: none;
|
3008 |
display: block;
|
3009 |
width: 94%;
|
3010 |
Vote Button
|
3011 |
---------------------------------------------------------------------------
|
3012 |
cursor:pointer;
|
3013 |
display: block;
|
3014 |
font-size:14px;
|
3015 |
margin: 0 auto;
|
3016 |
}
|
3017 |
Results
|
3018 |
---------------------------------------------------------------------------
|
3019 |
font-size: 12px;
|
3020 |
font-style: italic;
|
3021 |
font-weight: normal;
|
3022 |
margin-left: 15px;
|
3023 |
color: #38595E;
|
3024 |
Style for results that are displayed on columns
|
3025 |
..................................
|
3026 |
float: left;
|
3027 |
display: inline-block;
|
3028 |
width: 46%;
|
3029 |
padding: 1%;
|
3030 |
margin: 1%;
|
3031 |
float: right;
|
3032 |
width: auto;
|
3033 |
color:#000;
|
3034 |
text-decoration:underline;
|
3035 |
font-size:12px;
|
3036 |
color:#000;
|
3037 |
text-decoration:underline;
|
3038 |
font-size:12px;
|
3039 |
color:#000;
|
3040 |
text-decoration:underline;
|
3041 |
font-size:12px;
|
3042 |
float:left;
|
3043 |
width:100%;
|
3044 |
Result Bar
|
3045 |
..................................
|
3046 |
---------------------------------------------------------------------------
|
3047 |
EXTRAS
|
3048 |
---------------------------------------------------------------------------
|
3049 |
CAPTCHA
|
3050 |
..................................
|
3051 |
width:30px;
|
3052 |
float:left;
|
3053 |
margin-left:5px;
|
3054 |
height:0px;
|
3055 |
break;
|
3056 |
}
|
3057 |
case 'Dark':
|
3058 |
{ //Dark
|
3059 |
$css = <<<NOWDOC
|
3060 |
Main Container
|
3061 |
---------------------------------------------------------------------------
|
3062 |
background:#555;
|
3063 |
box-sizing: border-box;
|
3064 |
color: #fff;
|
3065 |
display: inline-block;
|
3066 |
font-size: 14px;
|
3067 |
padding: 10px;
|
3068 |
width: %POLL-WIDTH%;
|
3069 |
zoom: 1;
|
3070 |
Error message
|
3071 |
..................................
|
3072 |
font-size:.8em;
|
3073 |
font-style:italic;
|
3074 |
color:red;
|
3075 |
text-transform:lowercase;
|
3076 |
text-align:center;
|
3077 |
Success message
|
3078 |
..................................
|
3079 |
font-size:.8em;
|
3080 |
font-style:italic;
|
3081 |
color:green;
|
3082 |
text-align:center;
|
3083 |
Poll Question
|
3084 |
---------------------------------------------------------------------------
|
3085 |
border: 0 none;
|
3086 |
margin: 0 0 2em;
|
3087 |
padding: .25em;
|
3088 |
text-align: center;
|
3089 |
font-size: 14px;
|
3090 |
Poll Options / Answers
|
3091 |
---------------------------------------------------------------------------
|
3092 |
list-style: none;
|
3093 |
margin: 0;
|
3094 |
padding: 0;
|
3095 |
list-style: none;
|
3096 |
margin: 0;
|
3097 |
padding: 0;
|
3098 |
font-size: 14px;
|
3099 |
line-height: 2em;
|
3100 |
Label
|
3101 |
..................................
|
3102 |
margin:0px;
|
3103 |
font-style:normal;
|
3104 |
font-weight:normal;
|
3105 |
font-size:14px;
|
3106 |
float:none;
|
3107 |
display:inline-block;
|
3108 |
Custom answer / Other
|
3109 |
..................................
|
3110 |
width: 100%;
|
3111 |
overflow: hidden;
|
3112 |
width: 94%;
|
3113 |
overflow: hidden;
|
3114 |
Custom checkbox and radio button style
|
3115 |
---------------------------------------------------------------------------
|
3116 |
Custom fields
|
3117 |
---------------------------------------------------------------------------
|
3118 |
clear: both;
|
3119 |
list-style: none;
|
3120 |
margin: 0;
|
3121 |
padding: 0;
|
3122 |
overflow: hidden;
|
3123 |
width: 100%;
|
3124 |
display: block;
|
3125 |
font-size:14px;
|
3126 |
list-style: none;
|
3127 |
display: block;
|
3128 |
width: 94%;
|
3129 |
Vote Button
|
3130 |
---------------------------------------------------------------------------
|
3131 |
cursor:pointer;
|
3132 |
display: block;
|
3133 |
font-size:14px;
|
3134 |
margin: 0 auto;
|
3135 |
}
|
3136 |
Results
|
3137 |
---------------------------------------------------------------------------
|
3138 |
font-size: 12px;
|
3139 |
font-style: italic;
|
3140 |
font-weight: normal;
|
3141 |
margin-left: 15px;
|
3142 |
color: #38595E;
|
3143 |
Style for results that are displayed on columns
|
3144 |
..................................
|
3145 |
float: left;
|
3146 |
display: inline-block;
|
3147 |
width: 46%;
|
3148 |
padding: 1%;
|
3149 |
margin: 1%;
|
3150 |
float: right;
|
3151 |
width: auto;
|
3152 |
color:#000;
|
3153 |
text-decoration:underline;
|
3154 |
font-size:12px;
|
3155 |
color:#000;
|
3156 |
text-decoration:underline;
|
3157 |
font-size:12px;
|
3158 |
color:#000;
|
3159 |
text-decoration:underline;
|
3160 |
font-size:12px;
|
3161 |
float:left;
|
3162 |
width:100%;
|
3163 |
Result Bar
|
3164 |
..................................
|
3165 |
---------------------------------------------------------------------------
|
3166 |
EXTRAS
|
3167 |
---------------------------------------------------------------------------
|
3168 |
CAPTCHA
|
3169 |
..................................
|
3170 |
width:30px;
|
3171 |
float:left;
|
3172 |
margin-left:5px;
|
3173 |
height:0px;
|
3174 |
break;
|
3175 |
}
|
3176 |
case 'Blue v1':
|
3177 |
{ //Blue v1
|
3178 |
$css = <<<NOWDOC
|
3179 |
Main Container
|
3180 |
---------------------------------------------------------------------------
|
3181 |
background:#327BD6;
|
3182 |
box-sizing: border-box;
|
3183 |
color: #fff;
|
3184 |
display: inline-block;
|
3185 |
font-size: 14px;
|
3186 |
padding: 10px;
|
3187 |
width: %POLL-WIDTH%;
|
3188 |
zoom: 1;
|
3189 |
Error message
|
3190 |
..................................
|
3191 |
font-size:.8em;
|
3192 |
font-style:italic;
|
3193 |
color:red;
|
3194 |
text-transform:lowercase;
|
3195 |
text-align:center;
|
3196 |
Success message
|
3197 |
..................................
|
3198 |
font-size:.8em;
|
3199 |
font-style:italic;
|
3200 |
color:green;
|
3201 |
text-align:center;
|
3202 |
Poll Question
|
3203 |
---------------------------------------------------------------------------
|
3204 |
border: 0 none;
|
3205 |
margin: 0 0 2em;
|
3206 |
padding: .25em;
|
3207 |
text-align: center;
|
3208 |
font-size: 14px;
|
3209 |
Poll Options / Answers
|
3210 |
---------------------------------------------------------------------------
|
3211 |
list-style: none;
|
3212 |
margin: 0;
|
3213 |
padding: 0;
|
3214 |
list-style: none;
|
3215 |
margin: 0;
|
3216 |
padding: 0;
|
3217 |
font-size: 14px;
|
3218 |
line-height: 2em;
|
3219 |
Label
|
3220 |
..................................
|
3221 |
margin:0px;
|
3222 |
font-style:normal;
|
3223 |
font-weight:normal;
|
3224 |
font-size:14px;
|
3225 |
float:none;
|
3226 |
display:inline-block;
|
3227 |
Custom answer / Other
|
3228 |
..................................
|
3229 |
width: 100%;
|
3230 |
overflow: hidden;
|
3231 |
width: 94%;
|
3232 |
overflow: hidden;
|
3233 |
Custom checkbox and radio button style
|
3234 |
---------------------------------------------------------------------------
|
3235 |
Custom fields
|
3236 |
---------------------------------------------------------------------------
|
3237 |
clear: both;
|
3238 |
list-style: none;
|
3239 |
margin: 0;
|
3240 |
padding: 0;
|
3241 |
overflow: hidden;
|
3242 |
width: 100%;
|
3243 |
display: block;
|
3244 |
font-size:14px;
|
3245 |
list-style: none;
|
3246 |
display: block;
|
3247 |
width: 94%;
|
3248 |
Vote Button
|
3249 |
---------------------------------------------------------------------------
|
3250 |
cursor:pointer;
|
3251 |
display: block;
|
3252 |
font-size:14px;
|
3253 |
margin: 0 auto;
|
3254 |
}
|
3255 |
Results
|
3256 |
---------------------------------------------------------------------------
|
3257 |
font-size: 12px;
|
3258 |
font-style: italic;
|
3259 |
font-weight: normal;
|
3260 |
margin-left: 15px;
|
3261 |
color: #38595E;
|
3262 |
Style for results that are displayed on columns
|
3263 |
..................................
|
3264 |
float: left;
|
3265 |
display: inline-block;
|
3266 |
width: 46%;
|
3267 |
padding: 1%;
|
3268 |
margin: 1%;
|
3269 |
float: right;
|
3270 |
width: auto;
|
3271 |
color:#000;
|
3272 |
text-decoration:underline;
|
3273 |
font-size:12px;
|
3274 |
color:#000;
|
3275 |
text-decoration:underline;
|
3276 |
font-size:12px;
|
3277 |
color:#000;
|
3278 |
text-decoration:underline;
|
3279 |
font-size:12px;
|
3280 |
float:left;
|
3281 |
width:100%;
|
3282 |
Result Bar
|
3283 |
..................................
|
3284 |
---------------------------------------------------------------------------
|
3285 |
EXTRAS
|
3286 |
---------------------------------------------------------------------------
|
3287 |
CAPTCHA
|
3288 |
..................................
|
3289 |
width:30px;
|
3290 |
float:left;
|
3291 |
margin-left:5px;
|
3292 |
height:0px;
|
3293 |
break;
|
3294 |
}
|
3295 |
case 'Blue v2':
|
3296 |
{ //Blue v2
|
3297 |
$css = <<<NOWDOC
|
3298 |
Main Container
|
3299 |
---------------------------------------------------------------------------
|
3300 |
background:#fff;
|
3301 |
box-sizing: border-box;
|
3302 |
display: inline-block;
|
3303 |
font-size: 14px;
|
3304 |
color:#555;
|
3305 |
padding: 10px;
|
3306 |
width: %POLL-WIDTH%;
|
3307 |
zoom: 1;
|
3308 |
Error message
|
3309 |
..................................
|
3310 |
font-size:.8em;
|
3311 |
font-style:italic;
|
3312 |
color:red;
|
3313 |
text-transform:lowercase;
|
3314 |
text-align:center;
|
3315 |
Success message
|
3316 |
..................................
|
3317 |
font-size:.8em;
|
3318 |
font-style:italic;
|
3319 |
color:green;
|
3320 |
text-align:center;
|
3321 |
Poll Question
|
3322 |
---------------------------------------------------------------------------
|
3323 |
background:#327BD6;
|
3324 |
color:#fff;
|
3325 |
border: 0 none;
|
3326 |
margin: 0 0 2em;
|
3327 |
padding: .25em;
|
3328 |
text-align: center;
|
3329 |
font-size: 14px;
|
3330 |
Poll Options / Answers
|
3331 |
---------------------------------------------------------------------------
|
3332 |
list-style: none;
|
3333 |
margin: 0;
|
3334 |
padding: 0;
|
3335 |
list-style: none;
|
3336 |
margin: 0;
|
3337 |
padding: 0;
|
3338 |
font-size: 14px;
|
3339 |
line-height: 2em;
|
3340 |
Label
|
3341 |
..................................
|
3342 |
margin:0px;
|
3343 |
font-style:normal;
|
3344 |
font-weight:normal;
|
3345 |
font-size:14px;
|
3346 |
float:none;
|
3347 |
display:inline-block;
|
3348 |
Custom answer / Other
|
3349 |
..................................
|
3350 |
width: 100%;
|
3351 |
overflow: hidden;
|
3352 |
width: 94%;
|
3353 |
overflow: hidden;
|
3354 |
Custom checkbox and radio button style
|
3355 |
---------------------------------------------------------------------------
|
3356 |
Custom fields
|
3357 |
---------------------------------------------------------------------------
|
3358 |
clear: both;
|
3359 |
list-style: none;
|
3360 |
margin: 0;
|
3361 |
padding: 0;
|
3362 |
overflow: hidden;
|
3363 |
width: 100%;
|
3364 |
display: block;
|
3365 |
font-size:14px;
|
3366 |
list-style: none;
|
3367 |
display: block;
|
3368 |
width: 94%;
|
3369 |
Vote Button
|
3370 |
---------------------------------------------------------------------------
|
3371 |
cursor:pointer;
|
3372 |
display: block;
|
3373 |
font-size:14px;
|
3374 |
margin: 0 auto;
|
3375 |
}
|
3376 |
Results
|
3377 |
---------------------------------------------------------------------------
|
3378 |
font-size: 12px;
|
3379 |
font-style: italic;
|
3380 |
font-weight: normal;
|
3381 |
margin-left: 15px;
|
3382 |
color: #38595E;
|
3383 |
Style for results that are displayed on columns
|
3384 |
..................................
|
3385 |
float: left;
|
3386 |
display: inline-block;
|
3387 |
width: 46%;
|
3388 |
padding: 1%;
|
3389 |
margin: 1%;
|
3390 |
float: right;
|
3391 |
width: auto;
|
3392 |
color:#000;
|
3393 |
text-decoration:underline;
|
3394 |
font-size:12px;
|
3395 |
color:#000;
|
3396 |
text-decoration:underline;
|
3397 |
font-size:12px;
|
3398 |
color:#000;
|
3399 |
text-decoration:underline;
|
3400 |
font-size:12px;
|
3401 |
float:left;
|
3402 |
width:100%;
|
3403 |
Result Bar
|
3404 |
..................................
|
3405 |
---------------------------------------------------------------------------
|
3406 |
EXTRAS
|
3407 |
---------------------------------------------------------------------------
|
3408 |
CAPTCHA
|
3409 |
..................................
|
3410 |
width:30px;
|
3411 |
float:left;
|
3412 |
margin-left:5px;
|
3413 |
height:0px;
|
3414 |
break;
|
3415 |
}
|
3416 |
case 'Blue v3':
|
3417 |
{ //Blue v3
|
3418 |
$css = <<<NOWDOC
|
3419 |
Main Container
|
3420 |
---------------------------------------------------------------------------
|
3421 |
background:#fff;
|
3422 |
box-sizing: border-box;
|
3423 |
display: inline-block;
|
3424 |
font-size: 14px;
|
3425 |
color:#555;
|
3426 |
padding: 10px;
|
3427 |
width: %POLL-WIDTH%;
|
3428 |
zoom: 1;
|
3429 |
border: 5px solid #327BD6;
|
3430 |
Error message
|
3431 |
..................................
|
3432 |
font-size:.8em;
|
3433 |
font-style:italic;
|
3434 |
color:red;
|
3435 |
text-transform:lowercase;
|
3436 |
text-align:center;
|
3437 |
Success message
|
3438 |
..................................
|
3439 |
font-size:.8em;
|
3440 |
font-style:italic;
|
3441 |
color:green;
|
3442 |
text-align:center;
|
3443 |
Poll Question
|
3444 |
---------------------------------------------------------------------------
|
3445 |
border: 0 none;
|
3446 |
margin: 0 0 2em;
|
3447 |
padding: .25em;
|
3448 |
text-align: center;
|
3449 |
font-size: 14px;
|
3450 |
Poll Options / Answers
|
3451 |
---------------------------------------------------------------------------
|
3452 |
list-style: none;
|
3453 |
margin: 0;
|
3454 |
padding: 0;
|
3455 |
list-style: none;
|
3456 |
margin: 0;
|
3457 |
padding: 0;
|
3458 |
font-size: 14px;
|
3459 |
line-height: 2em;
|
3460 |
Label
|
3461 |
..................................
|
3462 |
margin:0px;
|
3463 |
font-style:normal;
|
3464 |
font-weight:normal;
|
3465 |
font-size:14px;
|
3466 |
float:none;
|
3467 |
display:inline-block;
|
3468 |
Custom answer / Other
|
3469 |
..................................
|
3470 |
width: 100%;
|
3471 |
overflow: hidden;
|
3472 |
width: 94%;
|
3473 |
overflow: hidden;
|
3474 |
Custom checkbox and radio button style
|
3475 |
---------------------------------------------------------------------------
|
3476 |
Custom fields
|
3477 |
---------------------------------------------------------------------------
|
3478 |
clear: both;
|
3479 |
list-style: none;
|
3480 |
margin: 0;
|
3481 |
padding: 0;
|
3482 |
overflow: hidden;
|
3483 |
width: 100%;
|
3484 |
display: block;
|
3485 |
font-size:14px;
|
3486 |
list-style: none;
|
3487 |
display: block;
|
3488 |
width: 94%;
|
3489 |
Vote Button
|
3490 |
---------------------------------------------------------------------------
|
3491 |
cursor:pointer;
|
3492 |
display: block;
|
3493 |
font-size:14px;
|
3494 |
margin: 0 auto;
|
3495 |
}
|
3496 |
Results
|
3497 |
---------------------------------------------------------------------------
|
3498 |
font-size: 12px;
|
3499 |
font-style: italic;
|
3500 |
font-weight: normal;
|
3501 |
margin-left: 15px;
|
3502 |
color: #38595E;
|
3503 |
Style for results that are displayed on columns
|
3504 |
..................................
|
3505 |
float: left;
|
3506 |
display: inline-block;
|
3507 |
width: 46%;
|
3508 |
padding: 1%;
|
3509 |
margin: 1%;
|
3510 |
float: right;
|
3511 |
width: auto;
|
3512 |
color:#000;
|
3513 |
text-decoration:underline;
|
3514 |
font-size:12px;
|
3515 |
color:#000;
|
3516 |
text-decoration:underline;
|
3517 |
font-size:12px;
|
3518 |
color:#000;
|
3519 |
text-decoration:underline;
|
3520 |
font-size:12px;
|
3521 |
float:left;
|
3522 |
width:100%;
|
3523 |
Result Bar
|
3524 |
..................................
|
3525 |
---------------------------------------------------------------------------
|
3526 |
EXTRAS
|
3527 |
---------------------------------------------------------------------------
|
3528 |
CAPTCHA
|
3529 |
..................................
|
3530 |
width:30px;
|
3531 |
float:left;
|
3532 |
margin-left:5px;
|
3533 |
height:0px;
|
3534 |
break;
|
3535 |
}
|
3536 |
case 'Red v1':
|
3537 |
{ //Red v1
|
3538 |
$css = <<<NOWDOC
|
3539 |
Main Container
|
3540 |
---------------------------------------------------------------------------
|
3541 |
background:#B70004;
|
3542 |
box-sizing: border-box;
|
3543 |
display: inline-block;
|
3544 |
font-size: 14px;
|
3545 |
color:white;
|
3546 |
padding: 10px;
|
3547 |
width: %POLL-WIDTH%;
|
3548 |
zoom: 1;
|
3549 |
Error message
|
3550 |
..................................
|
3551 |
font-size:.8em;
|
3552 |
font-style:italic;
|
3553 |
color:red;
|
3554 |
text-transform:lowercase;
|
3555 |
text-align:center;
|
3556 |
Success message
|
3557 |
..................................
|
3558 |
font-size:.8em;
|
3559 |
font-style:italic;
|
3560 |
color:green;
|
3561 |
text-align:center;
|
3562 |
Poll Question
|
3563 |
---------------------------------------------------------------------------
|
3564 |
border: 0 none;
|
3565 |
margin: 0 0 2em;
|
3566 |
padding: .25em;
|
3567 |
text-align: center;
|
3568 |
font-size: 14px;
|
3569 |
Poll Options / Answers
|
3570 |
---------------------------------------------------------------------------
|
3571 |
list-style: none;
|
3572 |
margin: 0;
|
3573 |
padding: 0;
|
3574 |
list-style: none;
|
3575 |
margin: 0;
|
3576 |
padding: 0;
|
3577 |
font-size: 14px;
|
3578 |
line-height: 2em;
|
3579 |
Label
|
3580 |
..................................
|
3581 |
margin:0px;
|
3582 |
font-style:normal;
|
3583 |
font-weight:normal;
|
3584 |
font-size:14px;
|
3585 |
float:none;
|
3586 |
display:inline-block;
|
3587 |
Custom answer / Other
|
3588 |
..................................
|
3589 |
width: 100%;
|
3590 |
overflow: hidden;
|
3591 |
width: 94%;
|
3592 |
overflow: hidden;
|
3593 |
Custom checkbox and radio button style
|
3594 |
---------------------------------------------------------------------------
|
3595 |
Custom fields
|
3596 |
---------------------------------------------------------------------------
|
3597 |
clear: both;
|
3598 |
list-style: none;
|
3599 |
margin: 0;
|
3600 |
padding: 0;
|
3601 |
overflow: hidden;
|
3602 |
width: 100%;
|
3603 |
display: block;
|
3604 |
font-size:14px;
|
3605 |
list-style: none;
|
3606 |
display: block;
|
3607 |
width: 94%;
|
3608 |
Vote Button
|
3609 |
---------------------------------------------------------------------------
|
3610 |
cursor:pointer;
|
3611 |
display: block;
|
3612 |
font-size:14px;
|
3613 |
margin: 0 auto;
|
3614 |
}
|
3615 |
Results
|
3616 |
---------------------------------------------------------------------------
|
3617 |
font-size: 12px;
|
3618 |
font-style: italic;
|
3619 |
font-weight: normal;
|
3620 |
margin-left: 15px;
|
3621 |
color: #38595E;
|
3622 |
Style for results that are displayed on columns
|
3623 |
..................................
|
3624 |
float: left;
|
3625 |
display: inline-block;
|
3626 |
width: 46%;
|
3627 |
padding: 1%;
|
3628 |
margin: 1%;
|
3629 |
float: right;
|
3630 |
width: auto;
|
3631 |
color:#000;
|
3632 |
text-decoration:underline;
|
3633 |
font-size:12px;
|
3634 |
color:#000;
|
3635 |
text-decoration:underline;
|
3636 |
font-size:12px;
|
3637 |
color:#000;
|
3638 |
text-decoration:underline;
|
3639 |
font-size:12px;
|
3640 |
float:left;
|
3641 |
width:100%;
|
3642 |
Result Bar
|
3643 |
..................................
|
3644 |
---------------------------------------------------------------------------
|
3645 |
EXTRAS
|
3646 |
---------------------------------------------------------------------------
|
3647 |
CAPTCHA
|
3648 |
..................................
|
3649 |
width:30px;
|
3650 |
float:left;
|
3651 |
margin-left:5px;
|
3652 |
height:0px;
|
3653 |
break;
|
3654 |
}
|
3655 |
case 'Red v2':
|
3656 |
{ //Red v2
|
3657 |
$css = <<<NOWDOC
|
3658 |
Main Container
|
3659 |
---------------------------------------------------------------------------
|
3660 |
background:#fff;
|
3661 |
box-sizing: border-box;
|
3662 |
display: inline-block;
|
3663 |
font-size: 14px;
|
3664 |
color:#555;
|
3665 |
padding: 10px;
|
3666 |
width: %POLL-WIDTH%;
|
3667 |
zoom: 1;
|
3668 |
Error message
|
3669 |
..................................
|
3670 |
font-size:.8em;
|
3671 |
font-style:italic;
|
3672 |
color:red;
|
3673 |
text-transform:lowercase;
|
3674 |
text-align:center;
|
3675 |
Success message
|
3676 |
..................................
|
3677 |
font-size:.8em;
|
3678 |
font-style:italic;
|
3679 |
color:green;
|
3680 |
text-align:center;
|
3681 |
Poll Question
|
3682 |
---------------------------------------------------------------------------
|
3683 |
background:#B70004;
|
3684 |
color:#fff;
|
3685 |
border: 0 none;
|
3686 |
margin: 0 0 2em;
|
3687 |
padding: .25em;
|
3688 |
text-align: center;
|
3689 |
font-size: 14px;
|
3690 |
Poll Options / Answers
|
3691 |
---------------------------------------------------------------------------
|
3692 |
list-style: none;
|
3693 |
margin: 0;
|
3694 |
padding: 0;
|
3695 |
list-style: none;
|
3696 |
margin: 0;
|
3697 |
padding: 0;
|
3698 |
font-size: 14px;
|
3699 |
line-height: 2em;
|
3700 |
Label
|
3701 |
..................................
|
3702 |
margin:0px;
|
3703 |
font-style:normal;
|
3704 |
font-weight:normal;
|
3705 |
font-size:14px;
|
3706 |
float:none;
|
3707 |
display:inline-block;
|
3708 |
Custom answer / Other
|
3709 |
..................................
|
3710 |
width: 100%;
|
3711 |
overflow: hidden;
|
3712 |
width: 94%;
|
3713 |
overflow: hidden;
|
3714 |
Custom checkbox and radio button style
|
3715 |
---------------------------------------------------------------------------
|
3716 |
Custom fields
|
3717 |
---------------------------------------------------------------------------
|
3718 |
clear: both;
|
3719 |
list-style: none;
|
3720 |
margin: 0;
|
3721 |
padding: 0;
|
3722 |
overflow: hidden;
|
3723 |
width: 100%;
|
3724 |
display: block;
|
3725 |
font-size:14px;
|
3726 |
list-style: none;
|
3727 |
display: block;
|
3728 |
width: 94%;
|
3729 |
Vote Button
|
3730 |
---------------------------------------------------------------------------
|
3731 |
cursor:pointer;
|
3732 |
display: block;
|
3733 |
font-size:14px;
|
3734 |
margin: 0 auto;
|
3735 |
}
|
3736 |
Results
|
3737 |
---------------------------------------------------------------------------
|
3738 |
font-size: 12px;
|
3739 |
font-style: italic;
|
3740 |
font-weight: normal;
|
3741 |
margin-left: 15px;
|
3742 |
color: #38595E;
|
3743 |
Style for results that are displayed on columns
|
3744 |
..................................
|
3745 |
float: left;
|
3746 |
display: inline-block;
|
3747 |
width: 46%;
|
3748 |
padding: 1%;
|
3749 |
margin: 1%;
|
3750 |
float: right;
|
3751 |
width: auto;
|
3752 |
color:#000;
|
3753 |
text-decoration:underline;
|
3754 |
font-size:12px;
|
3755 |
color:#000;
|
3756 |
text-decoration:underline;
|
3757 |
font-size:12px;
|
3758 |
color:#000;
|
3759 |
text-decoration:underline;
|
3760 |
font-size:12px;
|
3761 |
float:left;
|
3762 |
width:100%;
|
3763 |
Result Bar
|
3764 |
..................................
|
3765 |
---------------------------------------------------------------------------
|
3766 |
EXTRAS
|
3767 |
---------------------------------------------------------------------------
|
3768 |
CAPTCHA
|
3769 |
..................................
|
3770 |
width:30px;
|
3771 |
float:left;
|
3772 |
margin-left:5px;
|
3773 |
height:0px;
|
3774 |
break;
|
3775 |
}
|
3776 |
case 'Red v3':
|
3777 |
{ //Red v3
|
3778 |
$css = <<<NOWDOC
|
3779 |
Main Container
|
3780 |
---------------------------------------------------------------------------
|
3781 |
background:#fff;
|
3782 |
box-sizing: border-box;
|
3783 |
display: inline-block;
|
3784 |
font-size: 14px;
|
3785 |
color:#555;
|
3786 |
padding: 10px;
|
3787 |
width: %POLL-WIDTH%;
|
3788 |
zoom: 1;
|
3789 |
border:5px solid #B70004;
|
3790 |
Error message
|
3791 |
..................................
|
3792 |
font-size:.8em;
|
3793 |
font-style:italic;
|
3794 |
color:red;
|
3795 |
text-transform:lowercase;
|
3796 |
text-align:center;
|
3797 |
Success message
|
3798 |
..................................
|
3799 |
font-size:.8em;
|
3800 |
font-style:italic;
|
3801 |
color:green;
|
3802 |
text-align:center;
|
3803 |
Poll Question
|
3804 |
---------------------------------------------------------------------------
|
3805 |
border: 0 none;
|
3806 |
margin: 0 0 2em;
|
3807 |
padding: .25em;
|
3808 |
text-align: center;
|
3809 |
font-size: 14px;
|
3810 |
Poll Options / Answers
|
3811 |
---------------------------------------------------------------------------
|
3812 |
list-style: none;
|
3813 |
margin: 0;
|
3814 |
padding: 0;
|
3815 |
list-style: none;
|
3816 |
margin: 0;
|
3817 |
padding: 0;
|
3818 |
font-size: 14px;
|
3819 |
line-height: 2em;
|
3820 |
Label
|
3821 |
..................................
|
3822 |
margin:0px;
|
3823 |
font-style:normal;
|
3824 |
font-weight:normal;
|
3825 |
font-size:14px;
|
3826 |
float:none;
|
3827 |
display:inline-block;
|
3828 |
Custom answer / Other
|
3829 |
..................................
|
3830 |
width: 100%;
|
3831 |
overflow: hidden;
|
3832 |
width: 94%;
|
3833 |
overflow: hidden;
|
3834 |
Custom checkbox and radio button style
|
3835 |
---------------------------------------------------------------------------
|
3836 |
Custom fields
|
3837 |
---------------------------------------------------------------------------
|
3838 |
clear: both;
|
3839 |
list-style: none;
|
3840 |
margin: 0;
|
3841 |
padding: 0;
|
3842 |
overflow: hidden;
|
3843 |
width: 100%;
|
3844 |
display: block;
|
3845 |
font-size:14px;
|
3846 |
list-style: none;
|
3847 |
display: block;
|
3848 |
width: 94%;
|
3849 |
Vote Button
|
3850 |
---------------------------------------------------------------------------
|
3851 |
cursor:pointer;
|
3852 |
display: block;
|
3853 |
font-size:14px;
|
3854 |
margin: 0 auto;
|
3855 |
}
|
3856 |
Results
|
3857 |
---------------------------------------------------------------------------
|
3858 |
font-size: 12px;
|
3859 |
font-style: italic;
|
3860 |
font-weight: normal;
|
3861 |
margin-left: 15px;
|
3862 |
color: #38595E;
|
3863 |
Style for results that are displayed on columns
|
3864 |
..................................
|
3865 |
float: left;
|
3866 |
display: inline-block;
|
3867 |
width: 46%;
|
3868 |
padding: 1%;
|
3869 |
margin: 1%;
|
3870 |
float: right;
|
3871 |
width: auto;
|
3872 |
color:#000;
|
3873 |
text-decoration:underline;
|
3874 |
font-size:12px;
|
3875 |
color:#000;
|
3876 |
text-decoration:underline;
|
3877 |
font-size:12px;
|
3878 |
color:#000;
|
3879 |
text-decoration:underline;
|
3880 |
font-size:12px;
|
3881 |
float:left;
|
3882 |
width:100%;
|
3883 |
Result Bar
|
3884 |
..................................
|
3885 |
---------------------------------------------------------------------------
|
3886 |
EXTRAS
|
3887 |
---------------------------------------------------------------------------
|
3888 |
CAPTCHA
|
3889 |
..................................
|
3890 |
width:30px;
|
3891 |
float:left;
|
3892 |
margin-left:5px;
|
3893 |
height:0px;
|
3894 |
break;
|
3895 |
}
|
3896 |
case 'Green v1':
|
3897 |
{ //Green v1
|
3898 |
$css = <<<NOWDOC
|
3899 |
Main Container
|
3900 |
---------------------------------------------------------------------------
|
3901 |
background:#3F8B43;
|
3902 |
box-sizing: border-box;
|
3903 |
display: inline-block;
|
3904 |
font-size: 14px;
|
3905 |
color:white;
|
3906 |
padding: 10px;
|
3907 |
width: %POLL-WIDTH%;
|
3908 |
zoom: 1;
|
3909 |
Error message
|
3910 |
..................................
|
3911 |
font-size:.8em;
|
3912 |
font-style:italic;
|
3913 |
color:red;
|
3914 |
text-transform:lowercase;
|
3915 |
text-align:center;
|
3916 |
Success message
|
3917 |
..................................
|
3918 |
font-size:.8em;
|
3919 |
font-style:italic;
|
3920 |
color:green;
|
3921 |
text-align:center;
|
3922 |
Poll Question
|
3923 |
---------------------------------------------------------------------------
|
3924 |
border: 0 none;
|
3925 |
margin: 0 0 2em;
|
3926 |
padding: .25em;
|
3927 |
text-align: center;
|
3928 |
font-size: 14px;
|
3929 |
Poll Options / Answers
|
3930 |
---------------------------------------------------------------------------
|
3931 |
list-style: none;
|
3932 |
margin: 0;
|
3933 |
padding: 0;
|
3934 |
list-style: none;
|
3935 |
margin: 0;
|
3936 |
padding: 0;
|
3937 |
font-size: 14px;
|
3938 |
line-height: 2em;
|
3939 |
Label
|
3940 |
..................................
|
3941 |
margin:0px;
|
3942 |
font-style:normal;
|
3943 |
font-weight:normal;
|
3944 |
font-size:14px;
|
3945 |
float:none;
|
3946 |
display:inline-block;
|
3947 |
Custom answer / Other
|
3948 |
..................................
|
3949 |
width: 100%;
|
3950 |
overflow: hidden;
|
3951 |
width: 94%;
|
3952 |
overflow: hidden;
|
3953 |
Custom checkbox and radio button style
|
3954 |
---------------------------------------------------------------------------
|
3955 |
Custom fields
|
3956 |
---------------------------------------------------------------------------
|
3957 |
clear: both;
|
3958 |
list-style: none;
|
3959 |
margin: 0;
|
3960 |
padding: 0;
|
3961 |
overflow: hidden;
|
3962 |
width: 100%;
|
3963 |
display: block;
|
3964 |
font-size:14px;
|
3965 |
list-style: none;
|
3966 |
display: block;
|
3967 |
width: 94%;
|
3968 |
Vote Button
|
3969 |
---------------------------------------------------------------------------
|
3970 |
cursor:pointer;
|
3971 |
display: block;
|
3972 |
font-size:14px;
|
3973 |
margin: 0 auto;
|
3974 |
}
|
3975 |
Results
|
3976 |
---------------------------------------------------------------------------
|
3977 |
font-size: 12px;
|
3978 |
font-style: italic;
|
3979 |
font-weight: normal;
|
3980 |
margin-left: 15px;
|
3981 |
color: #38595E;
|
3982 |
Style for results that are displayed on columns
|
3983 |
..................................
|
3984 |
float: left;
|
3985 |
display: inline-block;
|
3986 |
width: 46%;
|
3987 |
padding: 1%;
|
3988 |
margin: 1%;
|
3989 |
float: right;
|
3990 |
width: auto;
|
3991 |
color:#000;
|
3992 |
text-decoration:underline;
|
3993 |
font-size:12px;
|
3994 |
color:#000;
|
3995 |
text-decoration:underline;
|
3996 |
font-size:12px;
|
3997 |
color:#000;
|
3998 |
text-decoration:underline;
|
3999 |
font-size:12px;
|
4000 |
float:left;
|
4001 |
width:100%;
|
4002 |
Result Bar
|
4003 |
..................................
|
4004 |
---------------------------------------------------------------------------
|
4005 |
EXTRAS
|
4006 |
---------------------------------------------------------------------------
|
4007 |
CAPTCHA
|
4008 |
..................................
|
4009 |
width:30px;
|
4010 |
float:left;
|
4011 |
margin-left:5px;
|
4012 |
height:0px;
|
4013 |
break;
|
4014 |
}
|
4015 |
case 'Green v2':
|
4016 |
{ //Green v2
|
4017 |
$css = <<<NOWDOC
|
4018 |
Main Container
|
4019 |
---------------------------------------------------------------------------
|
4020 |
background:#fff;
|
4021 |
box-sizing: border-box;
|
4022 |
display: inline-block;
|
4023 |
font-size: 14px;
|
4024 |
color:#555;
|
4025 |
padding: 10px;
|
4026 |
width: %POLL-WIDTH%;
|
4027 |
zoom: 1;
|
4028 |
Error message
|
4029 |
..................................
|
4030 |
font-size:.8em;
|
4031 |
font-style:italic;
|
4032 |
color:red;
|
4033 |
text-transform:lowercase;
|
4034 |
text-align:center;
|
4035 |
Success message
|
4036 |
..................................
|
4037 |
font-size:.8em;
|
4038 |
font-style:italic;
|
4039 |
color:green;
|
4040 |
text-align:center;
|
4041 |
Poll Question
|
4042 |
---------------------------------------------------------------------------
|
4043 |
background:#3F8B43;
|
4044 |
color:#fff;
|
4045 |
border: 0 none;
|
4046 |
margin: 0 0 2em;
|
4047 |
padding: .25em;
|
4048 |
text-align: center;
|
4049 |
font-size: 14px;
|
4050 |
Poll Options / Answers
|
4051 |
---------------------------------------------------------------------------
|
4052 |
list-style: none;
|
4053 |
margin: 0;
|
4054 |
padding: 0;
|
4055 |
list-style: none;
|
4056 |
margin: 0;
|
4057 |
padding: 0;
|
4058 |
font-size: 14px;
|
4059 |
line-height: 2em;
|
4060 |
Label
|
4061 |
..................................
|
4062 |
margin:0px;
|
4063 |
font-style:normal;
|
4064 |
font-weight:normal;
|
4065 |
font-size:14px;
|
4066 |
float:none;
|
4067 |
display:inline-block;
|
4068 |
Custom answer / Other
|
4069 |
..................................
|
4070 |
width: 100%;
|
4071 |
overflow: hidden;
|
4072 |
width: 94%;
|
4073 |
overflow: hidden;
|
4074 |
Custom checkbox and radio button style
|
4075 |
---------------------------------------------------------------------------
|
4076 |
Custom fields
|
4077 |
---------------------------------------------------------------------------
|
4078 |
clear: both;
|
4079 |
list-style: none;
|
4080 |
margin: 0;
|
4081 |
padding: 0;
|
4082 |
overflow: hidden;
|
4083 |
width: 100%;
|
4084 |
display: block;
|
4085 |
font-size:14px;
|
4086 |
list-style: none;
|
4087 |
display: block;
|
4088 |
width: 94%;
|
4089 |
Vote Button
|
4090 |
---------------------------------------------------------------------------
|
4091 |
cursor:pointer;
|
4092 |
display: block;
|
4093 |
font-size:14px;
|
4094 |
margin: 0 auto;
|
4095 |
}
|
4096 |
Results
|
4097 |
---------------------------------------------------------------------------
|
4098 |
font-size: 12px;
|
4099 |
font-style: italic;
|
4100 |
font-weight: normal;
|
4101 |
margin-left: 15px;
|
4102 |
color: #38595E;
|
4103 |
Style for results that are displayed on columns
|
4104 |
..................................
|
4105 |
float: left;
|
4106 |
display: inline-block;
|
4107 |
width: 46%;
|
4108 |
padding: 1%;
|
4109 |
margin: 1%;
|
4110 |
float: right;
|
4111 |
width: auto;
|
4112 |
color:#000;
|
4113 |
text-decoration:underline;
|
4114 |
font-size:12px;
|
4115 |
color:#000;
|
4116 |
text-decoration:underline;
|
4117 |
font-size:12px;
|
4118 |
color:#000;
|
4119 |
text-decoration:underline;
|
4120 |
font-size:12px;
|
4121 |
float:left;
|
4122 |
width:100%;
|
4123 |
Result Bar
|
4124 |
..................................
|
4125 |
---------------------------------------------------------------------------
|
4126 |
EXTRAS
|
4127 |
---------------------------------------------------------------------------
|
4128 |
CAPTCHA
|
4129 |
..................................
|
4130 |
width:30px;
|
4131 |
float:left;
|
4132 |
margin-left:5px;
|
4133 |
height:0px;
|
4134 |
break;
|
4135 |
}
|
4136 |
case 'Green v3':
|
4137 |
{ //Green v3
|
4138 |
$css = <<<NOWDOC
|
4139 |
Main Container
|
4140 |
---------------------------------------------------------------------------
|
4141 |
background:#fff;
|
4142 |
box-sizing: border-box;
|
4143 |
display: inline-block;
|
4144 |
font-size: 14px;
|
4145 |
color:#555;
|
4146 |
padding: 10px;
|
4147 |
width: %POLL-WIDTH%;
|
4148 |
zoom: 1;
|
4149 |
border:5px solid #3F8B43;
|
4150 |
Error message
|
4151 |
..................................
|
4152 |
font-size:.8em;
|
4153 |
font-style:italic;
|
4154 |
color:red;
|
4155 |
text-transform:lowercase;
|
4156 |
text-align:center;
|
4157 |
Success message
|
4158 |
..................................
|
4159 |
font-size:.8em;
|
4160 |
font-style:italic;
|
4161 |
color:green;
|
4162 |
text-align:center;
|
4163 |
Poll Question
|
4164 |
---------------------------------------------------------------------------
|
4165 |
border: 0 none;
|
4166 |
margin: 0 0 2em;
|
4167 |
padding: .25em;
|
4168 |
text-align: center;
|
4169 |
font-size: 14px;
|
4170 |
Poll Options / Answers
|
4171 |
---------------------------------------------------------------------------
|
4172 |
list-style: none;
|
4173 |
margin: 0;
|
4174 |
padding: 0;
|
4175 |
list-style: none;
|
4176 |
margin: 0;
|
4177 |
padding: 0;
|
4178 |
font-size: 14px;
|
4179 |
line-height: 2em;
|
4180 |
Label
|
4181 |
..................................
|
4182 |
margin:0px;
|
4183 |
font-style:normal;
|
4184 |
font-weight:normal;
|
4185 |
font-size:14px;
|
4186 |
float:none;
|
4187 |
display:inline-block;
|
4188 |
Custom answer / Other
|
4189 |
..................................
|
4190 |
width: 100%;
|
4191 |
overflow: hidden;
|
4192 |
width: 94%;
|
4193 |
overflow: hidden;
|
4194 |
Custom checkbox and radio button style
|
4195 |
---------------------------------------------------------------------------
|
4196 |
Custom fields
|
4197 |
---------------------------------------------------------------------------
|
4198 |
clear: both;
|
4199 |
list-style: none;
|
4200 |
margin: 0;
|
4201 |
padding: 0;
|
4202 |
overflow: hidden;
|
4203 |
width: 100%;
|
4204 |
display: block;
|
4205 |
font-size:14px;
|
4206 |
list-style: none;
|
4207 |
display: block;
|
4208 |
width: 94%;
|
4209 |
Vote Button
|
4210 |
---------------------------------------------------------------------------
|
4211 |
cursor:pointer;
|
4212 |
display: block;
|
4213 |
font-size:14px;
|
4214 |
margin: 0 auto;
|
4215 |
}
|
4216 |
Results
|
4217 |
---------------------------------------------------------------------------
|
4218 |
font-size: 12px;
|
4219 |
font-style: italic;
|
4220 |
font-weight: normal;
|
4221 |
margin-left: 15px;
|
4222 |
color: #38595E;
|
4223 |
Style for results that are displayed on columns
|
4224 |
..................................
|
4225 |
float: left;
|
4226 |
display: inline-block;
|
4227 |
width: 46%;
|
4228 |
padding: 1%;
|
4229 |
margin: 1%;
|
4230 |
float: right;
|
4231 |
width: auto;
|
4232 |
color:#000;
|
4233 |
text-decoration:underline;
|
4234 |
font-size:12px;
|
4235 |
color:#000;
|
4236 |
text-decoration:underline;
|
4237 |
font-size:12px;
|
4238 |
color:#000;
|
4239 |
text-decoration:underline;
|
4240 |
font-size:12px;
|
4241 |
float:left;
|
4242 |
width:100%;
|
4243 |
Result Bar
|
4244 |
..................................
|
4245 |
---------------------------------------------------------------------------
|
4246 |
EXTRAS
|
4247 |
---------------------------------------------------------------------------
|
4248 |
CAPTCHA
|
4249 |
..................................
|
4250 |
width:30px;
|
4251 |
float:left;
|
4252 |
margin-left:5px;
|
4253 |
height:0px;
|
4254 |
break;
|
4255 |
}
|
4256 |
case 'Orange v1':
|
4257 |
{ //Orange v1
|
4258 |
$css = <<<NOWDOC
|
4259 |
Main Container
|
4260 |
---------------------------------------------------------------------------
|
4261 |
background:#FB6911;
|
4262 |
box-sizing: border-box;
|
4263 |
display: inline-block;
|
4264 |
font-size: 14px;
|
4265 |
color:white;
|
4266 |
padding: 10px;
|
4267 |
width: %POLL-WIDTH%;
|
4268 |
zoom: 1;
|
4269 |
Error message
|
4270 |
..................................
|
4271 |
font-size:.8em;
|
4272 |
font-style:italic;
|
4273 |
color:red;
|
4274 |
text-transform:lowercase;
|
4275 |
text-align:center;
|
4276 |
Success message
|
4277 |
..................................
|
4278 |
font-size:.8em;
|
4279 |
font-style:italic;
|
4280 |
color:green;
|
4281 |
text-align:center;
|
4282 |
Poll Question
|
4283 |
---------------------------------------------------------------------------
|
4284 |
border: 0 none;
|
4285 |
margin: 0 0 2em;
|
4286 |
padding: .25em;
|
4287 |
text-align: center;
|
4288 |
font-size: 14px;
|
4289 |
Poll Options / Answers
|
4290 |
---------------------------------------------------------------------------
|
4291 |
list-style: none;
|
4292 |
margin: 0;
|
4293 |
padding: 0;
|
4294 |
list-style: none;
|
4295 |
margin: 0;
|
4296 |
padding: 0;
|
4297 |
font-size: 14px;
|
4298 |
line-height: 2em;
|
4299 |
Label
|
4300 |
..................................
|
4301 |
margin:0px;
|
4302 |
font-style:normal;
|
4303 |
font-weight:normal;
|
4304 |
font-size:14px;
|
4305 |
float:none;
|
4306 |
display:inline-block;
|
4307 |
Custom answer / Other
|
4308 |
..................................
|
4309 |
width: 100%;
|
4310 |
overflow: hidden;
|
4311 |
width: 94%;
|
4312 |
overflow: hidden;
|
4313 |
Custom checkbox and radio button style
|
4314 |
---------------------------------------------------------------------------
|
4315 |
Custom fields
|
4316 |
---------------------------------------------------------------------------
|
4317 |
clear: both;
|
4318 |
list-style: none;
|
4319 |
margin: 0;
|
4320 |
padding: 0;
|
4321 |
overflow: hidden;
|
4322 |
width: 100%;
|
4323 |
display: block;
|
4324 |
font-size:14px;
|
4325 |
list-style: none;
|
4326 |
display: block;
|
4327 |
width: 94%;
|
4328 |
Vote Button
|
4329 |
---------------------------------------------------------------------------
|
4330 |
cursor:pointer;
|
4331 |
display: block;
|
4332 |
font-size:14px;
|
4333 |
margin: 0 auto;
|
4334 |
}
|
4335 |
Results
|
4336 |
---------------------------------------------------------------------------
|
4337 |
font-size: 12px;
|
4338 |
font-style: italic;
|
4339 |
font-weight: normal;
|
4340 |
margin-left: 15px;
|
4341 |
color: #38595E;
|
4342 |
Style for results that are displayed on columns
|
4343 |
..................................
|
4344 |
float: left;
|
4345 |
display: inline-block;
|
4346 |
width: 46%;
|
4347 |
padding: 1%;
|
4348 |
margin: 1%;
|
4349 |
float: right;
|
4350 |
width: auto;
|
4351 |
color:#000;
|
4352 |
text-decoration:underline;
|
4353 |
font-size:12px;
|
4354 |
color:#000;
|
4355 |
text-decoration:underline;
|
4356 |
font-size:12px;
|
4357 |
color:#000;
|
4358 |
text-decoration:underline;
|
4359 |
font-size:12px;
|
4360 |
float:left;
|
4361 |
width:100%;
|
4362 |
Result Bar
|
4363 |
..................................
|
4364 |
---------------------------------------------------------------------------
|
4365 |
EXTRAS
|
4366 |
---------------------------------------------------------------------------
|
4367 |
CAPTCHA
|
4368 |
..................................
|
4369 |
width:30px;
|
4370 |
float:left;
|
4371 |
margin-left:5px;
|
4372 |
height:0px;
|
4373 |
break;
|
4374 |
}
|
4375 |
case 'Orange v2':
|
4376 |
{ //Orange v2
|
4377 |
$css = <<<NOWDOC
|
4378 |
Main Container
|
4379 |
---------------------------------------------------------------------------
|
4380 |
background:#fff;
|
4381 |
box-sizing: border-box;
|
4382 |
display: inline-block;
|
4383 |
font-size: 14px;
|
4384 |
color:#555;
|
4385 |
padding: 10px;
|
4386 |
width: %POLL-WIDTH%;
|
4387 |
zoom: 1;
|
4388 |
Error message
|
4389 |
..................................
|
4390 |
font-size:.8em;
|
4391 |
font-style:italic;
|
4392 |
color:red;
|
4393 |
text-transform:lowercase;
|
4394 |
text-align:center;
|
4395 |
Success message
|
4396 |
..................................
|
4397 |
font-size:.8em;
|
4398 |
font-style:italic;
|
4399 |
color:green;
|
4400 |
text-align:center;
|
4401 |
Poll Question
|
4402 |
---------------------------------------------------------------------------
|
4403 |
background:#FB6911;
|
4404 |
color:#fff;
|
4405 |
border: 0 none;
|
4406 |
margin: 0 0 2em;
|
4407 |
padding: .25em;
|
4408 |
text-align: center;
|
4409 |
font-size: 14px;
|
4410 |
Poll Options / Answers
|
4411 |
---------------------------------------------------------------------------
|
4412 |
list-style: none;
|
4413 |
margin: 0;
|
4414 |
padding: 0;
|
4415 |
list-style: none;
|
4416 |
margin: 0;
|
4417 |
padding: 0;
|
4418 |
font-size: 14px;
|
4419 |
line-height: 2em;
|
4420 |
Label
|
4421 |
..................................
|
4422 |
margin:0px;
|
4423 |
font-style:normal;
|
4424 |
font-weight:normal;
|
4425 |
font-size:14px;
|
4426 |
float:none;
|
4427 |
display:inline-block;
|
4428 |
Custom answer / Other
|
4429 |
..................................
|
4430 |
width: 100%;
|
4431 |
overflow: hidden;
|
4432 |
width: 94%;
|
4433 |
overflow: hidden;
|
4434 |
Custom checkbox and radio button style
|
4435 |
---------------------------------------------------------------------------
|
4436 |
Custom fields
|
4437 |
---------------------------------------------------------------------------
|
4438 |
clear: both;
|
4439 |
list-style: none;
|
4440 |
margin: 0;
|
4441 |
padding: 0;
|
4442 |
overflow: hidden;
|
4443 |
width: 100%;
|
4444 |
display: block;
|
4445 |
font-size:14px;
|
4446 |
list-style: none;
|
4447 |
display: block;
|
4448 |
width: 94%;
|
4449 |
Vote Button
|
4450 |
---------------------------------------------------------------------------
|
4451 |
cursor:pointer;
|
4452 |
display: block;
|
4453 |
font-size:14px;
|
4454 |
margin: 0 auto;
|
4455 |
}
|
4456 |
Results
|
4457 |
---------------------------------------------------------------------------
|
4458 |
font-size: 12px;
|
4459 |
font-style: italic;
|
4460 |
font-weight: normal;
|
4461 |
margin-left: 15px;
|
4462 |
color: #38595E;
|
4463 |
Style for results that are displayed on columns
|
4464 |
..................................
|
4465 |
float: left;
|
4466 |
display: inline-block;
|
4467 |
width: 46%;
|
4468 |
padding: 1%;
|
4469 |
margin: 1%;
|
4470 |
float: right;
|
4471 |
width: auto;
|
4472 |
color:#000;
|
4473 |
text-decoration:underline;
|
4474 |
font-size:12px;
|
4475 |
color:#000;
|
4476 |
text-decoration:underline;
|
4477 |
font-size:12px;
|
4478 |
color:#000;
|
4479 |
text-decoration:underline;
|
4480 |
font-size:12px;
|
4481 |
float:left;
|
4482 |
width:100%;
|
4483 |
Result Bar
|
4484 |
..................................
|
4485 |
---------------------------------------------------------------------------
|
4486 |
EXTRAS
|
4487 |
---------------------------------------------------------------------------
|
4488 |
CAPTCHA
|
4489 |
..................................
|
4490 |
width:30px;
|
4491 |
float:left;
|
4492 |
margin-left:5px;
|
4493 |
height:0px;
|
4494 |
break;
|
4495 |
}
|
4496 |
case 'Orange v3':
|
4497 |
{ //Orange v3
|
4498 |
$css = <<<NOWDOC
|
4499 |
Main Container
|
4500 |
---------------------------------------------------------------------------
|
4501 |
background:#fff;
|
4502 |
box-sizing: border-box;
|
4503 |
display: inline-block;
|
4504 |
font-size: 14px;
|
4505 |
color:#555;
|
4506 |
padding: 10px;
|
4507 |
width: %POLL-WIDTH%;
|
4508 |
zoom: 1;
|
4509 |
border:5px solid #FB6911;
|
4510 |
Error message
|
4511 |
..................................
|
4512 |
font-size:.8em;
|
4513 |
font-style:italic;
|
4514 |
color:red;
|
4515 |
text-transform:lowercase;
|
4516 |
text-align:center;
|
4517 |
Success message
|
4518 |
..................................
|
4519 |
font-size:.8em;
|
4520 |
font-style:italic;
|
4521 |
color:green;
|
4522 |
text-align:center;
|
4523 |
Poll Question
|
4524 |
---------------------------------------------------------------------------
|
4525 |
border: 0 none;
|
4526 |
margin: 0 0 2em;
|
4527 |
padding: .25em;
|
4528 |
text-align: center;
|
4529 |
font-size: 14px;
|
4530 |
Poll Options / Answers
|
4531 |
---------------------------------------------------------------------------
|
4532 |
list-style: none;
|
4533 |
margin: 0;
|
4534 |
padding: 0;
|
4535 |
list-style: none;
|
4536 |
margin: 0;
|
4537 |
padding: 0;
|
4538 |
font-size: 14px;
|
4539 |
line-height: 2em;
|
4540 |
Label
|
4541 |
..................................
|
4542 |
margin:0px;
|
4543 |
font-style:normal;
|
4544 |
font-weight:normal;
|
4545 |
font-size:14px;
|
4546 |
float:none;
|
4547 |
display:inline-block;
|
4548 |
Custom answer / Other
|
4549 |
..................................
|
4550 |
width: 100%;
|
4551 |
overflow: hidden;
|
4552 |
width: 94%;
|
4553 |
overflow: hidden;
|
4554 |
Custom checkbox and radio button style
|
4555 |
---------------------------------------------------------------------------
|
4556 |
Custom fields
|
4557 |
---------------------------------------------------------------------------
|
4558 |
clear: both;
|
4559 |
list-style: none;
|
4560 |
margin: 0;
|
4561 |
padding: 0;
|
4562 |
overflow: hidden;
|
4563 |
width: 100%;
|
4564 |
display: block;
|
4565 |
font-size:14px;
|
4566 |
list-style: none;
|
4567 |
display: block;
|
4568 |
width: 94%;
|
4569 |
Vote Button
|
4570 |
---------------------------------------------------------------------------
|
4571 |
cursor:pointer;
|
4572 |
display: block;
|
4573 |
font-size:14px;
|
4574 |
margin: 0 auto;
|
4575 |
}
|
4576 |
Results
|
4577 |
---------------------------------------------------------------------------
|
4578 |
font-size: 12px;
|
4579 |
font-style: italic;
|
4580 |
font-weight: normal;
|
4581 |
margin-left: 15px;
|
4582 |
color: #38595E;
|
4583 |
Style for results that are displayed on columns
|
4584 |
..................................
|
4585 |
float: left;
|
4586 |
display: inline-block;
|
4587 |
width: 46%;
|
4588 |
padding: 1%;
|
4589 |
margin: 1%;
|
4590 |
float: right;
|
4591 |
width: auto;
|
4592 |
color:#000;
|
4593 |
text-decoration:underline;
|
4594 |
font-size:12px;
|
4595 |
color:#000;
|
4596 |
text-decoration:underline;
|
4597 |
font-size:12px;
|
4598 |
color:#000;
|
4599 |
text-decoration:underline;
|
4600 |
font-size:12px;
|
4601 |
float:left;
|
4602 |
width:100%;
|
4603 |
Result Bar
|
4604 |
..................................
|
4605 |
---------------------------------------------------------------------------
|
4606 |
EXTRAS
|
4607 |
---------------------------------------------------------------------------
|
4608 |
CAPTCHA
|
4609 |
..................................
|
4610 |
width:30px;
|
4611 |
float:left;
|
4612 |
margin-left:5px;
|
4613 |
height:0px;
|
4614 |
break;
|
4615 |
}
|
4616 |
}
|
4617 |
$css.= "#yop-poll-container-%POLL-ID% img {
|
4618 |
max-width: %POLL-WIDTH%;
|
4619 |
$css = addslashes($css);
|
4620 |
$before_vote_template = addslashes( $before_vote_template );
|
4621 |
$sql .= "`before_vote_template` = '{$before_vote_template}',
|
4622 |
$sql .= $wpdb->prepare( ' WHERE name = %s', $template_to_reset );
|
4623 |
return $wpdb->query( $sql );
|
4624 |
}
|
4625 |
return 'html';
|
js/yop-poll-public.js
CHANGED
@@ -52,12 +52,10 @@ jQuery(document).ready(function(){
|
|
52 |
|
53 |
});
|
54 |
function yop_poll_runEval(poll_id, unique_id) {
|
55 |
-
|
56 |
eval("if(typeof window.strip_results_" + poll_id + unique_id + " == 'function') strip_results_"+poll_id + unique_id +"();");
|
57 |
-
|
58 |
-
|
59 |
-
if(tabulate.results || tabulate.orizontal_results!=0)
|
60 |
-
eval( "if(typeof window.tabulate_results_" + poll_id + unique_id + " == 'function') tabulate_results_" + poll_id + unique_id + "(); " )
|
61 |
|
62 |
//if(tabulate.answers || tabulate.orizontal_answers!=0)
|
63 |
eval( "if(typeof window.tabulate_answers_" + poll_id + unique_id + " == 'function') tabulate_answers_" + poll_id + unique_id + "(); " );
|
@@ -270,7 +268,7 @@ function yop_poll_vote_on_multiple_options(poll_id, vote_type, poll_location, un
|
|
270 |
jQuery( '#yop_poll_wordpress-vote-button-' + poll_id + unique_id ).hide();
|
271 |
jQuery( '#yop_poll_anonimous-vote-button-' + poll_id + unique_id).hide();
|
272 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
273 |
-
jQuery( back_to_vote_loading_image).css('margin-left','
|
274 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
275 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
276 |
back_to_vote_loading_image.id = 'yop_poll_wordpress_loading_img-' + poll_id + unique_id;
|
@@ -319,7 +317,7 @@ function yop_poll_vote_on_multiple_options(poll_id, vote_type, poll_location, un
|
|
319 |
jQuery( '#yop_poll_wordpress-vote-button-' + poll_id + unique_id ).hide();
|
320 |
jQuery( '#yop_poll_anonimous-vote-button-' + poll_id + unique_id).hide();
|
321 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
322 |
-
jQuery( back_to_vote_loading_image).css('margin-left','
|
323 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
324 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
325 |
back_to_vote_loading_image.id = 'yop_poll_wordpress_loading_img-' + poll_id + unique_id;
|
@@ -576,7 +574,7 @@ function yop_poll_view_results( poll_id, poll_location, unique_id ) {
|
|
576 |
result_link_loading_image.id = 'yop_poll_result_link_loading_img-' + poll_id + unique_id;
|
577 |
|
578 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).after( result_link_loading_image );
|
579 |
-
jQuery( result_link_loading_image).css('padding-right','
|
580 |
|
581 |
//jQuery( '#yop_poll_result_link_loading_img-' + poll_id + unique_id ).css( 'border', 'none' );
|
582 |
/* jQuery( result_link_loading_image).css(
|
@@ -604,11 +602,10 @@ function yop_poll_view_results( poll_id, poll_location, unique_id ) {
|
|
604 |
jQuery( '#yop_poll_result_link_loading_img-' + poll_id + unique_id ).remove();
|
605 |
|
606 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
607 |
-
|
608 |
},
|
609 |
|
610 |
success: function( data ) {
|
611 |
-
|
612 |
data = yop_poll_extractResponse( data );
|
613 |
|
614 |
|
@@ -620,7 +617,7 @@ function yop_poll_view_results( poll_id, poll_location, unique_id ) {
|
|
620 |
|
621 |
//jQuery( '#yop_poll_vote_button_loading_img-' + poll_id + unique_id ).remove();
|
622 |
|
623 |
-
|
624 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( response.error );
|
625 |
|
626 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
@@ -636,7 +633,7 @@ function yop_poll_view_results( poll_id, poll_location, unique_id ) {
|
|
636 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( '' );
|
637 |
|
638 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( response.success );
|
639 |
-
|
640 |
yop_poll_runEval( poll_id, unique_id );
|
641 |
|
642 |
}
|
@@ -655,12 +652,9 @@ function yop_poll_view_results( poll_id, poll_location, unique_id ) {
|
|
655 |
|
656 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
657 |
|
658 |
-
|
659 |
}
|
660 |
|
661 |
} );
|
662 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
663 |
-
|
664 |
}
|
665 |
|
666 |
function yop_poll_back_to_vote(poll_id, poll_location, unique_id) {
|
@@ -669,7 +663,7 @@ function yop_poll_back_to_vote(poll_id, poll_location, unique_id) {
|
|
669 |
var yop_poll_public_config = window['yop_poll_public_config_' + poll_id + unique_id ];
|
670 |
jQuery( '#yop_poll_back_to_vote_link' + poll_id + unique_id ).hide();
|
671 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
672 |
-
jQuery( back_to_vote_loading_image).css('margin-left','
|
673 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
674 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
675 |
back_to_vote_loading_image.id = 'yop_poll_back_to_vote_loading_img-' + poll_id + unique_id;
|
@@ -686,18 +680,13 @@ function yop_poll_back_to_vote(poll_id, poll_location, unique_id) {
|
|
686 |
alert( 'An error has occured!' );
|
687 |
jQuery( '#yop_poll_back_to_vote_loading_img-' + poll_id + unique_id ).remove();
|
688 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
689 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
690 |
-
|
691 |
},
|
692 |
success: function(data) {
|
693 |
data = yop_poll_extractResponse( data );
|
694 |
response = JSON.parse( data );
|
695 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
696 |
if( '' != response.error ) {
|
697 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( response.error );
|
698 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
699 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
700 |
-
|
701 |
}
|
702 |
else {
|
703 |
if( '' != response.message ) {
|
@@ -705,30 +694,24 @@ function yop_poll_back_to_vote(poll_id, poll_location, unique_id) {
|
|
705 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( '' );
|
706 |
jQuery( '#yop-poll-container-success-' + poll_id +
|
707 |
unique_id ).html( response.success );
|
708 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
709 |
yop_poll_runEval( poll_id, unique_id );
|
710 |
-
|
711 |
}
|
712 |
else {
|
713 |
jQuery( '#yop-poll-container-error-' + poll_id +
|
714 |
unique_id ).html( 'An Error Has Occured!' );
|
715 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
716 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
717 |
}
|
718 |
}
|
719 |
jQuery( '#yop_poll_back_to_vote_loading_img-' + poll_id + unique_id ).remove();
|
720 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
721 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
722 |
-
|
723 |
}
|
724 |
} );
|
725 |
-
jQuery('.yop-poll-forms').removeClass('yop-poll-forms-display');
|
726 |
}
|
727 |
|
728 |
function yop_poll_show_loading(target, loading_img_id, yop_poll_public_config) {
|
729 |
jQuery( '#' + target ).hide();
|
730 |
var target_loading_image = document.createElement( 'img' );
|
731 |
-
jQuery(target_loading_image).css('margin-left','
|
732 |
target_loading_image.src = yop_poll_public_config.loading_image_src;
|
733 |
target_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
734 |
target_loading_image.id = loading_img_id;
|
52 |
|
53 |
});
|
54 |
function yop_poll_runEval(poll_id, unique_id) {
|
55 |
+
|
56 |
eval("if(typeof window.strip_results_" + poll_id + unique_id + " == 'function') strip_results_"+poll_id + unique_id +"();");
|
57 |
+
if(tabulate.results || tabulate.orizontal_results!=0)
|
58 |
+
eval( "if(typeof window.tabulate_results_" + poll_id + unique_id + " == 'function') tabulate_results_" + poll_id + unique_id + "(); " )
|
|
|
|
|
59 |
|
60 |
//if(tabulate.answers || tabulate.orizontal_answers!=0)
|
61 |
eval( "if(typeof window.tabulate_answers_" + poll_id + unique_id + " == 'function') tabulate_answers_" + poll_id + unique_id + "(); " );
|
268 |
jQuery( '#yop_poll_wordpress-vote-button-' + poll_id + unique_id ).hide();
|
269 |
jQuery( '#yop_poll_anonimous-vote-button-' + poll_id + unique_id).hide();
|
270 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
271 |
+
jQuery( back_to_vote_loading_image).css('margin-left','40%')
|
272 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
273 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
274 |
back_to_vote_loading_image.id = 'yop_poll_wordpress_loading_img-' + poll_id + unique_id;
|
317 |
jQuery( '#yop_poll_wordpress-vote-button-' + poll_id + unique_id ).hide();
|
318 |
jQuery( '#yop_poll_anonimous-vote-button-' + poll_id + unique_id).hide();
|
319 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
320 |
+
jQuery( back_to_vote_loading_image).css('margin-left','40%')
|
321 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
322 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
323 |
back_to_vote_loading_image.id = 'yop_poll_wordpress_loading_img-' + poll_id + unique_id;
|
574 |
result_link_loading_image.id = 'yop_poll_result_link_loading_img-' + poll_id + unique_id;
|
575 |
|
576 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).after( result_link_loading_image );
|
577 |
+
jQuery( result_link_loading_image).css('padding-right','80%')
|
578 |
|
579 |
//jQuery( '#yop_poll_result_link_loading_img-' + poll_id + unique_id ).css( 'border', 'none' );
|
580 |
/* jQuery( result_link_loading_image).css(
|
602 |
jQuery( '#yop_poll_result_link_loading_img-' + poll_id + unique_id ).remove();
|
603 |
|
604 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
605 |
+
|
606 |
},
|
607 |
|
608 |
success: function( data ) {
|
|
|
609 |
data = yop_poll_extractResponse( data );
|
610 |
|
611 |
|
617 |
|
618 |
//jQuery( '#yop_poll_vote_button_loading_img-' + poll_id + unique_id ).remove();
|
619 |
|
620 |
+
|
621 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( response.error );
|
622 |
|
623 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
633 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( '' );
|
634 |
|
635 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( response.success );
|
636 |
+
|
637 |
yop_poll_runEval( poll_id, unique_id );
|
638 |
|
639 |
}
|
652 |
|
653 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
654 |
|
|
|
655 |
}
|
656 |
|
657 |
} );
|
|
|
|
|
658 |
}
|
659 |
|
660 |
function yop_poll_back_to_vote(poll_id, poll_location, unique_id) {
|
663 |
var yop_poll_public_config = window['yop_poll_public_config_' + poll_id + unique_id ];
|
664 |
jQuery( '#yop_poll_back_to_vote_link' + poll_id + unique_id ).hide();
|
665 |
var back_to_vote_loading_image = document.createElement( 'img' );
|
666 |
+
jQuery( back_to_vote_loading_image).css('margin-left','40%')
|
667 |
back_to_vote_loading_image.src = yop_poll_public_config.loading_image_src;
|
668 |
back_to_vote_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
669 |
back_to_vote_loading_image.id = 'yop_poll_back_to_vote_loading_img-' + poll_id + unique_id;
|
680 |
alert( 'An error has occured!' );
|
681 |
jQuery( '#yop_poll_back_to_vote_loading_img-' + poll_id + unique_id ).remove();
|
682 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
|
|
|
|
683 |
},
|
684 |
success: function(data) {
|
685 |
data = yop_poll_extractResponse( data );
|
686 |
response = JSON.parse( data );
|
|
|
687 |
if( '' != response.error ) {
|
688 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( response.error );
|
689 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
|
|
|
|
690 |
}
|
691 |
else {
|
692 |
if( '' != response.message ) {
|
694 |
jQuery( '#yop-poll-container-error-' + poll_id + unique_id ).html( '' );
|
695 |
jQuery( '#yop-poll-container-success-' + poll_id +
|
696 |
unique_id ).html( response.success );
|
|
|
697 |
yop_poll_runEval( poll_id, unique_id );
|
|
|
698 |
}
|
699 |
else {
|
700 |
jQuery( '#yop-poll-container-error-' + poll_id +
|
701 |
unique_id ).html( 'An Error Has Occured!' );
|
702 |
jQuery( '#yop-poll-container-success-' + poll_id + unique_id ).html( '' );
|
|
|
703 |
}
|
704 |
}
|
705 |
jQuery( '#yop_poll_back_to_vote_loading_img-' + poll_id + unique_id ).remove();
|
706 |
jQuery( '#yop_poll_result_link' + poll_id + unique_id ).show();
|
|
|
|
|
707 |
}
|
708 |
} );
|
|
|
709 |
}
|
710 |
|
711 |
function yop_poll_show_loading(target, loading_img_id, yop_poll_public_config) {
|
712 |
jQuery( '#' + target ).hide();
|
713 |
var target_loading_image = document.createElement( 'img' );
|
714 |
+
jQuery(target_loading_image).css('margin-left','40%')
|
715 |
target_loading_image.src = yop_poll_public_config.loading_image_src;
|
716 |
target_loading_image.alt = yop_poll_public_config.loading_image_alt;
|
717 |
target_loading_image.id = loading_img_id;
|
lib/Twig/TokenStream.php
DELETED
@@ -1,144 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) 2009 Fabien Potencier
|
7 |
-
* (c) 2009 Armin Ronacher
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Represents a token stream.
|
15 |
-
*
|
16 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
17 |
-
*/
|
18 |
-
class Twig_TokenStream
|
19 |
-
{
|
20 |
-
protected $tokens;
|
21 |
-
protected $current;
|
22 |
-
protected $filename;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Constructor.
|
26 |
-
*
|
27 |
-
* @param array $tokens An array of tokens
|
28 |
-
* @param string $filename The name of the filename which tokens are associated with
|
29 |
-
*/
|
30 |
-
public function __construct(array $tokens, $filename = null)
|
31 |
-
{
|
32 |
-
$this->tokens = $tokens;
|
33 |
-
$this->current = 0;
|
34 |
-
$this->filename = $filename;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Returns a string representation of the token stream.
|
39 |
-
*
|
40 |
-
* @return string
|
41 |
-
*/
|
42 |
-
public function __toString()
|
43 |
-
{
|
44 |
-
return implode("\n", $this->tokens);
|
45 |
-
}
|
46 |
-
|
47 |
-
public function injectTokens(array $tokens)
|
48 |
-
{
|
49 |
-
$this->tokens = array_merge(array_slice($this->tokens, 0, $this->current), $tokens, array_slice($this->tokens, $this->current));
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Sets the pointer to the next token and returns the old one.
|
54 |
-
*
|
55 |
-
* @return Twig_Token
|
56 |
-
*/
|
57 |
-
public function next()
|
58 |
-
{
|
59 |
-
if (!isset($this->tokens[++$this->current])) {
|
60 |
-
throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current - 1]->getLine(), $this->filename);
|
61 |
-
}
|
62 |
-
|
63 |
-
return $this->tokens[$this->current - 1];
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Tests a token and returns it or throws a syntax error.
|
68 |
-
*
|
69 |
-
* @return Twig_Token
|
70 |
-
*/
|
71 |
-
public function expect($type, $value = null, $message = null)
|
72 |
-
{
|
73 |
-
$token = $this->tokens[$this->current];
|
74 |
-
if (!$token->test($type, $value)) {
|
75 |
-
$line = $token->getLine();
|
76 |
-
throw new Twig_Error_Syntax(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s)',
|
77 |
-
$message ? $message.'. ' : '',
|
78 |
-
Twig_Token::typeToEnglish($token->getType(), $line), $token->getValue(),
|
79 |
-
Twig_Token::typeToEnglish($type, $line), $value ? sprintf(' with value "%s"', $value) : ''),
|
80 |
-
$line,
|
81 |
-
$this->filename
|
82 |
-
);
|
83 |
-
}
|
84 |
-
$this->next();
|
85 |
-
|
86 |
-
return $token;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Looks at the next token.
|
91 |
-
*
|
92 |
-
* @param integer $number
|
93 |
-
*
|
94 |
-
* @return Twig_Token
|
95 |
-
*/
|
96 |
-
public function look($number = 1)
|
97 |
-
{
|
98 |
-
if (!isset($this->tokens[$this->current + $number])) {
|
99 |
-
throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current + $number - 1]->getLine(), $this->filename);
|
100 |
-
}
|
101 |
-
|
102 |
-
return $this->tokens[$this->current + $number];
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Tests the current token
|
107 |
-
*
|
108 |
-
* @return bool
|
109 |
-
*/
|
110 |
-
public function test($primary, $secondary = null)
|
111 |
-
{
|
112 |
-
return $this->tokens[$this->current]->test($primary, $secondary);
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Checks if end of stream was reached
|
117 |
-
*
|
118 |
-
* @return bool
|
119 |
-
*/
|
120 |
-
public function isEOF()
|
121 |
-
{
|
122 |
-
return $this->tokens[$this->current]->getType() === Twig_Token::EOF_TYPE;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Gets the current token
|
127 |
-
*
|
128 |
-
* @return Twig_Token
|
129 |
-
*/
|
130 |
-
public function getCurrent()
|
131 |
-
{
|
132 |
-
return $this->tokens[$this->current];
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Gets the filename associated with this stream
|
137 |
-
*
|
138 |
-
* @return string
|
139 |
-
*/
|
140 |
-
public function getFilename()
|
141 |
-
{
|
142 |
-
return $this->filename;
|
143 |
-
}
|
144 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
models/abstract_model.php
CHANGED
@@ -1861,6 +1861,8 @@ abstract class YOP_POLL_Abstract_Model {
|
|
1861 |
LIMIT 1", $this->ID, $user_id, $value );
|
1862 |
$result = $wpdb->get_results($sql,ARRAY_A );
|
1863 |
|
|
|
|
|
1864 |
if(isset($result[0]['vote_date']))
|
1865 |
return true;
|
1866 |
else
|
1861 |
LIMIT 1", $this->ID, $user_id, $value );
|
1862 |
$result = $wpdb->get_results($sql,ARRAY_A );
|
1863 |
|
1864 |
+
yop_poll_dump($sql);
|
1865 |
+
|
1866 |
if(isset($result[0]['vote_date']))
|
1867 |
return true;
|
1868 |
else
|
models/poll_model.php
CHANGED
@@ -293,6 +293,7 @@ Class YOP_POLL_Poll_Model extends YOP_POLL_Abstract_Model {
|
|
293 |
$template = str_ireplace( '%POLL-ID%', $poll_id . $unique_id, $template );
|
294 |
$template = str_ireplace( '%ANSWERS-TABULATED-COLS%', json_encode( $tabulate ), $template );
|
295 |
$template = str_ireplace( '%POLL-WIDTH%',str_replace( "px","",$this->template_width), $template );
|
|
|
296 |
$template = str_ireplace( '%RESULTS-TABULATED-COLS%', json_encode( $tabulate ), $template );
|
297 |
return stripslashes( $template );
|
298 |
}
|
@@ -558,8 +559,8 @@ Class YOP_POLL_Poll_Model extends YOP_POLL_Abstract_Model {
|
|
558 |
else {
|
559 |
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-CHECK-INPUT%', '<input type="radio" value="other" name="yop_poll_answer[' . $question->ID . ']" id="yop-poll-answer-' . $this->ID . $unique_id . '-' . $question->ID . '-other" />', $m );
|
560 |
}
|
561 |
-
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-LABEL%', '<label
|
562 |
-
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-TEXT-INPUT%', '<label
|
563 |
|
564 |
if( $this->is_view_poll_results() ) {
|
565 |
/**Display only if other answers were not displayed */
|
@@ -618,7 +619,7 @@ Class YOP_POLL_Poll_Model extends YOP_POLL_Abstract_Model {
|
|
618 |
}
|
619 |
$temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-LABEL%', '<label for="yop-poll-customfield-' . $this->ID . $unique_id . '-' . $custom_field->ID . '">' . yop_poll_kses( $custom_field->custom_field ) . '</label>', $m );
|
620 |
|
621 |
-
$temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-TEXT-INPUT%', '<input type="text" value="" name="yop_poll_customfield[' . $question->ID . '][' . $custom_field->ID . ']" id="yop-poll-customfield-' . $this->ID . $unique_id .'-'.$custom_field->ID.'"
|
622 |
$model .= $temp_string;
|
623 |
}
|
624 |
}
|
@@ -1517,7 +1518,7 @@ Class YOP_POLL_Poll_Model extends YOP_POLL_Abstract_Model {
|
|
1517 |
|
1518 |
$template = "";
|
1519 |
if( $load_css ) {
|
1520 |
-
$template .= '<style scoped>' . self::return_poll_css( $template_css, array( "location" => $location ) ) .' .yop-poll-forms-display{}
|
1521 |
|
1522 |
}
|
1523 |
|
293 |
$template = str_ireplace( '%POLL-ID%', $poll_id . $unique_id, $template );
|
294 |
$template = str_ireplace( '%ANSWERS-TABULATED-COLS%', json_encode( $tabulate ), $template );
|
295 |
$template = str_ireplace( '%POLL-WIDTH%',str_replace( "px","",$this->template_width), $template );
|
296 |
+
//yop_poll_dump($this->template_width);
|
297 |
$template = str_ireplace( '%RESULTS-TABULATED-COLS%', json_encode( $tabulate ), $template );
|
298 |
return stripslashes( $template );
|
299 |
}
|
559 |
else {
|
560 |
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-CHECK-INPUT%', '<input type="radio" value="other" name="yop_poll_answer[' . $question->ID . ']" id="yop-poll-answer-' . $this->ID . $unique_id . '-' . $question->ID . '-other" />', $m );
|
561 |
}
|
562 |
+
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-LABEL%', '<label for="yop-poll-answer-' . $this->ID . $unique_id . '-' . $question->ID . '-other">' . $other_answer_label . '</label>', $temp_answer_model );
|
563 |
+
$temp_answer_model = str_ireplace( '%POLL-OTHER-ANSWER-TEXT-INPUT%', '<label><input onclick="document.getElementById(\'yop-poll-answer-' . $this->ID . $unique_id . '-' . $question->ID . '-other' . '\').checked=true;" type="text" value="" name="yop_poll_other_answer[' . $question->ID . ']" id="yop-poll-other-answer-' . $this->ID . $unique_id . '-other" /></label>', $temp_answer_model );
|
564 |
|
565 |
if( $this->is_view_poll_results() ) {
|
566 |
/**Display only if other answers were not displayed */
|
619 |
}
|
620 |
$temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-LABEL%', '<label for="yop-poll-customfield-' . $this->ID . $unique_id . '-' . $custom_field->ID . '">' . yop_poll_kses( $custom_field->custom_field ) . '</label>', $m );
|
621 |
|
622 |
+
$temp_string = str_ireplace( '%POLL-CUSTOM-FIELD-TEXT-INPUT%', '<input type="text" value="" name="yop_poll_customfield[' . $question->ID . '][' . $custom_field->ID . ']" id="yop-poll-customfield-' . $this->ID . $unique_id .'-'.$custom_field->ID.'" />', $temp_string );
|
623 |
$model .= $temp_string;
|
624 |
}
|
625 |
}
|
1518 |
|
1519 |
$template = "";
|
1520 |
if( $load_css ) {
|
1521 |
+
$template .= '<style scoped>' . self::return_poll_css( $template_css, array( "location" => $location ) ) .' .yop-poll-forms-display{ opacity:0;}' . '</style>';
|
1522 |
|
1523 |
}
|
1524 |
|
readme.txt
CHANGED
@@ -142,15 +142,6 @@ You can have only one question per poll. If you want to ask more than one questi
|
|
142 |
|
143 |
== Changelog ==
|
144 |
|
145 |
-
= 5.7.3 =
|
146 |
-
* Fixed display poll issue
|
147 |
-
|
148 |
-
= 5.7.2 =
|
149 |
-
* Display poll improvements
|
150 |
-
|
151 |
-
= 5.7.1 =
|
152 |
-
* Fixed issue with polls not being displayed
|
153 |
-
|
154 |
= 5.7 =
|
155 |
* Fixed issue with random polls
|
156 |
* Fixed issue with tabulated display
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
= 5.7 =
|
146 |
* Fixed issue with random polls
|
147 |
* Fixed issue with tabulated display
|
yop_poll.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: YOP Poll
|
5 |
* Plugin URI: http://www.yop-poll.com
|
6 |
* Description: Use a full option polling functionality to get the answers you need. YOP Poll is the perfect, easy to use poll plugin for your WordPress website.
|
7 |
-
* Version: 5.7
|
8 |
* Author: yourownprogrammer
|
9 |
* Author URI: http://www.yop-poll.com
|
10 |
* License: GPLv2 or later
|
@@ -14,7 +14,7 @@ if (!(version_compare(phpversion(), '5.3', '<'))) {
|
|
14 |
|
15 |
define ( 'YOP_POLL_DOMAIN', 'yop_poll' );
|
16 |
define ( 'YOP_POLL_WP_VERSION', '3.3' );
|
17 |
-
define ( 'YOP_POLL_VERSION', '5.7
|
18 |
define ( 'YOP_POLL_PATH', plugin_dir_path( __FILE__ ) ); ///home/..../wp-content/plugins/yop-poll-2.0/
|
19 |
define ( 'YOP_POLL_URL', plugin_dir_url( __FILE__ ) ); //http://your-domain/wp-content/plugins/yop-poll-2.0/
|
20 |
define ( 'YOP_POLL_PLUGIN_FILE', __FILE__ ); ///home/..../wp-content/plugins/yop-poll-2.0/yop-poll-2.0.php
|
4 |
* Plugin Name: YOP Poll
|
5 |
* Plugin URI: http://www.yop-poll.com
|
6 |
* Description: Use a full option polling functionality to get the answers you need. YOP Poll is the perfect, easy to use poll plugin for your WordPress website.
|
7 |
+
* Version: 5.7
|
8 |
* Author: yourownprogrammer
|
9 |
* Author URI: http://www.yop-poll.com
|
10 |
* License: GPLv2 or later
|
14 |
|
15 |
define ( 'YOP_POLL_DOMAIN', 'yop_poll' );
|
16 |
define ( 'YOP_POLL_WP_VERSION', '3.3' );
|
17 |
+
define ( 'YOP_POLL_VERSION', '5.7' );
|
18 |
define ( 'YOP_POLL_PATH', plugin_dir_path( __FILE__ ) ); ///home/..../wp-content/plugins/yop-poll-2.0/
|
19 |
define ( 'YOP_POLL_URL', plugin_dir_url( __FILE__ ) ); //http://your-domain/wp-content/plugins/yop-poll-2.0/
|
20 |
define ( 'YOP_POLL_PLUGIN_FILE', __FILE__ ); ///home/..../wp-content/plugins/yop-poll-2.0/yop-poll-2.0.php
|