Version Description
- Added: WHERE selectors in "Options from database" (Select, Single and Multiple choice fields).
- Added: Placeholders (User ID, Submitter's IP, etc.) in WHERE clause in "Options from database" and MySQL Mapping.
- Improved: Parsing images in post content in Post Generation extension.
- Improved: Automatically deactivate plugin after uninstall.
- Fixed: Scroll issues on Safari (MacOS).
- Fixed: "Receive Copy" field checkbox with Form maker some themes.
- Fixed: "Custom text" after form submit.
Download this release
Release Info
Developer | webdorado |
Plugin | Contact Form by WD – responsive drag & drop contact form builder tool |
Version | 1.12.41 |
Comparing to | |
See all releases |
Code changes from version 1.12.40 to 1.12.41
- admin/controllers/Manage_fm.php +7 -5
- admin/controllers/Select_data_from_db.php +12 -0
- admin/controllers/Uninstall_fm.php +7 -13
- admin/views/FMSelectDataFromDb.php +104 -31
- admin/views/FMSqlMapping.php +47 -32
- admin/views/Uninstall_fm.php +0 -14
- contact-form-maker.php +6 -7
- css/form_maker_tables.css +0 -6
- framework/WDW_FM_Library.php +19 -5
- frontend/models/form_maker.php +16 -3
- frontend/views/form_maker.php +33 -8
- js/form_maker_admin.js +6 -4
- js/main_div_front_end.js +7 -1
- readme.txt +10 -2
admin/controllers/Manage_fm.php
CHANGED
@@ -796,14 +796,16 @@ function after_submit() {
|
|
796 |
$message_id = 2;
|
797 |
$save = $this->model->update_data('formmaker', $data, array( 'id' => $id ));
|
798 |
if ( $save !== FALSE ) {
|
799 |
-
$this->model->update_data("formmaker_backup",
|
800 |
-
|
801 |
-
|
802 |
-
|
|
|
803 |
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
804 |
$save_addon = do_action('fm_save_addon_init', $id);
|
805 |
}
|
806 |
-
|
|
|
807 |
}
|
808 |
|
809 |
return $message_id;
|
796 |
$message_id = 2;
|
797 |
$save = $this->model->update_data('formmaker', $data, array( 'id' => $id ));
|
798 |
if ( $save !== FALSE ) {
|
799 |
+
$this->model->update_data("formmaker_backup",
|
800 |
+
array('theme' => $theme),
|
801 |
+
array( 'id' => $id )
|
802 |
+
);
|
803 |
+
//save theme in backup
|
804 |
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
805 |
$save_addon = do_action('fm_save_addon_init', $id);
|
806 |
}
|
807 |
+
$this->model->create_js($id);
|
808 |
+
$message_id = 8;
|
809 |
}
|
810 |
|
811 |
return $message_id;
|
admin/controllers/Select_data_from_db.php
CHANGED
@@ -88,6 +88,18 @@ class FMControllerSelect_data_from_db_fmc extends CFMAdminController {
|
|
88 |
$params['field_type'] = $field_type;
|
89 |
$params['label'] = $label;
|
90 |
$params['table_struct'] = $table_struct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
$this->view->db_table_struct_select($params);
|
92 |
}
|
93 |
}
|
88 |
$params['field_type'] = $field_type;
|
89 |
$params['label'] = $label;
|
90 |
$params['table_struct'] = $table_struct;
|
91 |
+
// Set placeholders.
|
92 |
+
$user_fields = array(
|
93 |
+
"ip" => "Submitter's IP",
|
94 |
+
"userid" => "User ID",
|
95 |
+
"username" => "Username",
|
96 |
+
"useremail" => "User Email"
|
97 |
+
);
|
98 |
+
$html_placeholders = '';
|
99 |
+
foreach ( $user_fields as $user_key => $user_field ) {
|
100 |
+
$html_placeholders .= '<a onclick="insert_placeholder(\'' . $user_key . '\'); jQuery(\'#fm-placeholder\').hide();" style="display:block; text-decoration:none;">' . $user_field . "</a>\r\n";
|
101 |
+
}
|
102 |
+
$params['html_placeholders'] = $html_placeholders;
|
103 |
$this->view->db_table_struct_select($params);
|
104 |
}
|
105 |
}
|
admin/controllers/Uninstall_fm.php
CHANGED
@@ -22,11 +22,10 @@ class FMControllerUninstall_fmc extends CFMAdminController {
|
|
22 |
$this->model = new FMModelUninstall_fmc();
|
23 |
require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Uninstall_fm.php";
|
24 |
$this->view = new FMViewUninstall_fmc();
|
25 |
-
|
26 |
if ( WDFMInstance(self::PLUGIN)->is_free ) {
|
27 |
global $fm_options;
|
28 |
global $cfm_options;
|
29 |
-
if (!class_exists("DoradoWebConfig")) {
|
30 |
include_once(WDFMInstance(self::PLUGIN)->plugin_dir . "/wd/config.php");
|
31 |
}
|
32 |
$config = new DoradoWebConfig();
|
@@ -47,12 +46,11 @@ class FMControllerUninstall_fmc extends CFMAdminController {
|
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
public function display() {
|
51 |
$params = array();
|
52 |
$params['addons'] = $this->addons;
|
53 |
$params['page_title'] = sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename);
|
54 |
$params['tables'] = $this->get_tables();
|
55 |
-
|
56 |
$this->view->display($params);
|
57 |
}
|
58 |
|
@@ -82,15 +80,11 @@ class FMControllerUninstall_fmc extends CFMAdminController {
|
|
82 |
public function uninstall() {
|
83 |
$params['tables'] = $this->get_tables();
|
84 |
$this->model->delete_db_tables();
|
85 |
-
global $wpdb;
|
86 |
-
$params = array();
|
87 |
-
$params['prefix'] = $wpdb->prefix;
|
88 |
-
$params['addons'] = $this->addons;
|
89 |
-
// Deactivate all addons
|
90 |
-
WDW_FM_Library(self::PLUGIN)->deactivate_all_addons();
|
91 |
-
$params['page_title'] = sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename);
|
92 |
-
$params['deactivate'] = TRUE;
|
93 |
|
94 |
-
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
}
|
22 |
$this->model = new FMModelUninstall_fmc();
|
23 |
require_once WDFMInstance(self::PLUGIN)->plugin_dir . "/admin/views/Uninstall_fm.php";
|
24 |
$this->view = new FMViewUninstall_fmc();
|
|
|
25 |
if ( WDFMInstance(self::PLUGIN)->is_free ) {
|
26 |
global $fm_options;
|
27 |
global $cfm_options;
|
28 |
+
if ( !class_exists("DoradoWebConfig") ) {
|
29 |
include_once(WDFMInstance(self::PLUGIN)->plugin_dir . "/wd/config.php");
|
30 |
}
|
31 |
$config = new DoradoWebConfig();
|
46 |
}
|
47 |
}
|
48 |
|
49 |
+
public function display() {
|
50 |
$params = array();
|
51 |
$params['addons'] = $this->addons;
|
52 |
$params['page_title'] = sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename);
|
53 |
$params['tables'] = $this->get_tables();
|
|
|
54 |
$this->view->display($params);
|
55 |
}
|
56 |
|
80 |
public function uninstall() {
|
81 |
$params['tables'] = $this->get_tables();
|
82 |
$this->model->delete_db_tables();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
// Deactivate all add-ons and form maker.
|
85 |
+
WDW_FM_Library(self::PLUGIN)->deactivate_all_addons(WDFMInstance(self::PLUGIN)->main_file);
|
86 |
+
|
87 |
+
wp_redirect(admin_url('plugins.php'));
|
88 |
+
exit();
|
89 |
}
|
90 |
}
|
admin/views/FMSelectDataFromDb.php
CHANGED
@@ -228,12 +228,15 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
228 |
$field_type = $params['field_type'];
|
229 |
$table_struct = $params['table_struct'];
|
230 |
$label = $params['label'];
|
|
|
231 |
$cond = '<div id="condid"><select id="sel_condid" style="width: 130px">';
|
232 |
foreach ( $table_struct as $col ) {
|
233 |
$cond .= '<option>' . $col->Field . '</option>';
|
234 |
}
|
235 |
$cond .= '</select>';
|
236 |
-
$cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select
|
|
|
|
|
237 |
?>
|
238 |
<script>
|
239 |
var selected_field = '';
|
@@ -246,35 +249,80 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
246 |
if (jQuery('#value_disabled').val() == 'no') {
|
247 |
jQuery('.ch_rad_value_disabled').hide();
|
248 |
}
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
str = '';
|
279 |
plugin_url = '<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>';
|
280 |
plugin_version = '<?php echo WDFMInstance(self::PLUGIN)->plugin_version; ?>';
|
@@ -462,7 +510,7 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
462 |
}
|
463 |
return false;
|
464 |
}
|
465 |
-
|
466 |
query = "";
|
467 |
query_price = "";
|
468 |
where = "";
|
@@ -544,6 +592,31 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
544 |
<textarea id="where" name="where"></textarea>
|
545 |
<textarea id="order" name="order"></textarea>
|
546 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
<?php endif;
|
548 |
die();
|
549 |
}
|
228 |
$field_type = $params['field_type'];
|
229 |
$table_struct = $params['table_struct'];
|
230 |
$label = $params['label'];
|
231 |
+
$html_placeholders = $params['html_placeholders'];
|
232 |
$cond = '<div id="condid"><select id="sel_condid" style="width: 130px">';
|
233 |
foreach ( $table_struct as $col ) {
|
234 |
$cond .= '<option>' . $col->Field . '</option>';
|
235 |
}
|
236 |
$cond .= '</select>';
|
237 |
+
$cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select>';
|
238 |
+
$cond .= '<input id="val_condid" type="text" class="fm-where-input" />';
|
239 |
+
$cond .= '<select id="andor_condid" style="visibility: hidden; width:70px;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
240 |
?>
|
241 |
<script>
|
242 |
var selected_field = '';
|
249 |
if (jQuery('#value_disabled').val() == 'no') {
|
250 |
jQuery('.ch_rad_value_disabled').hide();
|
251 |
}
|
252 |
+
jQuery('.add_cond').on("click", function () {
|
253 |
+
jQuery('.cols').append(conds.replace(/condid/g, cond_id++));
|
254 |
+
update_vis();
|
255 |
+
});
|
256 |
+
|
257 |
+
jQuery('html').click(function () {
|
258 |
+
if ( jQuery("#fm-placeholder").css('display') == "block" ) {
|
259 |
+
jQuery("#fm-placeholder").hide();
|
260 |
+
}
|
261 |
+
});
|
262 |
+
|
263 |
+
jQuery('#fm-placeholder').click(function (event) {
|
264 |
+
event.stopPropagation();
|
265 |
+
});
|
266 |
+
|
267 |
+
jQuery(document).on("click", ".fm-where-input", function(e) {
|
268 |
+
e.stopPropagation();
|
269 |
+
jQuery("#fm-placeholder").css("top", jQuery(this).offset().top + jQuery(this).height() + 12);
|
270 |
+
jQuery("#fm-placeholder").css("left", jQuery(this).offset().left);
|
271 |
+
jQuery("#fm-placeholder").slideDown('fast');
|
272 |
+
selected_field = this.id;
|
273 |
+
});
|
274 |
+
|
275 |
+
function dis(id, x) {
|
276 |
+
if (x) {
|
277 |
+
jQuery('#' + id).removeAttr('disabled');
|
278 |
+
}
|
279 |
+
else {
|
280 |
+
jQuery('#' + id).attr('disabled', 'disabled');
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
function update_vis() {
|
285 |
+
previous = 0;
|
286 |
+
for (i = 1; i < cond_id; i++) {
|
287 |
+
if (jQuery('#' + i).html()) {
|
288 |
+
jQuery('#andor_' + i).css('visibility', 'hidden');
|
289 |
+
if (previous) {
|
290 |
+
jQuery('#andor_' + previous).css('visibility', 'visible');
|
291 |
+
}
|
292 |
+
previous = i;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
function insert_placeholder(key) {
|
298 |
+
if (!selected_field) {
|
299 |
+
return;
|
300 |
+
}
|
301 |
+
myField = document.getElementById(selected_field);
|
302 |
+
if (document.selection) {
|
303 |
+
myField.focus();
|
304 |
+
sel = document.selection.createRange();
|
305 |
+
sel.text = key;
|
306 |
+
}
|
307 |
+
else {
|
308 |
+
if (myField.selectionStart || myField.selectionStart == '0') {
|
309 |
+
var startPos = myField.selectionStart;
|
310 |
+
var endPos = myField.selectionEnd;
|
311 |
+
myField.value = myField.value.substring(0, startPos)
|
312 |
+
+ "{" + key + "}"
|
313 |
+
+ myField.value.substring(endPos, myField.value.length);
|
314 |
+
}
|
315 |
+
else {
|
316 |
+
myField.value += "{" + key + "}";
|
317 |
+
}
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
function delete_cond( id ) {
|
322 |
+
jQuery('#' + id).remove();
|
323 |
+
update_vis();
|
324 |
+
}
|
325 |
+
function save_query() {
|
326 |
str = '';
|
327 |
plugin_url = '<?php echo WDFMInstance(self::PLUGIN)->plugin_url; ?>';
|
328 |
plugin_version = '<?php echo WDFMInstance(self::PLUGIN)->plugin_version; ?>';
|
510 |
}
|
511 |
return false;
|
512 |
}
|
513 |
+
function gen_query() {
|
514 |
query = "";
|
515 |
query_price = "";
|
516 |
where = "";
|
592 |
<textarea id="where" name="where"></textarea>
|
593 |
<textarea id="order" name="order"></textarea>
|
594 |
</form>
|
595 |
+
<div id="fm-placeholder">
|
596 |
+
<?php echo $html_placeholders ?>
|
597 |
+
</div>
|
598 |
+
<style>
|
599 |
+
#fm-placeholder {
|
600 |
+
display: none;
|
601 |
+
position: absolute;
|
602 |
+
width: 225px;
|
603 |
+
background: #fff;
|
604 |
+
border: solid 1px #c7c7c7;
|
605 |
+
top: 0;
|
606 |
+
left: 0;
|
607 |
+
z-index: 1000;
|
608 |
+
}
|
609 |
+
#fm-placeholder a {
|
610 |
+
padding: 5px;
|
611 |
+
cursor: pointer;
|
612 |
+
overflow: hidden;
|
613 |
+
white-space: nowrap;
|
614 |
+
text-overflow: ellipsis;
|
615 |
+
}
|
616 |
+
#fm-placeholder a:hover {
|
617 |
+
background: #ccc;
|
618 |
+
}
|
619 |
+
</style>
|
620 |
<?php endif;
|
621 |
die();
|
622 |
}
|
admin/views/FMSqlMapping.php
CHANGED
@@ -90,7 +90,10 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
90 |
$cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
|
91 |
}
|
92 |
$cond .= '</select>';
|
93 |
-
$cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select
|
|
|
|
|
|
|
94 |
?>
|
95 |
<script>
|
96 |
jQuery(document).ready(function() {
|
@@ -865,7 +868,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
865 |
$temp = explode('***val***', $temp[1]);
|
866 |
$val = $temp[0];
|
867 |
$andor = $temp[1];
|
868 |
-
echo 'jQuery(".cols").append(conds.replace(/condid/g, cond_id++).replace(\'SingleQuot\', "\'"));
|
869 |
jQuery("#sel_"+(cond_id-1)).val("' . html_entity_decode($sel, ENT_QUOTES) . '");
|
870 |
jQuery("#op_"+(cond_id-1)).val("' . $op . '");
|
871 |
jQuery("#val_"+(cond_id-1)).val("' . $val . '");
|
@@ -1274,7 +1277,10 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1274 |
$cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
|
1275 |
}
|
1276 |
$cond .= '</select>';
|
1277 |
-
$cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select
|
|
|
|
|
|
|
1278 |
?>
|
1279 |
<script>
|
1280 |
jQuery(document).ready(function() {
|
@@ -1322,7 +1328,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1322 |
}
|
1323 |
});
|
1324 |
}
|
1325 |
-
|
1326 |
var selected_field = '';
|
1327 |
var isvisible = 1;
|
1328 |
var cond_id = 1;
|
@@ -1356,36 +1362,45 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1356 |
}
|
1357 |
}
|
1358 |
}
|
1359 |
-
|
|
|
1360 |
jQuery('#' + id).remove();
|
1361 |
update_vis();
|
1362 |
}
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1389 |
function save_query() {
|
1390 |
con_type = jQuery('input[name=con_type]:checked').val();
|
1391 |
con_method = jQuery('input[name=con_method]:checked').val();
|
@@ -1429,7 +1444,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1429 |
success: function (data) {
|
1430 |
window.parent.wd_fm_apply_options('apply_form_options');
|
1431 |
window.parent.tb_remove();
|
1432 |
-
|
1433 |
}
|
1434 |
});
|
1435 |
}
|
90 |
$cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
|
91 |
}
|
92 |
$cond .= '</select>';
|
93 |
+
$cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select>';
|
94 |
+
$cond .= '<input id="val_condid" style="width:170px" type="text" class="fm-where-input" />';
|
95 |
+
$cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
|
96 |
+
$cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_dir . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
97 |
?>
|
98 |
<script>
|
99 |
jQuery(document).ready(function() {
|
868 |
$temp = explode('***val***', $temp[1]);
|
869 |
$val = $temp[0];
|
870 |
$andor = $temp[1];
|
871 |
+
echo 'jQuery(".cols").append(conds.replace(/condid/g, cond_id++).replace(\'SingleQuot\', "\'")); update_vis();
|
872 |
jQuery("#sel_"+(cond_id-1)).val("' . html_entity_decode($sel, ENT_QUOTES) . '");
|
873 |
jQuery("#op_"+(cond_id-1)).val("' . $op . '");
|
874 |
jQuery("#val_"+(cond_id-1)).val("' . $val . '");
|
1277 |
$cond .= '<option>' . str_replace("'", "SingleQuot", $col->Field) . '</option>';
|
1278 |
}
|
1279 |
$cond .= '</select>';
|
1280 |
+
$cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="%..%">Like</option><option value="%..">Starts with</option><option value="..%">Ends with</option></select>';
|
1281 |
+
$cond .= '<input id="val_condid" style="width:170px" class="fm-where-input" type="text" />';
|
1282 |
+
$cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
|
1283 |
+
$cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond("condid")" style="vertical-align: middle;"></div>';
|
1284 |
?>
|
1285 |
<script>
|
1286 |
jQuery(document).ready(function() {
|
1328 |
}
|
1329 |
});
|
1330 |
}
|
1331 |
+
});
|
1332 |
var selected_field = '';
|
1333 |
var isvisible = 1;
|
1334 |
var cond_id = 1;
|
1362 |
}
|
1363 |
}
|
1364 |
}
|
1365 |
+
|
1366 |
+
function delete_cond(id) {
|
1367 |
jQuery('#' + id).remove();
|
1368 |
update_vis();
|
1369 |
}
|
1370 |
+
|
1371 |
+
jQuery('.add_cond').click(function () {
|
1372 |
+
jQuery('.cols').append(conds.replace(/condid/g, cond_id++).replace('SingleQuot', "'"));
|
1373 |
+
update_vis();
|
1374 |
+
});
|
1375 |
+
jQuery('html').click(function () {
|
1376 |
+
if (jQuery("#fieldlist").css('display') == "block") {
|
1377 |
+
jQuery("#fieldlist").hide();
|
1378 |
+
}
|
1379 |
+
});
|
1380 |
+
jQuery(document).on("click", ".fm-where-input", function(e) {
|
1381 |
+
e.stopPropagation();
|
1382 |
+
jQuery("#fieldlist").css("top", jQuery(this).offset().top + jQuery(this).height() + 2);
|
1383 |
+
jQuery("#fieldlist").css("left", jQuery(this).offset().left);
|
1384 |
+
jQuery("#fieldlist").slideDown('fast');
|
1385 |
+
selected_field = this.id;
|
1386 |
+
});
|
1387 |
+
jQuery('.cols input[type="text"]').on('click', function (event) {
|
1388 |
+
event.stopPropagation();
|
1389 |
+
jQuery("#fieldlist").css("top", jQuery(this).offset().top + jQuery(this).height() + 2);
|
1390 |
+
jQuery("#fieldlist").css("left", jQuery(this).offset().left);
|
1391 |
+
jQuery("#fieldlist").slideDown('fast');
|
1392 |
+
selected_field = this.id;
|
1393 |
+
});
|
1394 |
+
jQuery('#query_txt').click(function (event) {
|
1395 |
+
event.stopPropagation();
|
1396 |
+
jQuery("#fieldlist").css("top", jQuery(this).offset().top + jQuery(this).height() + 2);
|
1397 |
+
jQuery("#fieldlist").css("left", jQuery(this).offset().left);
|
1398 |
+
jQuery("#fieldlist").slideDown('fast');
|
1399 |
+
selected_field = this.id;
|
1400 |
+
});
|
1401 |
+
jQuery('#fieldlist').click(function (event) {
|
1402 |
+
event.stopPropagation();
|
1403 |
+
});
|
1404 |
function save_query() {
|
1405 |
con_type = jQuery('input[name=con_type]:checked').val();
|
1406 |
con_method = jQuery('input[name=con_method]:checked').val();
|
1444 |
success: function (data) {
|
1445 |
window.parent.wd_fm_apply_options('apply_form_options');
|
1446 |
window.parent.tb_remove();
|
1447 |
+
window.parent.document.getElementById('adminForm').submit();
|
1448 |
}
|
1449 |
});
|
1450 |
}
|
admin/views/Uninstall_fm.php
CHANGED
@@ -37,25 +37,11 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
|
|
37 |
* @param $params
|
38 |
*/
|
39 |
public function body( $params = array() ) {
|
40 |
-
$deactivate_url = add_query_arg(array(
|
41 |
-
'action' => 'deactivate',
|
42 |
-
'plugin' => WDFMInstance(self::PLUGIN)->main_file,
|
43 |
-
), admin_url('plugins.php'));
|
44 |
-
$deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WDFMInstance(self::PLUGIN)->main_file);
|
45 |
echo $this->title(array(
|
46 |
'title' => $params['page_title'],
|
47 |
'title_class' => 'wd-header',
|
48 |
'add_new_button' => FALSE,
|
49 |
));
|
50 |
-
|
51 |
-
if ( isset($params['deactivate']) && $params['deactivate'] == TRUE ) {
|
52 |
-
?>
|
53 |
-
<p><strong><?php echo sprintf(__("%s to Finish the Uninstallation and %s will be Deactivated Automatically.", WDFMInstance(self::PLUGIN)->prefix), '<a href="' . $deactivate_url . '" class="bwg_deactivate_link" data-uninstall="1">' . __("Click Here", WDFMInstance(self::PLUGIN)->prefix) . '</a>', WDFMInstance(self::PLUGIN)->nicename); ?></strong></p>
|
54 |
-
<?php
|
55 |
-
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
|
59 |
?>
|
60 |
<div class="goodbye-text">
|
61 |
<?php
|
37 |
* @param $params
|
38 |
*/
|
39 |
public function body( $params = array() ) {
|
|
|
|
|
|
|
|
|
|
|
40 |
echo $this->title(array(
|
41 |
'title' => $params['page_title'],
|
42 |
'title_class' => 'wd-header',
|
43 |
'add_new_button' => FALSE,
|
44 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
?>
|
46 |
<div class="goodbye-text">
|
47 |
<?php
|
contact-form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Contact Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
6 |
-
* Version: 1.12.
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -95,8 +95,8 @@ final class WDCFM {
|
|
95 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
96 |
$this->front_urls = $this->get_front_urls();
|
97 |
$this->main_file = plugin_basename(__FILE__);
|
98 |
-
$this->plugin_version = '1.12.
|
99 |
-
$this->db_version = '2.12.
|
100 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
101 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
102 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
@@ -230,7 +230,6 @@ final class WDCFM {
|
|
230 |
wp_enqueue_style('twbb-editor-styles', $this->plugin_url . '/css/fm_elementor_icon/fm_elementor_icon.css', array(), '1.0.0');
|
231 |
}
|
232 |
|
233 |
-
|
234 |
/**
|
235 |
* Register widget for Elementor builder.
|
236 |
*/
|
@@ -1213,7 +1212,7 @@ final class WDCFM {
|
|
1213 |
$url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
1214 |
?>
|
1215 |
<a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(520, 570); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert submissions', $this->prefix); ?>">
|
1216 |
-
<span class="wp-media-buttons-icon" style="background: url(
|
1217 |
<?php _e('Add Submissions', $this->prefix); ?>
|
1218 |
</a>
|
1219 |
<?php
|
@@ -1240,7 +1239,7 @@ final class WDCFM {
|
|
1240 |
'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
|
1241 |
'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
|
1242 |
'form-maker-pdf-integration' => array('version' => '1.1.3', 'file' => 'fm_pdf_integration.php'),
|
1243 |
-
'form-maker-stripe' => array('version' => '1.1.
|
1244 |
'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
|
1245 |
);
|
1246 |
|
@@ -1252,7 +1251,7 @@ final class WDCFM {
|
|
1252 |
if (is_plugin_active($add_on_key . '/' . $add_on_value['file'])) {
|
1253 |
$addon = get_plugin_data($addon_path); // array
|
1254 |
if (version_compare($addon['Version'], $add_on_value['version'], '<=')) { //compare versions
|
1255 |
-
//
|
1256 |
array_push($add_ons_notice, $addon['Name']);
|
1257 |
}
|
1258 |
}
|
3 |
* Plugin Name: Contact Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
6 |
+
* Version: 1.12.41
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
95 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
96 |
$this->front_urls = $this->get_front_urls();
|
97 |
$this->main_file = plugin_basename(__FILE__);
|
98 |
+
$this->plugin_version = '1.12.41';
|
99 |
+
$this->db_version = '2.12.41';
|
100 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
101 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
102 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
230 |
wp_enqueue_style('twbb-editor-styles', $this->plugin_url . '/css/fm_elementor_icon/fm_elementor_icon.css', array(), '1.0.0');
|
231 |
}
|
232 |
|
|
|
233 |
/**
|
234 |
* Register widget for Elementor builder.
|
235 |
*/
|
1212 |
$url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
1213 |
?>
|
1214 |
<a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(520, 570); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert submissions', $this->prefix); ?>">
|
1215 |
+
<span class="wp-media-buttons-icon" style="background: url(<?php echo $this->plugin_url; ?>/images/fm-media-submissions-button.png) no-repeat scroll left top rgba(0, 0, 0, 0);"></span>
|
1216 |
<?php _e('Add Submissions', $this->prefix); ?>
|
1217 |
</a>
|
1218 |
<?php
|
1239 |
'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
|
1240 |
'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
|
1241 |
'form-maker-pdf-integration' => array('version' => '1.1.3', 'file' => 'fm_pdf_integration.php'),
|
1242 |
+
'form-maker-stripe' => array('version' => '1.1.5', 'file' => 'fm_stripe.php'),
|
1243 |
'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
|
1244 |
);
|
1245 |
|
1251 |
if (is_plugin_active($add_on_key . '/' . $add_on_value['file'])) {
|
1252 |
$addon = get_plugin_data($addon_path); // array
|
1253 |
if (version_compare($addon['Version'], $add_on_value['version'], '<=')) { //compare versions
|
1254 |
+
// deactivate_plugins($addon_path);
|
1255 |
array_push($add_ons_notice, $addon['Name']);
|
1256 |
}
|
1257 |
}
|
css/form_maker_tables.css
CHANGED
@@ -2606,12 +2606,6 @@ button:focus {
|
|
2606 |
#field_container .fm-free-message {
|
2607 |
margin-bottom: 7px;
|
2608 |
}
|
2609 |
-
#field_container.field_container_full .field_options {
|
2610 |
-
width: calc(70% - 8px);
|
2611 |
-
}
|
2612 |
-
#field_container.field_container_full .field_preview {
|
2613 |
-
width: calc(30% - 8px);
|
2614 |
-
}
|
2615 |
@media screen and (max-width: 1050px) {
|
2616 |
#field_container,
|
2617 |
#field_container .popup-body-col {
|
2606 |
#field_container .fm-free-message {
|
2607 |
margin-bottom: 7px;
|
2608 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2609 |
@media screen and (max-width: 1050px) {
|
2610 |
#field_container,
|
2611 |
#field_container .popup-body-col {
|
framework/WDW_FM_Library.php
CHANGED
@@ -980,7 +980,14 @@ class WDW_FMC_Library {
|
|
980 |
}
|
981 |
$form_currency = apply_filters('fm_form_currency', $form_currency, $form_id);
|
982 |
$form_currency = self::replace_currency_code( $form_currency );
|
983 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
$is_type = array();
|
985 |
$id1s = array();
|
986 |
$types = array();
|
@@ -3929,6 +3936,9 @@ class WDW_FMC_Library {
|
|
3929 |
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
3930 |
fm_document_ready(<?php echo $form_id ?>);
|
3931 |
}
|
|
|
|
|
|
|
3932 |
});
|
3933 |
jQuery(document).ready(function () {
|
3934 |
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
@@ -4252,19 +4262,23 @@ class WDW_FMC_Library {
|
|
4252 |
'form-maker-stripe/fm_stripe.php',
|
4253 |
'form-maker-calculator/fm_calculator.php'
|
4254 |
);
|
|
|
4255 |
return $addons;
|
4256 |
}
|
4257 |
|
4258 |
/**
|
4259 |
-
* Deactivate all addons.
|
4260 |
*
|
4261 |
-
* @
|
4262 |
*/
|
4263 |
-
public static function deactivate_all_addons() {
|
4264 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
4265 |
$addons = self::get_all_addons_path();
|
|
|
|
|
|
|
4266 |
foreach ( $addons as $addon ) {
|
4267 |
-
if( is_plugin_active( $addon ) ) {
|
4268 |
deactivate_plugins( $addon );
|
4269 |
}
|
4270 |
}
|
980 |
}
|
981 |
$form_currency = apply_filters('fm_form_currency', $form_currency, $form_id);
|
982 |
$form_currency = self::replace_currency_code( $form_currency );
|
983 |
+
$form_paypal_tax = 0;
|
984 |
+
if ( $row->paypal_mode && $row->paypal_mode == 1 ) {
|
985 |
+
$form_paypal_tax = $row->tax;
|
986 |
+
}
|
987 |
+
if ( $row->paypal_mode && $row->paypal_mode == 2 ) {
|
988 |
+
$stripe_data = apply_filters('fm_addon_stripe_get_data_init', array('form_id' => $form_id));
|
989 |
+
$form_paypal_tax = $stripe_data->stripe_tax;
|
990 |
+
}
|
991 |
$is_type = array();
|
992 |
$id1s = array();
|
993 |
$types = array();
|
3936 |
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
3937 |
fm_document_ready(<?php echo $form_id ?>);
|
3938 |
}
|
3939 |
+
else {
|
3940 |
+
jQuery("#form<?php echo $form_id ?>").closest(".fm-form-container").removeAttr("style")
|
3941 |
+
}
|
3942 |
});
|
3943 |
jQuery(document).ready(function () {
|
3944 |
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
4262 |
'form-maker-stripe/fm_stripe.php',
|
4263 |
'form-maker-calculator/fm_calculator.php'
|
4264 |
);
|
4265 |
+
|
4266 |
return $addons;
|
4267 |
}
|
4268 |
|
4269 |
/**
|
4270 |
+
* Deactivate all addons with given additional plugin.
|
4271 |
*
|
4272 |
+
* @param bool $additional_plugin
|
4273 |
*/
|
4274 |
+
public static function deactivate_all_addons($additional_plugin = FALSE) {
|
4275 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
4276 |
$addons = self::get_all_addons_path();
|
4277 |
+
if ( $additional_plugin ) {
|
4278 |
+
array_push($addons, $additional_plugin);
|
4279 |
+
}
|
4280 |
foreach ( $addons as $addon ) {
|
4281 |
+
if ( is_plugin_active( $addon ) ) {
|
4282 |
deactivate_plugins( $addon );
|
4283 |
}
|
4284 |
}
|
frontend/models/form_maker.php
CHANGED
@@ -1336,7 +1336,7 @@ class FMModelForm_maker_fmc {
|
|
1336 |
$chgnac = TRUE;
|
1337 |
$paypal = array();
|
1338 |
$all_files = array();
|
1339 |
-
|
1340 |
$paypal['item_name'] = array();
|
1341 |
$paypal['quantity'] = array();
|
1342 |
$paypal['amount'] = array();
|
@@ -2147,6 +2147,10 @@ class FMModelForm_maker_fmc {
|
|
2147 |
$fvals[ '{' . $i . '}' ] = rtrim( $fvals[ '{' . $i . '}' ], ', ' );
|
2148 |
}
|
2149 |
|
|
|
|
|
|
|
|
|
2150 |
if ( $form->savedb ) {
|
2151 |
$submition_data = array(
|
2152 |
'form_id' => $id,
|
@@ -2204,7 +2208,7 @@ class FMModelForm_maker_fmc {
|
|
2204 |
$database = $temp[ 0 ];
|
2205 |
$query = str_replace( array_keys( $fvals ), $fvals, $query->query );
|
2206 |
foreach ( $user_fields as $user_key => $user_field ) {
|
2207 |
-
$query = str_replace(
|
2208 |
}
|
2209 |
if ( $con_type == 'remote' ) {
|
2210 |
$wpdb_temp = new wpdb( $username, $password, $database, $host );
|
@@ -2220,7 +2224,15 @@ class FMModelForm_maker_fmc {
|
|
2220 |
$stripeToken = WDW_FM_Library(self::PLUGIN)->get( $stripe_post_key, '' );
|
2221 |
if ( $is_amount && $stripeToken ) {
|
2222 |
$wdstripe_products_data = new stdClass();
|
2223 |
-
$tax =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2224 |
$total = $total + ($total * $tax) / 100;
|
2225 |
$shipping = isset( $paypal[ 'shipping' ] ) ? $paypal[ 'shipping' ] : 0;
|
2226 |
$total = $total + $shipping;
|
@@ -2399,6 +2411,7 @@ class FMModelForm_maker_fmc {
|
|
2399 |
}
|
2400 |
}
|
2401 |
}
|
|
|
2402 |
$frontend_parmas['user_email'] = ( is_email($user_email) !== FALSE ) ? $user_email : '';
|
2403 |
do_action( 'fm_addon_frontend_init', $frontend_parmas );
|
2404 |
}
|
1336 |
$chgnac = TRUE;
|
1337 |
$paypal = array();
|
1338 |
$all_files = array();
|
1339 |
+
$frontend_parmas = array();
|
1340 |
$paypal['item_name'] = array();
|
1341 |
$paypal['quantity'] = array();
|
1342 |
$paypal['amount'] = array();
|
2147 |
$fvals[ '{' . $i . '}' ] = rtrim( $fvals[ '{' . $i . '}' ], ', ' );
|
2148 |
}
|
2149 |
|
2150 |
+
if ( $type == "type_file_upload" ) {
|
2151 |
+
$fvals['{' . $i . '(link)}'] = rtrim( $fvals['{' . $i . '}'], ', ' );
|
2152 |
+
}
|
2153 |
+
|
2154 |
if ( $form->savedb ) {
|
2155 |
$submition_data = array(
|
2156 |
'form_id' => $id,
|
2208 |
$database = $temp[ 0 ];
|
2209 |
$query = str_replace( array_keys( $fvals ), $fvals, $query->query );
|
2210 |
foreach ( $user_fields as $user_key => $user_field ) {
|
2211 |
+
$query = str_replace('{' . $user_key . '}', $user_field, $query );
|
2212 |
}
|
2213 |
if ( $con_type == 'remote' ) {
|
2214 |
$wpdb_temp = new wpdb( $username, $password, $database, $host );
|
2224 |
$stripeToken = WDW_FM_Library(self::PLUGIN)->get( $stripe_post_key, '' );
|
2225 |
if ( $is_amount && $stripeToken ) {
|
2226 |
$wdstripe_products_data = new stdClass();
|
2227 |
+
$tax = 0;
|
2228 |
+
if ( $form->paypal_mode && $form->paypal_mode == 1 ) {
|
2229 |
+
$tax = $form->tax;
|
2230 |
+
}
|
2231 |
+
if ( $form->paypal_mode && $form->paypal_mode == 2 ) {
|
2232 |
+
$stripe_data = apply_filters('fm_addon_stripe_get_data_init', array('form_id' => $id));
|
2233 |
+
$tax = $stripe_data->stripe_tax;
|
2234 |
+
}
|
2235 |
+
|
2236 |
$total = $total + ($total * $tax) / 100;
|
2237 |
$shipping = isset( $paypal[ 'shipping' ] ) ? $paypal[ 'shipping' ] : 0;
|
2238 |
$total = $total + $shipping;
|
2411 |
}
|
2412 |
}
|
2413 |
}
|
2414 |
+
|
2415 |
$frontend_parmas['user_email'] = ( is_email($user_email) !== FALSE ) ? $user_email : '';
|
2416 |
do_action( 'fm_addon_frontend_init', $frontend_parmas );
|
2417 |
}
|
frontend/views/form_maker.php
CHANGED
@@ -278,22 +278,22 @@ class FMViewForm_maker_fmc {
|
|
278 |
$input_active = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? "checked='checked'" : "");
|
279 |
}
|
280 |
$param['id'] = $id1;
|
281 |
-
$param['w_class'] = ' checkbox-div wd-flex-row wd-align-items-center';
|
282 |
|
283 |
// Use label size as field size.
|
284 |
$param['w_size'] = $param['w_field_label_size'];
|
285 |
-
|
286 |
-
$html = '<label for="wdform_' . $id1 . '_element' . $form_id . '" class="wdform-label">' . $param['label'] . '</label>';
|
287 |
-
if ( isset($param['w_required']) && $param['w_required'] == "yes" ) {
|
288 |
-
$requiredmark = isset($row->requiredmark) ? $row->requiredmark : '';
|
289 |
-
$html .= '<span class="wdform-required">' . $requiredmark . '</span>';
|
290 |
-
}
|
291 |
-
$html .= ' <input type="checkbox"
|
292 |
class="wd-flex-row"
|
293 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
294 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
295 |
' . $input_active . '
|
296 |
' . $param['attributes'] . ' />';
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
// Generate field.
|
299 |
$rep = $this->wdform_field($type, $param, $row, $html, FALSE);
|
@@ -2428,4 +2428,29 @@ class FMViewForm_maker_fmc {
|
|
2428 |
|
2429 |
return ob_get_clean();
|
2430 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2431 |
}
|
278 |
$input_active = (isset($_POST['wdform_' . $id1 . '_element' . $form_id]) ? "checked='checked'" : "");
|
279 |
}
|
280 |
$param['id'] = $id1;
|
281 |
+
$param['w_class'] = ' checkbox-div wd-flex-row-reverse wd-align-items-center wd-justify-content-right';
|
282 |
|
283 |
// Use label size as field size.
|
284 |
$param['w_size'] = $param['w_field_label_size'];
|
285 |
+
$html = '<input type="checkbox"
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
class="wd-flex-row"
|
287 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
288 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
289 |
' . $input_active . '
|
290 |
' . $param['attributes'] . ' />';
|
291 |
+
$html .= '<label class="wd-align-items-center wd-flex wd-flex-row-reverse" for="wdform_' . $id1 . '_element' . $form_id . '" class="wdform-label"><span></span>' . $param['label'] . '</label>';
|
292 |
+
if ( isset($param['w_required']) && $param['w_required'] == "yes" ) {
|
293 |
+
$requiredmark = isset($row->requiredmark) ? $row->requiredmark : '';
|
294 |
+
$html .= '<span class="wdform-required">' . $requiredmark . '</span>';
|
295 |
+
}
|
296 |
+
|
297 |
|
298 |
// Generate field.
|
299 |
$rep = $this->wdform_field($type, $param, $row, $html, FALSE);
|
2428 |
|
2429 |
return ob_get_clean();
|
2430 |
}
|
2431 |
+
|
2432 |
+
/**
|
2433 |
+
* Get custom fields
|
2434 |
+
* @return array
|
2435 |
+
*/
|
2436 |
+
private function get_custom_fields() {
|
2437 |
+
$userid = '';
|
2438 |
+
$username = '';
|
2439 |
+
$useremail = '';
|
2440 |
+
$adminemail = get_option( 'admin_email' );
|
2441 |
+
$current_user = wp_get_current_user();
|
2442 |
+
if ( $current_user->ID != 0 ) {
|
2443 |
+
$userid = $current_user->ID;
|
2444 |
+
$username = $current_user->display_name;
|
2445 |
+
$useremail = $current_user->user_email;
|
2446 |
+
}
|
2447 |
+
$custom_fields = array(
|
2448 |
+
"ip" => $_SERVER['REMOTE_ADDR'],
|
2449 |
+
"userid" => $userid,
|
2450 |
+
'adminemail' => $adminemail,
|
2451 |
+
"useremail" => $useremail,
|
2452 |
+
"username" => $username
|
2453 |
+
);
|
2454 |
+
return $custom_fields;
|
2455 |
+
}
|
2456 |
}
|
js/form_maker_admin.js
CHANGED
@@ -24,11 +24,13 @@ jQuery(document).ready(function () {
|
|
24 |
|
25 |
jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function () {
|
26 |
jQuery(this).attr("title", form_maker.add_placeholder);
|
27 |
-
jQuery(this).on("click", function () {
|
28 |
-
fm_placeholders_popup(jQuery(this).data("id"));
|
29 |
-
});
|
30 |
});
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
fm_disabled_uninstall_btn();
|
33 |
jQuery('.fm-uninstall-form #check_yes').on("click", function () {
|
34 |
fm_disabled_uninstall_btn();
|
@@ -339,7 +341,7 @@ function fm_form_submit(event, form_id, task, id) {
|
|
339 |
// Check if required field is empty.
|
340 |
function fm_check_required(id, name) {
|
341 |
if (jQuery('#' + id).val() == '') {
|
342 |
-
alert(name + '
|
343 |
jQuery('#' + id).attr('style', 'border-color: #FF0000; border-style: solid; border-width: 1px;');
|
344 |
jQuery('#' + id).focus();
|
345 |
jQuery('html, body').animate({
|
24 |
|
25 |
jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function () {
|
26 |
jQuery(this).attr("title", form_maker.add_placeholder);
|
|
|
|
|
|
|
27 |
});
|
28 |
|
29 |
+
jQuery(document).on("click", ".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view", function(){
|
30 |
+
fm_placeholders_popup(jQuery(this).data("id"));
|
31 |
+
});
|
32 |
+
|
33 |
+
|
34 |
fm_disabled_uninstall_btn();
|
35 |
jQuery('.fm-uninstall-form #check_yes').on("click", function () {
|
36 |
fm_disabled_uninstall_btn();
|
341 |
// Check if required field is empty.
|
342 |
function fm_check_required(id, name) {
|
343 |
if (jQuery('#' + id).val() == '') {
|
344 |
+
alert(name + ' field is required.');
|
345 |
jQuery('#' + id).attr('style', 'border-color: #FF0000; border-style: solid; border-width: 1px;');
|
346 |
jQuery('#' + id).focus();
|
347 |
jQuery('html, body').animate({
|
js/main_div_front_end.js
CHANGED
@@ -11,6 +11,7 @@ jQuery(document).ready(function () {
|
|
11 |
// Scroll to form notice.
|
12 |
if ( jQuery(".fm-form").find(".fm-message").length !== 0) {
|
13 |
jQuery(window).scrollTop(jQuery(".fm-message").offset().top - 100);
|
|
|
14 |
}
|
15 |
|
16 |
// Scroll to captcha field notice.
|
@@ -19,6 +20,7 @@ jQuery(document).ready(function () {
|
|
19 |
var element_offset = jQuery(jQuery("#form" + form_id + " .message_captcha")).offset().top;
|
20 |
jQuery(".fm-form").find(".message_captcha").parents('.wdform-field').find('.wdform-label').addClass('error_label');
|
21 |
jQuery('html').animate({scrollTop: element_offset-150 },500);
|
|
|
22 |
}
|
23 |
});
|
24 |
|
@@ -117,7 +119,7 @@ function set_total_value(form_id) {
|
|
117 |
}
|
118 |
});
|
119 |
var FormPaypalTax = eval("FormPaypalTax_" + form_id);
|
120 |
-
if(FormPaypalTax != 0) {
|
121 |
div_paypal_tax.html('Tax: ' + FormCurrency + (((total)*FormPaypalTax) / 100).toFixed(2));
|
122 |
}
|
123 |
jQuery('.div_total'+form_id).html(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2));
|
@@ -781,6 +783,7 @@ function page_previous(id, form_id, form_view_count) {
|
|
781 |
jQuery('html').animate({
|
782 |
scrollTop: form.offset().top - 150
|
783 |
}, 500);
|
|
|
784 |
}
|
785 |
}
|
786 |
|
@@ -804,6 +807,7 @@ function page_next(id, form_id, form_view_count) {
|
|
804 |
jQuery('html').animate({
|
805 |
scrollTop: form.offset().top - 150
|
806 |
}, 500);
|
|
|
807 |
}
|
808 |
}
|
809 |
|
@@ -820,6 +824,7 @@ function fm_go_to_page(id, form_id, form_view_count) {
|
|
820 |
jQuery('html').animate({
|
821 |
scrollTop: form.offset().top - 150
|
822 |
}, 500);
|
|
|
823 |
}
|
824 |
}
|
825 |
|
@@ -1108,6 +1113,7 @@ function scroll_on_element(form_id) {
|
|
1108 |
jQuery('html').animate({
|
1109 |
scrollTop: element_offset - 150
|
1110 |
}, 500, function() {
|
|
|
1111 |
jQuery(window).off("scroll", scrollChecker);
|
1112 |
old_bg=jQuery(parent_div).css("background-color");
|
1113 |
jQuery(parent_div).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
|
11 |
// Scroll to form notice.
|
12 |
if ( jQuery(".fm-form").find(".fm-message").length !== 0) {
|
13 |
jQuery(window).scrollTop(jQuery(".fm-message").offset().top - 100);
|
14 |
+
document.scrollingElement.scrollTop = jQuery(".fm-message").offset().top - 100; /* For Safari.*/
|
15 |
}
|
16 |
|
17 |
// Scroll to captcha field notice.
|
20 |
var element_offset = jQuery(jQuery("#form" + form_id + " .message_captcha")).offset().top;
|
21 |
jQuery(".fm-form").find(".message_captcha").parents('.wdform-field').find('.wdform-label').addClass('error_label');
|
22 |
jQuery('html').animate({scrollTop: element_offset-150 },500);
|
23 |
+
document.scrollingElement.scrollTop = element_offset - 150; /* For Safari.*/
|
24 |
}
|
25 |
});
|
26 |
|
119 |
}
|
120 |
});
|
121 |
var FormPaypalTax = eval("FormPaypalTax_" + form_id);
|
122 |
+
if ( FormPaypalTax != 0 ) {
|
123 |
div_paypal_tax.html('Tax: ' + FormCurrency + (((total)*FormPaypalTax) / 100).toFixed(2));
|
124 |
}
|
125 |
jQuery('.div_total'+form_id).html(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2));
|
783 |
jQuery('html').animate({
|
784 |
scrollTop: form.offset().top - 150
|
785 |
}, 500);
|
786 |
+
document.scrollingElement.scrollTop = form.offset().top - 150; /* For Safari.*/
|
787 |
}
|
788 |
}
|
789 |
|
807 |
jQuery('html').animate({
|
808 |
scrollTop: form.offset().top - 150
|
809 |
}, 500);
|
810 |
+
document.scrollingElement.scrollTop = form.offset().top - 150; /* For Safari.*/
|
811 |
}
|
812 |
}
|
813 |
|
824 |
jQuery('html').animate({
|
825 |
scrollTop: form.offset().top - 150
|
826 |
}, 500);
|
827 |
+
document.scrollingElement.scrollTop = form.offset().top - 150; /* For Safari.*/
|
828 |
}
|
829 |
}
|
830 |
|
1113 |
jQuery('html').animate({
|
1114 |
scrollTop: element_offset - 150
|
1115 |
}, 500, function() {
|
1116 |
+
document.scrollingElement.scrollTop = element_offset - 150; /* For Safari.*/
|
1117 |
jQuery(window).off("scroll", scrollChecker);
|
1118 |
old_bg=jQuery(parent_div).css("background-color");
|
1119 |
jQuery(parent_div).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: webdorado,10web
|
3 |
Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.12.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -78,6 +78,14 @@ After downloading the ZIP file,
|
|
78 |
8. Select Columns
|
79 |
|
80 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
= 1.12.40 =
|
83 |
* Fixed: Set up map and recapcta keys links.
|
2 |
Contributors: webdorado,10web
|
3 |
Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 5.0
|
6 |
+
Stable tag: 1.12.41
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
78 |
8. Select Columns
|
79 |
|
80 |
== Changelog ==
|
81 |
+
= 1.12.41 =
|
82 |
+
* Added: WHERE selectors in "Options from database" (Select, Single and Multiple choice fields).
|
83 |
+
* Added: Placeholders (User ID, Submitter's IP, etc.) in WHERE clause in "Options from database" and MySQL Mapping.
|
84 |
+
* Improved: Parsing images in post content in Post Generation extension.
|
85 |
+
* Improved: Automatically deactivate plugin after uninstall.
|
86 |
+
* Fixed: Scroll issues on Safari (MacOS).
|
87 |
+
* Fixed: "Receive Copy" field checkbox with Form maker some themes.
|
88 |
+
* Fixed: "Custom text" after form submit.
|
89 |
|
90 |
= 1.12.40 =
|
91 |
* Fixed: Set up map and recapcta keys links.
|