Version Description
New: ReCaptcha version 2.0 New: Arithmetic Captcha
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.7.56 |
Comparing to | |
See all releases |
Code changes from version 1.7.55 to 1.7.56
- admin/controllers/FMControllerFormmakerwdmathcaptcha.php +43 -0
- admin/models/FMModelFormmakerwdmathcaptcha.php +31 -0
- admin/models/FMModelManage_fm.php +32 -1
- admin/views/FMViewFormmakerwdcaptcha.php +1 -1
- admin/views/FMViewFormmakerwdmathcaptcha.php +117 -0
- css/form_maker_first.css +16 -0
- form-maker.php +4 -2
- frontend/models/FMModelForm_maker.php +25 -1
- frontend/views/FMViewForm_maker.php +77 -1
- js/formmaker_div_free.js +492 -23
- readme.txt +5 -1
admin/controllers/FMControllerFormmakerwdmathcaptcha.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMControllerFormmakerwdmathcaptcha {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$this->display();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function display() {
|
26 |
+
require_once WD_FM_DIR . "/admin/models/FMModelFormmakerwdmathcaptcha.php";
|
27 |
+
$model = new FMModelFormmakerwdmathcaptcha();
|
28 |
+
|
29 |
+
require_once WD_FM_DIR . "/admin/views/FMViewFormmakerwdmathcaptcha.php";
|
30 |
+
$view = new FMViewFormmakerwdmathcaptcha($model);
|
31 |
+
$view->display();
|
32 |
+
}
|
33 |
+
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Getters & Setters //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Private Methods //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Listeners //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
+
}
|
admin/models/FMModelFormmakerwdmathcaptcha.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMModelFormmakerwdmathcaptcha {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Getters & Setters //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
// Private Methods //
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Listeners //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
}
|
admin/models/FMModelManage_fm.php
CHANGED
@@ -152,6 +152,7 @@ class FMModelManage_fm {
|
|
152 |
|
153 |
case 'type_send_copy':
|
154 |
case 'type_captcha':
|
|
|
155 |
case 'type_recaptcha':
|
156 |
{
|
157 |
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FM_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_row("'.$id.'")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/left.png" title="Move the field to the left" onclick="left_row("'.$id.'")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/up.png" title="Move the field up" onclick="up_row("'.$id.'")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/down.png" title="Move the field down" onclick="down_row("'.$id.'")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/right.png" title="Move the field to the right" onclick="right_row("'.$id.'")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")"></div><div id="dublicate_'.$id.'" valign="middle" class="element_toolbar"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_up.png" title="Move the field to the upper page" onclick="page_up("'.$id.'")"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_down.png" title="Move the field to the lower page" onclick="page_down("'.$id.'")"></div></div>';
|
@@ -1214,7 +1215,37 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1214 |
|
1215 |
break;
|
1216 |
}
|
1217 |
-
case '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1218 |
{
|
1219 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
1220 |
$temp=$params;
|
152 |
|
153 |
case 'type_send_copy':
|
154 |
case 'type_captcha':
|
155 |
+
case 'type_arithmetic_captcha':
|
156 |
case 'type_recaptcha':
|
157 |
{
|
158 |
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FM_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_row("'.$id.'")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/left.png" title="Move the field to the left" onclick="left_row("'.$id.'")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/up.png" title="Move the field up" onclick="up_row("'.$id.'")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/down.png" title="Move the field down" onclick="down_row("'.$id.'")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/right.png" title="Move the field to the right" onclick="right_row("'.$id.'")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")"></div><div id="dublicate_'.$id.'" valign="middle" class="element_toolbar"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_up.png" title="Move the field to the upper page" onclick="page_up("'.$id.'")"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_down.png" title="Move the field to the lower page" onclick="page_down("'.$id.'")"></div></div>';
|
1215 |
|
1216 |
break;
|
1217 |
}
|
1218 |
+
case 'type_arithmetic_captcha':
|
1219 |
+
{
|
1220 |
+
$params_names=array('w_field_label_size','w_field_label_pos', 'w_count', 'w_operations','w_class', 'w_input_size');
|
1221 |
+
$temp=$params;
|
1222 |
+
foreach($params_names as $params_name )
|
1223 |
+
{
|
1224 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1225 |
+
$param[$params_name] = $temp[0];
|
1226 |
+
$temp=$temp[1];
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
if($temp)
|
1230 |
+
{
|
1231 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
1232 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
1233 |
+
foreach($attrs as $attr)
|
1234 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1238 |
+
$param['w_count'] = $param['w_count'] ? $param['w_count'] : 1;
|
1239 |
+
$param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
|
1240 |
+
$param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
|
1241 |
+
|
1242 |
+
$rep ='<div id="wdform_field'.$id.'" type="type_arithmetic_captcha" class="wdform_field" style="display: table-cell;">'.$arrows.'<div align="left" id="'.$id.'_label_sectionform_id_temp" class="'.$param['w_class'].'" style="display:'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label" style="vertical-align: top;">'.$label.'</span></div><div align="left" id="'.$id.'_element_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].';"><input type="hidden" value="type_captcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><img type="captcha" operations_count="'.$param['w_count'].'" operations="'.$param['w_operations'].'" input_size="'.$param['w_input_size'].'" src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha', 'operations_count' => $param['w_count'], 'operations' => $param['w_operations'], 'i' => 'form_id_temp'), admin_url('admin-ajax.php')) . '" id="_wd_arithmetic_captchaform_id_temp" class="arithmetic_captcha_img" onclick="captcha_refresh("_wd_arithmetic_captcha","form_id_temp")" '.$param['attributes'].'></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="_wd_arithmetic_captcha_inputform_id_temp" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: '.$param['w_input_size'].'px;" '.$param['attributes'].' disabled/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh("_wd_arithmetic_captcha","form_id_temp")" '.$param['attributes'].'></div></div></div></div></div></div>';
|
1243 |
+
|
1244 |
+
break;
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
|
1248 |
+
case 'type_recaptcha':
|
1249 |
{
|
1250 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
1251 |
$temp=$params;
|
admin/views/FMViewFormmakerwdcaptcha.php
CHANGED
@@ -55,7 +55,7 @@ class FMViewFormmakerwdcaptcha {
|
|
55 |
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
56 |
@session_start();
|
57 |
}
|
58 |
-
$_SESSION[$i . '_wd_captcha_code'] = $code;
|
59 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
60 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
61 |
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
55 |
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
56 |
@session_start();
|
57 |
}
|
58 |
+
$_SESSION[$i . '_wd_captcha_code'] = md5($code);
|
59 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
60 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
61 |
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
admin/views/FMViewFormmakerwdmathcaptcha.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewFormmakerwdmathcaptcha {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdmathcaptcha') {
|
27 |
+
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
28 |
+
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
29 |
+
$rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
|
30 |
+
$randNum = 0 + $r2 + $rrr;
|
31 |
+
$operations_count = (isset($_GET["operations_count"]) ? (int) $_GET["operations_count"] : 2);
|
32 |
+
$operations = (isset($_GET["operations"]) ? str_replace('@', '+', $_GET["operations"]) : '+,-');
|
33 |
+
$operations = preg_replace('/\s+/', '', $operations);
|
34 |
+
$cap_width = 2*($operations_count+1) * 20 + 10;
|
35 |
+
$cap_height = 26;
|
36 |
+
$cap_quality = 100;
|
37 |
+
|
38 |
+
$code = $this->code_generic($operations_count, $operations);
|
39 |
+
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
40 |
+
@session_start();
|
41 |
+
}
|
42 |
+
|
43 |
+
$_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
|
44 |
+
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
45 |
+
|
46 |
+
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
47 |
+
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
48 |
+
$code = $code[0];
|
49 |
+
$count = strlen($code);
|
50 |
+
$color_text = imagecolorallocate($canvas, 0, 0, 0);
|
51 |
+
for ($it = 0; $it < $count; $it++) {
|
52 |
+
$letter = $code[$it];
|
53 |
+
imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
|
54 |
+
}
|
55 |
+
for ($c = 0; $c < 150; $c++) {
|
56 |
+
$x = rand(0, $cap_width - 1);
|
57 |
+
$y = rand(0, 29);
|
58 |
+
$col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
|
59 |
+
imagesetpixel($canvas, $x, $y, $col);
|
60 |
+
}
|
61 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
62 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
63 |
+
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
64 |
+
header('Pragma: no-cache');
|
65 |
+
header('Content-Type: image/jpeg');
|
66 |
+
imagejpeg($canvas, NULL, $cap_quality);
|
67 |
+
}
|
68 |
+
die('');
|
69 |
+
}
|
70 |
+
|
71 |
+
private function code_generic($_length, $_operations) {
|
72 |
+
$cap = '';
|
73 |
+
$dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
74 |
+
$operations_array = array_filter(explode(',', $_operations));
|
75 |
+
for($k=0; $k <= $_length; $k++) {
|
76 |
+
if(substr($cap, -1) == '/' ) {
|
77 |
+
$operations_array = array_diff($operations_array, array('/'));
|
78 |
+
$num_divisors = $this->arrayOfNumberDivisors(substr($cap, -2, 1));
|
79 |
+
$cap .= $num_divisors[array_rand($num_divisors)];
|
80 |
+
}
|
81 |
+
else
|
82 |
+
$cap .= $dig[array_rand($dig)];
|
83 |
+
|
84 |
+
if($k != $_length)
|
85 |
+
$cap .= $operations_array[array_rand($operations_array)];
|
86 |
+
}
|
87 |
+
$pass = eval('return '.$cap.';');
|
88 |
+
if($pass < 0)
|
89 |
+
return $this->code_generic($_length, $_operations);
|
90 |
+
$cap .= '=';
|
91 |
+
$cap = implode(' ',str_split($cap));
|
92 |
+
|
93 |
+
return array($cap, $pass);
|
94 |
+
}
|
95 |
+
|
96 |
+
public function arrayOfNumberDivisors($x) {
|
97 |
+
$divisors = array ();
|
98 |
+
if($x == 0)
|
99 |
+
$divisors[] = rand(1, 9);
|
100 |
+
|
101 |
+
for($i = 1; $i <= $x; $i ++) {
|
102 |
+
if ($x % $i == 0) {
|
103 |
+
$divisors [] = $i;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
return $divisors;
|
107 |
+
}
|
108 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
109 |
+
// Getters & Setters //
|
110 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
111 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
112 |
+
// Private Methods //
|
113 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
114 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
+
// Listeners //
|
116 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
+
}
|
css/form_maker_first.css
CHANGED
@@ -113,6 +113,22 @@
|
|
113 |
vertical-align: middle;
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
.file_upload {
|
117 |
border-width: 1px;
|
118 |
margin: 0px;
|
113 |
vertical-align: middle;
|
114 |
}
|
115 |
|
116 |
+
.arithmetic_captcha_img {
|
117 |
+
border-width: 0px;
|
118 |
+
cursor: pointer;
|
119 |
+
margin: 0px;
|
120 |
+
padding: 0px;
|
121 |
+
vertical-align: middle;
|
122 |
+
}
|
123 |
+
|
124 |
+
.arithmetic_captcha_input {
|
125 |
+
border-width: 1px;
|
126 |
+
height: 25px;
|
127 |
+
margin-left: 3px;
|
128 |
+
padding: 0px;
|
129 |
+
vertical-align: middle;
|
130 |
+
}
|
131 |
+
|
132 |
.file_upload {
|
133 |
border-width: 1px;
|
134 |
margin: 0px;
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.7.
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -113,6 +113,8 @@ add_action('wp_ajax_generete_xml', 'form_maker_ajax'); // Export xml.
|
|
113 |
add_action('wp_ajax_FormMakerPreview', 'form_maker_ajax');
|
114 |
add_action('wp_ajax_formmakerwdcaptcha', 'form_maker_ajax'); // Generete captcha image and save it code in session.
|
115 |
add_action('wp_ajax_nopriv_formmakerwdcaptcha', 'form_maker_ajax'); // Generete captcha image and save it code in session for all users.
|
|
|
|
|
116 |
add_action('wp_ajax_fromeditcountryinpopup', 'form_maker_ajax'); // Open country list.
|
117 |
add_action('wp_ajax_product_option', 'form_maker_ajax'); // Open product options on add paypal field.
|
118 |
add_action('wp_ajax_frommapeditinpopup', 'form_maker_ajax'); // Open map in submissions.
|
@@ -231,7 +233,7 @@ if (class_exists('WP_Widget')) {
|
|
231 |
// Activate plugin.
|
232 |
function form_maker_activate() {
|
233 |
$version = get_option("wd_form_maker_version");
|
234 |
-
$new_version = '1.7.
|
235 |
if (!$version) {
|
236 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
237 |
global $wpdb;
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.7.56
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
113 |
add_action('wp_ajax_FormMakerPreview', 'form_maker_ajax');
|
114 |
add_action('wp_ajax_formmakerwdcaptcha', 'form_maker_ajax'); // Generete captcha image and save it code in session.
|
115 |
add_action('wp_ajax_nopriv_formmakerwdcaptcha', 'form_maker_ajax'); // Generete captcha image and save it code in session for all users.
|
116 |
+
add_action('wp_ajax_formmakerwdmathcaptcha', 'form_maker_ajax'); // Generete math captcha image and save it code in session.
|
117 |
+
add_action('wp_ajax_nopriv_formmakerwdmathcaptcha', 'form_maker_ajax'); // Generete math captcha image and save it code in session for all users.
|
118 |
add_action('wp_ajax_fromeditcountryinpopup', 'form_maker_ajax'); // Open country list.
|
119 |
add_action('wp_ajax_product_option', 'form_maker_ajax'); // Open product options on add paypal field.
|
120 |
add_action('wp_ajax_frommapeditinpopup', 'form_maker_ajax'); // Open map in submissions.
|
233 |
// Activate plugin.
|
234 |
function form_maker_activate() {
|
235 |
$version = get_option("wd_form_maker_version");
|
236 |
+
$new_version = '1.7.56';
|
237 |
if (!$version) {
|
238 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
239 |
global $wpdb;
|
frontend/models/FMModelForm_maker.php
CHANGED
@@ -69,7 +69,19 @@ class FMModelForm_maker {
|
|
69 |
if (isset($_POST["captcha_input"])) {
|
70 |
$captcha_input = esc_html($_POST["captcha_input"]);
|
71 |
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
72 |
-
if ($captcha_input == $session_wd_captcha_code) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
$correct = TRUE;
|
74 |
}
|
75 |
else {
|
@@ -93,6 +105,18 @@ class FMModelForm_maker {
|
|
93 |
<?php
|
94 |
}
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
else {
|
97 |
$correct = TRUE;
|
98 |
}
|
69 |
if (isset($_POST["captcha_input"])) {
|
70 |
$captcha_input = esc_html($_POST["captcha_input"]);
|
71 |
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
72 |
+
if (md5($captcha_input) == $session_wd_captcha_code) {
|
73 |
+
$correct = TRUE;
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
?>
|
77 |
+
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
78 |
+
<?php
|
79 |
+
}
|
80 |
+
}
|
81 |
+
elseif (isset($_POST["arithmetic_captcha_input"])) {
|
82 |
+
$arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
|
83 |
+
$session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
|
84 |
+
if (md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code) {
|
85 |
$correct = TRUE;
|
86 |
}
|
87 |
else {
|
105 |
<?php
|
106 |
}
|
107 |
}
|
108 |
+
elseif (isset($_POST["g-recaptcha-response"])){
|
109 |
+
$privatekey = $form->private_key;
|
110 |
+
$response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']);
|
111 |
+
$response = json_decode($response, true);
|
112 |
+
if($response["success"] === true)
|
113 |
+
$correct = TRUE;
|
114 |
+
else
|
115 |
+
?>
|
116 |
+
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
117 |
+
<?php
|
118 |
+
|
119 |
+
}
|
120 |
else {
|
121 |
$correct = TRUE;
|
122 |
}
|
frontend/views/FMViewForm_maker.php
CHANGED
@@ -2568,7 +2568,56 @@ class FMViewForm_maker {
|
|
2568 |
break;
|
2569 |
}
|
2570 |
|
2571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2572 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
2573 |
$temp=$params;
|
2574 |
foreach($params_names as $params_name ) {
|
@@ -2595,6 +2644,33 @@ class FMViewForm_maker {
|
|
2595 |
break;
|
2596 |
}
|
2597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2598 |
case 'type_hidden': {
|
2599 |
$params_names=array('w_name','w_value');
|
2600 |
$temp=$params;
|
2568 |
break;
|
2569 |
}
|
2570 |
|
2571 |
+
case 'type_arithmetic_captcha':
|
2572 |
+
{
|
2573 |
+
$params_names=array('w_field_label_size','w_field_label_pos', 'w_count', 'w_operations','w_class', 'w_input_size');
|
2574 |
+
$temp=$params;
|
2575 |
+
foreach($params_names as $params_name )
|
2576 |
+
{
|
2577 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2578 |
+
$param[$params_name] = $temp[0];
|
2579 |
+
$temp=$temp[1];
|
2580 |
+
}
|
2581 |
+
|
2582 |
+
if($temp)
|
2583 |
+
{
|
2584 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2585 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2586 |
+
foreach($attrs as $attr)
|
2587 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
2588 |
+
}
|
2589 |
+
|
2590 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2591 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2592 |
+
$param['w_count'] = $param['w_count'] ? $param['w_count'] : 1;
|
2593 |
+
$param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
|
2594 |
+
$param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
|
2595 |
+
|
2596 |
+
$rep ='<div type="type_arithmetic_captcha" class="wdform-field">
|
2597 |
+
<div align="left" class="wdform-label-section" style="display:'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label" style="vertical-align: top;">'.$label.'</span></div><div class="wdform-element-section '.$param['w_class'].'" style="display: '.$param['w_field_label_pos2'].';"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell; vertical-align: middle;"><img type="captcha" operations_count="'.$param['w_count'].'" operations="'.$param['w_operations'].'" src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha', 'operations_count' => $param['w_count'], 'operations' => $param['w_operations'], 'i' => $form_id), admin_url('admin-ajax.php')) . '" id="wd_arithmetic_captcha'.$form_id.'" class="arithmetic_captcha_img" '.$param['attributes'].'></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="wd_arithmetic_captcha_input'.$form_id.'" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: '.$param['w_input_size'].'px;" '.$param['attributes'].'/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refresh'.$form_id.'" '.$param['attributes'].'></div></div></div></div></div></div>';
|
2598 |
+
|
2599 |
+
$onload_js .='jQuery("#wd_arithmetic_captcha'.$form_id.'").click(function() { captcha_refresh("wd_arithmetic_captcha","'.$form_id.'") });';
|
2600 |
+
$onload_js .='jQuery("#_element_refresh'.$form_id.'").click(function() {captcha_refresh("wd_arithmetic_captcha","'.$form_id.'")});';
|
2601 |
+
|
2602 |
+
$check_js.='
|
2603 |
+
if(x.find(jQuery("div[wdid='.$id1.']")).length != 0 && x.find(jQuery("div[wdid='.$id1.']")).css("display") != "none")
|
2604 |
+
{
|
2605 |
+
if(jQuery("#wd_arithmetic_captcha_input'.$form_id.'").val()=="")
|
2606 |
+
{
|
2607 |
+
alert("' .addslashes($label. ' ' . __('field is required.', 'form_maker')) . '");
|
2608 |
+
old_bg=x.find(jQuery("div[wdid='.$id1.']")).css("background-color");
|
2609 |
+
x.find(jQuery("div[wdid='.$id1.']")).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
|
2610 |
+
jQuery("#wd_arithmetic_captcha_input'.$form_id.'").focus();
|
2611 |
+
return false;
|
2612 |
+
}
|
2613 |
+
}
|
2614 |
+
';
|
2615 |
+
$onload_js.= 'captcha_refresh("wd_arithmetic_captcha", "'.$form_id.'");';
|
2616 |
+
break;
|
2617 |
+
}
|
2618 |
+
|
2619 |
+
|
2620 |
+
case 'type_recaptcha_old': {
|
2621 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
2622 |
$temp=$params;
|
2623 |
foreach($params_names as $params_name ) {
|
2644 |
break;
|
2645 |
}
|
2646 |
|
2647 |
+
case 'type_recaptcha': {
|
2648 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_class');
|
2649 |
+
$temp=$params;
|
2650 |
+
foreach($params_names as $params_name ) {
|
2651 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2652 |
+
$param[$params_name] = $temp[0];
|
2653 |
+
$temp=$temp[1];
|
2654 |
+
}
|
2655 |
+
if($temp) {
|
2656 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2657 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2658 |
+
foreach($attrs as $attr) {
|
2659 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2660 |
+
}
|
2661 |
+
}
|
2662 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2663 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2664 |
+
|
2665 |
+
//<div id="wd_recaptcha'.$form_id.'" '.$param['attributes'].'>'.$secure_server.'</div>
|
2666 |
+
$publickey=($row->public_key ? $row->public_key : '0');
|
2667 |
+
$error = null;
|
2668 |
+
require_once(WD_FM_DIR . '/recaptchalib.php');
|
2669 |
+
$secure_server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? recaptcha_get_html($publickey, $error, true) : recaptcha_get_html($publickey, $error);
|
2670 |
+
$rep =' <script src="https://www.google.com/recaptcha/api.js"></script><div type="type_recaptcha" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span></div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].';"><div class="g-recaptcha" data-sitekey="'.$publickey.'"></div></div></div>';
|
2671 |
+
break;
|
2672 |
+
}
|
2673 |
+
|
2674 |
case 'type_hidden': {
|
2675 |
$params_names=array('w_name','w_value');
|
2676 |
$temp=$params;
|
js/formmaker_div_free.js
CHANGED
@@ -235,7 +235,14 @@ function refresh_attr(x,type)
|
|
235 |
id_array[2]='_element_refreshform_id_temp';
|
236 |
break;
|
237 |
}
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
case "type_recaptcha":
|
240 |
|
241 |
{
|
@@ -1843,6 +1850,23 @@ function change_captcha_digit(digit) {
|
|
1843 |
}
|
1844 |
}
|
1845 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1846 |
function second_no(id)
|
1847 |
{
|
1848 |
time_box=document.getElementById(id+'_tr_time1');
|
@@ -23557,6 +23581,387 @@ change_class(w_class, i);
|
|
23557 |
refresh_attr(i, 'type_captcha');
|
23558 |
}
|
23559 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23560 |
function type_map(i, w_center_x, w_center_y, w_long, w_lat, w_zoom, w_width, w_height, w_class, w_info, w_attr_name, w_attr_value){
|
23561 |
document.getElementById("element_type").value="type_map";
|
23562 |
delete_last_child();
|
@@ -26698,18 +27103,24 @@ else
|
|
26698 |
|
26699 |
function el_captcha()
|
26700 |
{
|
26701 |
-
//edit table
|
26702 |
-
if(document.getElementById("editing_id").value)
|
26703 |
-
|
26704 |
-
else
|
26705 |
-
|
26706 |
-
|
26707 |
if(document.getElementById('_wd_captchaform_id_temp'))
|
26708 |
{
|
26709 |
alert("The captcha already has been created.");
|
26710 |
return;
|
26711 |
}
|
26712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
26713 |
if(document.getElementById('wd_recaptchaform_id_temp'))
|
26714 |
{
|
26715 |
alert("The captcha already has been created.");
|
@@ -26717,30 +27128,42 @@ else
|
|
26717 |
}
|
26718 |
|
26719 |
var el_type_label = document.createElement('label');
|
26720 |
-
|
26721 |
el_type_label.innerHTML = "<br /> Field type";
|
26722 |
|
26723 |
var el_type_radio_captcha = document.createElement('input');
|
26724 |
-
|
26725 |
-
|
26726 |
-
|
26727 |
-
|
26728 |
-
|
26729 |
-
|
26730 |
el_type_radio_captcha.setAttribute("checked", "checked");
|
26731 |
|
26732 |
var el_type_label_captcha = document.createElement('label');
|
26733 |
el_type_label_captcha.setAttribute("for", "el_type_captcha");
|
26734 |
el_type_label_captcha.innerHTML = 'Simple Captcha';
|
26735 |
|
26736 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26737 |
var el_type_radio_recaptcha = document.createElement('input');
|
26738 |
-
|
26739 |
-
|
26740 |
-
|
26741 |
-
|
26742 |
-
|
26743 |
-
|
26744 |
|
26745 |
var el_type_label_recaptcha = document.createElement('label');
|
26746 |
el_type_label_recaptcha.setAttribute("for", "el_type_radio_recaptcha");
|
@@ -26758,10 +27181,12 @@ else
|
|
26758 |
td.appendChild(el_type_radio_captcha);
|
26759 |
td.appendChild(el_type_label_captcha);
|
26760 |
td.appendChild(br2);
|
|
|
|
|
|
|
26761 |
td.appendChild(el_type_radio_recaptcha);
|
26762 |
td.appendChild(el_type_label_recaptcha);
|
26763 |
|
26764 |
-
|
26765 |
var pos=document.getElementsByName("el_pos");
|
26766 |
pos[0].removeAttribute("disabled");
|
26767 |
pos[1].removeAttribute("disabled");
|
@@ -26782,6 +27207,13 @@ function go_to_type_captcha(new_id)
|
|
26782 |
type_captcha(new_id,'Word Verification:', '100', 'left', '6','',w_attr_name, w_attr_value);
|
26783 |
}
|
26784 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26785 |
function go_to_type_recaptcha(new_id)
|
26786 |
{
|
26787 |
w_attr_name=[];
|
@@ -28678,7 +29110,7 @@ function add(key, after_edit, wdid)
|
|
28678 |
wdform_arrows.appendChild(td_RIGHT);
|
28679 |
wdform_arrows.appendChild(td_EDIT);
|
28680 |
|
28681 |
-
if(type!="type_captcha" && type!="type_recaptcha" && type!="type_send_copy")
|
28682 |
{
|
28683 |
wdform_arrows.appendChild(td_DUBLICATE);
|
28684 |
}
|
@@ -29793,6 +30225,17 @@ function edit(id)
|
|
29793 |
|
29794 |
type_captcha(id, w_field_label, w_field_label_size, w_field_label_pos, w_digit, w_class, w_attr_name, w_attr_value); break;
|
29795 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29796 |
case 'type_recaptcha':
|
29797 |
{
|
29798 |
w_public = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
@@ -32540,6 +32983,32 @@ function gen_form_fields()
|
|
32540 |
break;
|
32541 |
|
32542 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32543 |
case 'type_recaptcha':
|
32544 |
{
|
32545 |
w_public = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
235 |
id_array[2]='_element_refreshform_id_temp';
|
236 |
break;
|
237 |
}
|
238 |
+
case "type_arithmetic_captcha":
|
239 |
+
{
|
240 |
+
id_array=Array();
|
241 |
+
id_array[0]='_wd_arithmetic_captchaform_id_temp';
|
242 |
+
id_array[1]='_wd_arithmetic_captcha_inputform_id_temp';
|
243 |
+
id_array[2]='_element_refreshform_id_temp';
|
244 |
+
break;
|
245 |
+
}
|
246 |
case "type_recaptcha":
|
247 |
|
248 |
{
|
1850 |
}
|
1851 |
}
|
1852 |
|
1853 |
+
function change_arithmetic_captcha(value, field) {
|
1854 |
+
arithmetic_captcha = document.getElementById('_wd_arithmetic_captchaform_id_temp');
|
1855 |
+
if (field == 'oper_count') {
|
1856 |
+
oper_count = value ? value : 1;
|
1857 |
+
operations = document.getElementById('el_operations') ? document.getElementById('el_operations').value : '+, -, *, /';
|
1858 |
+
} else {
|
1859 |
+
operations = value ? value : '+, -, *, /';
|
1860 |
+
oper_count = document.getElementById('el_oper_count') ? document.getElementById('el_oper_count').value : 1;
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
arithmetic_captcha.setAttribute("operations_count", oper_count);
|
1864 |
+
arithmetic_captcha.setAttribute("operations", operations);
|
1865 |
+
arithmetic_captcha.setAttribute("src", url_for_ajax + "?action=formmakerwdmathcaptcha&operations_count="+oper_count+"&operations="+operations.replace('+','@')+"&i=form_id_temp");
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
|
1869 |
+
|
1870 |
function second_no(id)
|
1871 |
{
|
1872 |
time_box=document.getElementById(id+'_tr_time1');
|
23581 |
refresh_attr(i, 'type_captcha');
|
23582 |
}
|
23583 |
|
23584 |
+
function type_arithmetic_captcha(i,w_field_label, w_field_label_size, w_field_label_pos, w_count, w_operations, w_class, w_input_size, w_attr_name, w_attr_value){
|
23585 |
+
document.getElementById("element_type").value="type_arithmetic_captcha";
|
23586 |
+
|
23587 |
+
delete_last_child();
|
23588 |
+
// edit table
|
23589 |
+
var edit_div = document.createElement('div');
|
23590 |
+
edit_div.setAttribute("id", "edit_div");
|
23591 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
23592 |
+
|
23593 |
+
var edit_main_table = document.createElement('table');
|
23594 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
23595 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
23596 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
23597 |
+
|
23598 |
+
var edit_main_tr1 = document.createElement('tr');
|
23599 |
+
var edit_main_tr2 = document.createElement('tr');
|
23600 |
+
var edit_main_tr3 = document.createElement('tr');
|
23601 |
+
var edit_main_tr4 = document.createElement('tr');
|
23602 |
+
var edit_main_tr5 = document.createElement('tr');
|
23603 |
+
var edit_main_tr6 = document.createElement('tr');
|
23604 |
+
var edit_main_tr7 = document.createElement('tr');
|
23605 |
+
var edit_main_tr8 = document.createElement('tr');
|
23606 |
+
|
23607 |
+
var edit_main_td1 = document.createElement('td');
|
23608 |
+
var edit_main_td1_1 = document.createElement('td');
|
23609 |
+
var edit_main_td2 = document.createElement('td');
|
23610 |
+
var edit_main_td2_1 = document.createElement('td');
|
23611 |
+
var edit_main_td3 = document.createElement('td');
|
23612 |
+
var edit_main_td3_1 = document.createElement('td');
|
23613 |
+
var edit_main_td4 = document.createElement('td');
|
23614 |
+
var edit_main_td4_1 = document.createElement('td');
|
23615 |
+
var edit_main_td5 = document.createElement('td');
|
23616 |
+
var edit_main_td5_1 = document.createElement('td');
|
23617 |
+
var edit_main_td6 = document.createElement('td');
|
23618 |
+
var edit_main_td6_1 = document.createElement('td');
|
23619 |
+
var edit_main_td7 = document.createElement('td');
|
23620 |
+
var edit_main_td7_1 = document.createElement('td');
|
23621 |
+
var edit_main_td8 = document.createElement('td');
|
23622 |
+
var edit_main_td8_1 = document.createElement('td');
|
23623 |
+
|
23624 |
+
var el_label_label = document.createElement('label');
|
23625 |
+
el_label_label.setAttribute("for", "edit_for_label");
|
23626 |
+
el_label_label.innerHTML = "Field label";
|
23627 |
+
|
23628 |
+
var el_label_textarea = document.createElement('textarea');
|
23629 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
23630 |
+
el_label_textarea.setAttribute("rows", "4");
|
23631 |
+
el_label_textarea.style.cssText = "width:200px";
|
23632 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
23633 |
+
el_label_textarea.innerHTML = w_field_label;
|
23634 |
+
|
23635 |
+
var el_label_size_label = document.createElement('label');
|
23636 |
+
el_label_size_label.setAttribute("for", "edit_for_label_size");
|
23637 |
+
el_label_size_label.innerHTML = "Field label size(px) ";
|
23638 |
+
|
23639 |
+
var el_label_size = document.createElement('input');
|
23640 |
+
el_label_size.setAttribute("id", "edit_for_label_size");
|
23641 |
+
el_label_size.setAttribute("type", "text");
|
23642 |
+
el_label_size.setAttribute("value", w_field_label_size);
|
23643 |
+
el_label_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
23644 |
+
el_label_size.setAttribute("onKeyUp", "change_w_style('"+i+"_label_sectionform_id_temp', this.value)");
|
23645 |
+
|
23646 |
+
var el_label_position_label = document.createElement('label');
|
23647 |
+
el_label_position_label.innerHTML = "Field label position";
|
23648 |
+
|
23649 |
+
var el_label_position1 = document.createElement('input');
|
23650 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
23651 |
+
el_label_position1.setAttribute("type", "radio");
|
23652 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
23653 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
23654 |
+
|
23655 |
+
Left = document.createTextNode("Left");
|
23656 |
+
|
23657 |
+
var el_label_position2 = document.createElement('input');
|
23658 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
23659 |
+
el_label_position2.setAttribute("type", "radio");
|
23660 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
23661 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
23662 |
+
Top = document.createTextNode("Top");
|
23663 |
+
|
23664 |
+
if(w_field_label_pos=="top")
|
23665 |
+
el_label_position2.setAttribute("checked", "checked");
|
23666 |
+
else
|
23667 |
+
el_label_position1.setAttribute("checked", "checked");
|
23668 |
+
|
23669 |
+
var el_operations_label = document.createElement('label');
|
23670 |
+
el_operations_label.setAttribute("for", "el_style_textarea");
|
23671 |
+
el_operations_label.innerHTML = "Arithmetic operations";
|
23672 |
+
|
23673 |
+
var el_operations = document.createElement('input');
|
23674 |
+
el_operations.setAttribute("id", "el_operations");
|
23675 |
+
el_operations.setAttribute("type", "text");
|
23676 |
+
el_operations.setAttribute("value", w_operations);
|
23677 |
+
el_operations.setAttribute("onChange", "change_arithmetic_captcha(this.value, 'operations')");
|
23678 |
+
|
23679 |
+
var el_size_label = document.createElement('label');
|
23680 |
+
el_size_label.setAttribute("for", "el_oper_count");
|
23681 |
+
el_size_label.innerHTML = "Operations count";
|
23682 |
+
|
23683 |
+
var el_oper_count = document.createElement('input');
|
23684 |
+
el_oper_count.setAttribute("id", "el_oper_count");
|
23685 |
+
el_oper_count.setAttribute("type", "text");
|
23686 |
+
el_oper_count.setAttribute("value", w_count);
|
23687 |
+
el_oper_count.setAttribute("name", "el_oper_count");
|
23688 |
+
el_oper_count.setAttribute("onKeyPress", "return check_isnum(event)");
|
23689 |
+
el_oper_count.setAttribute("onKeyUp", "change_arithmetic_captcha(this.value, 'oper_count')");
|
23690 |
+
|
23691 |
+
var el_size_captcha_label = document.createElement('label');
|
23692 |
+
el_size_captcha_label.setAttribute("for", "el_captcha_input_size");
|
23693 |
+
el_size_captcha_label.innerHTML = "Captcha input size";
|
23694 |
+
|
23695 |
+
var el_size_captcha_input = document.createElement('input');
|
23696 |
+
el_size_captcha_input.setAttribute("id", "el_captcha_input_size");
|
23697 |
+
el_size_captcha_input.setAttribute("type", "text");
|
23698 |
+
el_size_captcha_input.setAttribute("value", w_input_size);
|
23699 |
+
el_size_captcha_input.setAttribute("name", "el_captcha_input_size");
|
23700 |
+
el_size_captcha_input.setAttribute("onKeyPress", "return check_isnum(event)");
|
23701 |
+
el_size_captcha_input.setAttribute("onKeyUp", "change_w_style('_wd_arithmetic_captcha_inputform_id_temp', this.value)");
|
23702 |
+
|
23703 |
+
var el_style_label = document.createElement('label');
|
23704 |
+
el_style_label.setAttribute("for", "el_style_textarea");
|
23705 |
+
el_style_label.innerHTML = "Class name";
|
23706 |
+
|
23707 |
+
var el_style_textarea = document.createElement('input');
|
23708 |
+
el_style_textarea.setAttribute("id", "el_style_textarea");
|
23709 |
+
el_style_textarea.setAttribute("type", "text");
|
23710 |
+
el_style_textarea.setAttribute("value", w_class);
|
23711 |
+
el_style_textarea.style.cssText = "width:200px;";
|
23712 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
23713 |
+
|
23714 |
+
var el_attr_label = document.createElement('label');
|
23715 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
23716 |
+
|
23717 |
+
var el_attr_add = document.createElement('img');
|
23718 |
+
el_attr_add.setAttribute("src", plugin_url + '/images/add.png');
|
23719 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
23720 |
+
el_attr_add.setAttribute("title", 'add');
|
23721 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_arithmetic_captcha')");
|
23722 |
+
|
23723 |
+
var el_attr_table = document.createElement('table');
|
23724 |
+
el_attr_table.setAttribute("id", 'attributes');
|
23725 |
+
el_attr_table.setAttribute("border", '0');
|
23726 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
23727 |
+
|
23728 |
+
var el_attr_tr_label = document.createElement('tr');
|
23729 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
23730 |
+
|
23731 |
+
var el_attr_td_name_label = document.createElement('th');
|
23732 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
23733 |
+
|
23734 |
+
var el_attr_td_value_label = document.createElement('th');
|
23735 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
23736 |
+
|
23737 |
+
var el_attr_td_X_label = document.createElement('th');
|
23738 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
23739 |
+
|
23740 |
+
var el_attr_name_label = document.createElement('label');
|
23741 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
23742 |
+
el_attr_name_label.innerHTML = "Name";
|
23743 |
+
|
23744 |
+
var el_attr_value_label = document.createElement('label');
|
23745 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
23746 |
+
el_attr_value_label.innerHTML = "Value";
|
23747 |
+
|
23748 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
23749 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
23750 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
23751 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
23752 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
23753 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
23754 |
+
|
23755 |
+
n=w_attr_name.length;
|
23756 |
+
for(j=1; j<=n; j++)
|
23757 |
+
{
|
23758 |
+
var el_attr_tr = document.createElement('tr');
|
23759 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
23760 |
+
el_attr_tr.setAttribute("idi", j);
|
23761 |
+
var el_attr_td_name = document.createElement('td');
|
23762 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
23763 |
+
var el_attr_td_value = document.createElement('td');
|
23764 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
23765 |
+
|
23766 |
+
var el_attr_td_X = document.createElement('td');
|
23767 |
+
var el_attr_name = document.createElement('input');
|
23768 |
+
el_attr_name.setAttribute("type", "text");
|
23769 |
+
el_attr_name.style.cssText = "width:100px";
|
23770 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
23771 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
23772 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_arithmetic_captcha')");
|
23773 |
+
|
23774 |
+
var el_attr_value = document.createElement('input');
|
23775 |
+
el_attr_value.setAttribute("type", "text");
|
23776 |
+
el_attr_value.style.cssText = "width:100px";
|
23777 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
23778 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
23779 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_arithmetic_captcha')");
|
23780 |
+
|
23781 |
+
var el_attr_remove = document.createElement('img');
|
23782 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
23783 |
+
el_attr_remove.setAttribute("src", plugin_url + '/images/delete.png');
|
23784 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
23785 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_arithmetic_captcha')");
|
23786 |
+
el_attr_table.appendChild(el_attr_tr);
|
23787 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
23788 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
23789 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
23790 |
+
el_attr_td_name.appendChild(el_attr_name);
|
23791 |
+
el_attr_td_value.appendChild(el_attr_value);
|
23792 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
23793 |
+
}
|
23794 |
+
|
23795 |
+
var t = document.getElementById('edit_table');
|
23796 |
+
var br = document.createElement('br');
|
23797 |
+
var br1 = document.createElement('br');
|
23798 |
+
var br2 = document.createElement('br');
|
23799 |
+
var br3 = document.createElement('br');
|
23800 |
+
var br4 = document.createElement('br');
|
23801 |
+
var br5 = document.createElement('br');
|
23802 |
+
var br6 = document.createElement('br');
|
23803 |
+
|
23804 |
+
edit_main_td1.appendChild(el_label_label);
|
23805 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
23806 |
+
|
23807 |
+
edit_main_td7.appendChild(el_label_size_label);
|
23808 |
+
edit_main_td7_1.appendChild(el_label_size);
|
23809 |
+
|
23810 |
+
edit_main_td2.appendChild(el_label_position_label);
|
23811 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
23812 |
+
edit_main_td2_1.appendChild(Left);
|
23813 |
+
edit_main_td2_1.appendChild(br2);
|
23814 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
23815 |
+
edit_main_td2_1.appendChild(Top);
|
23816 |
+
|
23817 |
+
edit_main_td3.appendChild(el_size_label);
|
23818 |
+
edit_main_td3_1.appendChild(el_oper_count);
|
23819 |
+
|
23820 |
+
edit_main_td8.appendChild(el_size_captcha_label);
|
23821 |
+
edit_main_td8_1.appendChild(el_size_captcha_input);
|
23822 |
+
|
23823 |
+
edit_main_td6.appendChild(el_operations_label);
|
23824 |
+
edit_main_td6_1.appendChild(el_operations);
|
23825 |
+
|
23826 |
+
edit_main_td4.appendChild(el_style_label);
|
23827 |
+
edit_main_td4_1.appendChild(el_style_textarea);
|
23828 |
+
|
23829 |
+
edit_main_td5.appendChild(el_attr_label);
|
23830 |
+
edit_main_td5.appendChild(el_attr_add);
|
23831 |
+
edit_main_td5.appendChild(br3);
|
23832 |
+
edit_main_td5.appendChild(el_attr_table);
|
23833 |
+
edit_main_td5.setAttribute("colspan", "2");
|
23834 |
+
|
23835 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
23836 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
23837 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
23838 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
23839 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
23840 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
23841 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
23842 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
23843 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
23844 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
23845 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
23846 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
23847 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
23848 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
23849 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
23850 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
23851 |
+
edit_main_table.appendChild(edit_main_tr1);
|
23852 |
+
edit_main_table.appendChild(edit_main_tr7);
|
23853 |
+
edit_main_table.appendChild(edit_main_tr2);
|
23854 |
+
edit_main_table.appendChild(edit_main_tr6);
|
23855 |
+
edit_main_table.appendChild(edit_main_tr3);
|
23856 |
+
edit_main_table.appendChild(edit_main_tr8);
|
23857 |
+
edit_main_table.appendChild(edit_main_tr4);
|
23858 |
+
edit_main_table.appendChild(edit_main_tr5);
|
23859 |
+
edit_div.appendChild(edit_main_table);
|
23860 |
+
|
23861 |
+
t.appendChild(edit_div);
|
23862 |
+
add_id_and_name(i, 'type_arithmetic_captcha');
|
23863 |
+
|
23864 |
+
var adding_type = document.createElement("input");
|
23865 |
+
adding_type.setAttribute("type", "hidden");
|
23866 |
+
adding_type.setAttribute("value", "type_arithmetic_captcha");
|
23867 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
23868 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
23869 |
+
|
23870 |
+
var adding = document.createElement('img');
|
23871 |
+
adding.setAttribute("type", type);
|
23872 |
+
adding.setAttribute("operations_count", w_count);
|
23873 |
+
adding.setAttribute("operations", w_operations);
|
23874 |
+
adding.setAttribute("input_size", w_input_size);
|
23875 |
+
adding.setAttribute("src", url_for_ajax + "?action=formmakerwdmathcaptcha&operations_count="+w_count+"&operations="+w_operations.replace("+", "@")+"&i=form_id_temp");
|
23876 |
+
adding.setAttribute("id", "_wd_arithmetic_captchaform_id_temp");
|
23877 |
+
adding.setAttribute("class", "arithmetic_captcha_img");
|
23878 |
+
adding.setAttribute("onClick", "captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");
|
23879 |
+
|
23880 |
+
var refresh_captcha = document.createElement("div");
|
23881 |
+
refresh_captcha.setAttribute("class", "captcha_refresh");
|
23882 |
+
refresh_captcha.setAttribute("id", "_element_refreshform_id_temp");
|
23883 |
+
refresh_captcha.setAttribute("onClick", "captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");
|
23884 |
+
|
23885 |
+
var input_captcha = document.createElement("input");
|
23886 |
+
input_captcha.setAttribute("type", "text");
|
23887 |
+
input_captcha.style.cssText = "width:"+w_input_size+"px;";
|
23888 |
+
input_captcha.setAttribute("class", "arithmetic_captcha_input");
|
23889 |
+
input_captcha.setAttribute("id", "_wd_arithmetic_captcha_inputform_id_temp");
|
23890 |
+
input_captcha.setAttribute("name", "arithmetic_captcha_input");
|
23891 |
+
input_captcha.setAttribute("onKeyPress", "return check_isnum(event)");
|
23892 |
+
|
23893 |
+
var div = document.createElement('div');
|
23894 |
+
div.setAttribute("id", "main_div");
|
23895 |
+
|
23896 |
+
var div_field = document.createElement('div');
|
23897 |
+
div_field.setAttribute("id", i+"_elemet_tableform_id_temp");
|
23898 |
+
|
23899 |
+
var div_label = document.createElement('div');
|
23900 |
+
div_label.setAttribute("align", 'left');
|
23901 |
+
div_label.style.display="table-cell";
|
23902 |
+
div_label.style.width=w_field_label_size+"px";
|
23903 |
+
div_label.setAttribute("id", i+"_label_sectionform_id_temp");
|
23904 |
+
|
23905 |
+
var div_element = document.createElement('div');
|
23906 |
+
div_element.setAttribute("align", 'left');
|
23907 |
+
div_element.style.display="table-cell";
|
23908 |
+
div_element.setAttribute("id", i+"_element_sectionform_id_temp");
|
23909 |
+
|
23910 |
+
var captcha_table = document.createElement('div');
|
23911 |
+
captcha_table.style.display="table";
|
23912 |
+
|
23913 |
+
var captcha_tr1 = document.createElement('div');
|
23914 |
+
captcha_tr1.style.display="table-row";
|
23915 |
+
var captcha_tr2 = document.createElement('div');
|
23916 |
+
captcha_tr2.style.display="table-row";
|
23917 |
+
|
23918 |
+
var captcha_td1 = document.createElement('div');
|
23919 |
+
captcha_td1.style.display="table-cell";
|
23920 |
+
|
23921 |
+
var captcha_td2 = document.createElement('div');
|
23922 |
+
captcha_td2.style.cssText = "display:table-cell; vertical-align:middle;";
|
23923 |
+
var captcha_td3 = document.createElement('div');
|
23924 |
+
captcha_td3.style.display="table-cell";
|
23925 |
+
|
23926 |
+
captcha_table.appendChild(captcha_tr1);
|
23927 |
+
captcha_table.appendChild(captcha_tr2);
|
23928 |
+
captcha_tr1.appendChild(captcha_td1);
|
23929 |
+
captcha_tr1.appendChild(captcha_td3);
|
23930 |
+
captcha_tr1.appendChild(captcha_td2);
|
23931 |
+
// captcha_tr2.appendChild(captcha_td3);
|
23932 |
+
captcha_td1.appendChild(adding);
|
23933 |
+
captcha_td2.appendChild(refresh_captcha);
|
23934 |
+
captcha_td3.appendChild(input_captcha);
|
23935 |
+
|
23936 |
+
var br1 = document.createElement('br');
|
23937 |
+
var br2 = document.createElement('br');
|
23938 |
+
var br3 = document.createElement('br');
|
23939 |
+
var br4 = document.createElement('br');
|
23940 |
+
|
23941 |
+
var label = document.createElement('span');
|
23942 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
23943 |
+
label.innerHTML = w_field_label;
|
23944 |
+
label.setAttribute("class", "label");
|
23945 |
+
label.style.verticalAlign="top";
|
23946 |
+
|
23947 |
+
var main_td = document.getElementById('show_table');
|
23948 |
+
|
23949 |
+
div_label.appendChild(label);
|
23950 |
+
div_element.appendChild(adding_type);
|
23951 |
+
div_element.appendChild(captcha_table);
|
23952 |
+
div_field.appendChild(div_label);
|
23953 |
+
div_field.appendChild(div_element);
|
23954 |
+
div.appendChild(div_field);
|
23955 |
+
div.appendChild(br3);
|
23956 |
+
main_td.appendChild(div);
|
23957 |
+
|
23958 |
+
if(w_field_label_pos=="top")
|
23959 |
+
label_top(i);
|
23960 |
+
change_class(w_class, i);
|
23961 |
+
refresh_attr(i, 'type_arithmetic_captcha');
|
23962 |
+
}
|
23963 |
+
|
23964 |
+
|
23965 |
function type_map(i, w_center_x, w_center_y, w_long, w_lat, w_zoom, w_width, w_height, w_class, w_info, w_attr_name, w_attr_value){
|
23966 |
document.getElementById("element_type").value="type_map";
|
23967 |
delete_last_child();
|
27103 |
|
27104 |
function el_captcha()
|
27105 |
{
|
27106 |
+
//edit table
|
27107 |
+
if(document.getElementById("editing_id").value)
|
27108 |
+
new_id=document.getElementById("editing_id").value;
|
27109 |
+
else
|
27110 |
+
new_id=gen;
|
27111 |
+
|
27112 |
if(document.getElementById('_wd_captchaform_id_temp'))
|
27113 |
{
|
27114 |
alert("The captcha already has been created.");
|
27115 |
return;
|
27116 |
}
|
27117 |
|
27118 |
+
if(document.getElementById('_wd_arithmetic_captchaform_id_temp'))
|
27119 |
+
{
|
27120 |
+
alert("The captcha already has been created.");
|
27121 |
+
return;
|
27122 |
+
}
|
27123 |
+
|
27124 |
if(document.getElementById('wd_recaptchaform_id_temp'))
|
27125 |
{
|
27126 |
alert("The captcha already has been created.");
|
27128 |
}
|
27129 |
|
27130 |
var el_type_label = document.createElement('label');
|
27131 |
+
el_type_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
27132 |
el_type_label.innerHTML = "<br /> Field type";
|
27133 |
|
27134 |
var el_type_radio_captcha = document.createElement('input');
|
27135 |
+
el_type_radio_captcha.setAttribute("id", "el_type_captcha");
|
27136 |
+
el_type_radio_captcha.setAttribute("type", "radio");
|
27137 |
+
el_type_radio_captcha.setAttribute("value", "captcha");
|
27138 |
+
el_type_radio_captcha.style.cssText = "margin-left:15px";
|
27139 |
+
el_type_radio_captcha.setAttribute("name", "el_type_captcha");
|
27140 |
+
el_type_radio_captcha.setAttribute("onclick", "go_to_type_captcha('"+new_id+"')");
|
27141 |
el_type_radio_captcha.setAttribute("checked", "checked");
|
27142 |
|
27143 |
var el_type_label_captcha = document.createElement('label');
|
27144 |
el_type_label_captcha.setAttribute("for", "el_type_captcha");
|
27145 |
el_type_label_captcha.innerHTML = 'Simple Captcha';
|
27146 |
|
27147 |
+
var el_type_radio_arithmetic_captcha = document.createElement('input');
|
27148 |
+
el_type_radio_arithmetic_captcha.setAttribute("id", "el_type_arithmetic_captcha");
|
27149 |
+
el_type_radio_arithmetic_captcha.setAttribute("type", "radio");
|
27150 |
+
el_type_radio_arithmetic_captcha.setAttribute("value", "arithmetic_captcha");
|
27151 |
+
el_type_radio_arithmetic_captcha.style.cssText = "margin-left:15px";
|
27152 |
+
el_type_radio_arithmetic_captcha.setAttribute("name", "el_type_captcha");
|
27153 |
+
el_type_radio_arithmetic_captcha.setAttribute("onclick", "go_to_type_arithmetic_captcha('"+new_id+"')");
|
27154 |
+
|
27155 |
+
var el_type_label_arithmetic_captcha = document.createElement('label');
|
27156 |
+
el_type_label_arithmetic_captcha.setAttribute("for", "el_type_arithmetic_captcha");
|
27157 |
+
el_type_label_arithmetic_captcha.innerHTML = 'Arithmetic Captcha';
|
27158 |
+
|
27159 |
+
|
27160 |
var el_type_radio_recaptcha = document.createElement('input');
|
27161 |
+
el_type_radio_recaptcha.setAttribute("id", "el_type_radio_recaptcha");
|
27162 |
+
el_type_radio_recaptcha.setAttribute("type", "radio");
|
27163 |
+
el_type_radio_recaptcha.setAttribute("value", "recaptcha");
|
27164 |
+
el_type_radio_recaptcha.style.cssText = "margin-left:15px";
|
27165 |
+
el_type_radio_recaptcha.setAttribute("name", "el_type_captcha");
|
27166 |
+
el_type_radio_recaptcha.setAttribute("onclick", "go_to_type_recaptcha('"+new_id+"')");
|
27167 |
|
27168 |
var el_type_label_recaptcha = document.createElement('label');
|
27169 |
el_type_label_recaptcha.setAttribute("for", "el_type_radio_recaptcha");
|
27181 |
td.appendChild(el_type_radio_captcha);
|
27182 |
td.appendChild(el_type_label_captcha);
|
27183 |
td.appendChild(br2);
|
27184 |
+
td.appendChild(el_type_radio_arithmetic_captcha);
|
27185 |
+
td.appendChild(el_type_label_arithmetic_captcha);
|
27186 |
+
td.appendChild(br3);
|
27187 |
td.appendChild(el_type_radio_recaptcha);
|
27188 |
td.appendChild(el_type_label_recaptcha);
|
27189 |
|
|
|
27190 |
var pos=document.getElementsByName("el_pos");
|
27191 |
pos[0].removeAttribute("disabled");
|
27192 |
pos[1].removeAttribute("disabled");
|
27207 |
type_captcha(new_id,'Word Verification:', '100', 'left', '6','',w_attr_name, w_attr_value);
|
27208 |
}
|
27209 |
|
27210 |
+
function go_to_type_arithmetic_captcha(new_id)
|
27211 |
+
{
|
27212 |
+
w_attr_name=[];
|
27213 |
+
w_attr_value=[];
|
27214 |
+
type_arithmetic_captcha(new_id, 'Word Verification:', '100', 'left', '1', '+, -, *, /', '', '60', w_attr_name, w_attr_value);
|
27215 |
+
}
|
27216 |
+
|
27217 |
function go_to_type_recaptcha(new_id)
|
27218 |
{
|
27219 |
w_attr_name=[];
|
29110 |
wdform_arrows.appendChild(td_RIGHT);
|
29111 |
wdform_arrows.appendChild(td_EDIT);
|
29112 |
|
29113 |
+
if(type!="type_captcha" && type!="type_arithmetic_captcha" && type!="type_recaptcha" && type!="type_send_copy")
|
29114 |
{
|
29115 |
wdform_arrows.appendChild(td_DUBLICATE);
|
29116 |
}
|
30225 |
|
30226 |
type_captcha(id, w_field_label, w_field_label_size, w_field_label_pos, w_digit, w_class, w_attr_name, w_attr_value); break;
|
30227 |
}
|
30228 |
+
case 'type_arithmetic_captcha':
|
30229 |
+
{
|
30230 |
+
w_count = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations_count");
|
30231 |
+
w_operations = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations");
|
30232 |
+
w_input_size = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("input_size");
|
30233 |
+
atrs=return_attributes('_wd_captchaform_id_temp');
|
30234 |
+
w_attr_name=atrs[0];
|
30235 |
+
w_attr_value=atrs[1];
|
30236 |
+
|
30237 |
+
type_arithmetic_captcha(id, w_field_label, w_field_label_size, w_field_label_pos, w_count, w_operations, w_class, w_input_size, w_attr_name, w_attr_value); break;
|
30238 |
+
}
|
30239 |
case 'type_recaptcha':
|
30240 |
{
|
30241 |
w_public = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
32983 |
break;
|
32984 |
|
32985 |
}
|
32986 |
+
case 'type_arithmetic_captcha':
|
32987 |
+
{
|
32988 |
+
w_count = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations_count");
|
32989 |
+
w_operations = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations");
|
32990 |
+
w_input_size = document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("input_size");
|
32991 |
+
atrs=return_attributes('_wd_captchaform_id_temp');
|
32992 |
+
w_attr_name=atrs[0];
|
32993 |
+
w_attr_value=atrs[1];
|
32994 |
+
|
32995 |
+
form_fields+=w_field_label+"*:*w_field_label*:*";
|
32996 |
+
form_fields+=w_field_label_size+"*:*w_field_label_size*:*";
|
32997 |
+
form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*";
|
32998 |
+
form_fields+=w_count+"*:*w_count*:*";
|
32999 |
+
form_fields+=w_operations+"*:*w_operations*:*";
|
33000 |
+
form_fields+=w_class+"*:*w_class*:*";
|
33001 |
+
form_fields+=w_input_size+"*:*w_input_size*:*";
|
33002 |
+
|
33003 |
+
for(j=0; j<w_attr_name.length; j++)
|
33004 |
+
{
|
33005 |
+
form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";
|
33006 |
+
}
|
33007 |
+
form_fields+="*:*new_field*:*";
|
33008 |
+
break;
|
33009 |
+
|
33010 |
+
}
|
33011 |
+
|
33012 |
case 'type_recaptcha':
|
33013 |
{
|
33014 |
w_public = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-form.html
|
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -279,6 +279,10 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
|
|
279 |
|
280 |
== Changelog ==
|
281 |
|
|
|
|
|
|
|
|
|
282 |
= 1.7.55 =
|
283 |
New: Undo/Rendo form
|
284 |
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.7.56
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
279 |
|
280 |
== Changelog ==
|
281 |
|
282 |
+
= 1.7.56 =
|
283 |
+
New: ReCaptcha version 2.0
|
284 |
+
New: Arithmetic Captcha
|
285 |
+
|
286 |
= 1.7.55 =
|
287 |
New: Undo/Rendo form
|
288 |
|