Version Description
- Improves the fields' selection in the dependency settings, equations edition, and summary fields configuration.
- Fixes a minor error in logarithmic sliders with decimal steps.
- Fixes a minor issue with cached forms.
- Improves the navigation menu.
- Modifies the new form dialog to allow updating the form name in the library popup.
Download this release
Release Info
Developer | codepeople |
Plugin | Calculated Fields Form |
Version | 1.1.129 |
Comparing to | |
See all releases |
Code changes from version 1.1.128 to 1.1.129
- README.txt +10 -9
- changelog.txt +8 -0
- cp_calculatedfieldsf_free.php +2 -2
- css/stylelibrary.css +12 -10
- inc/cpcff_main.inc.php +88 -40
- js/fbuilder-pro-admin.jquery.js +15 -2
- js/fbuilder-pro-public.jquery.js +1 -1
- js/fields-public/02_fbuilder.fslider.js +2 -2
- js/library.js +22 -9
- languages/calculated-fields-form-en_US.mo +0 -0
- languages/calculated-fields-form-en_US.po +8 -8
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://cff.dwbooster.com
|
|
4 |
Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 6.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -965,6 +965,14 @@ A: Please, follow the steps below:
|
|
965 |
|
966 |
== Changelog ==
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
= 1.1.128 =
|
969 |
|
970 |
* Fixes a conflict with the Elementor popup.
|
@@ -1011,11 +1019,4 @@ A: Please, follow the steps below:
|
|
1011 |
* Optimizes select queries in widgets by reducing execution time and resource usage.
|
1012 |
* Fixes an issue in container fields (DIV and Fieldset) when the choices of contained radio buttons and checkbox fields are generated dynamically.
|
1013 |
* Fixes an issue in the spinner number fields when multiple forms are on the same page.
|
1014 |
-
* Triggers cff-summary-update event after updating the summary fields.
|
1015 |
-
|
1016 |
-
= 1.1.119 =
|
1017 |
-
|
1018 |
-
* Implements the NETWORKDAYS operation in the Date/Time operations module.
|
1019 |
-
* Fixes some warnings in the PHPCS report in the compatibilit checked with PHP8.1
|
1020 |
-
* Modifies the CFFCHART operation to allow registering the ChartJS plugins (Developer and Platinum versions).
|
1021 |
-
* Implements the Stripe Checkout add-on (Platinum version).
|
4 |
Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 6.1
|
7 |
+
Stable tag: 1.1.129
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
965 |
|
966 |
== Changelog ==
|
967 |
|
968 |
+
= 1.1.129 =
|
969 |
+
|
970 |
+
* Improves the fields' selection in the dependency settings, equations edition, and summary fields configuration.
|
971 |
+
* Fixes a minor error in logarithmic sliders with decimal steps.
|
972 |
+
* Fixes a minor issue with cached forms.
|
973 |
+
* Improves the navigation menu.
|
974 |
+
* Modifies the new form dialog to allow updating the form name in the library popup.
|
975 |
+
|
976 |
= 1.1.128 =
|
977 |
|
978 |
* Fixes a conflict with the Elementor popup.
|
1019 |
* Optimizes select queries in widgets by reducing execution time and resource usage.
|
1020 |
* Fixes an issue in container fields (DIV and Fieldset) when the choices of contained radio buttons and checkbox fields are generated dynamically.
|
1021 |
* Fixes an issue in the spinner number fields when multiple forms are on the same page.
|
1022 |
+
* Triggers cff-summary-update event after updating the summary fields.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.1.128 =
|
4 |
|
5 |
* Fixes a conflict with the Elementor popup.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.1.129 =
|
4 |
+
|
5 |
+
* Improves the fields' selection in the dependency settings, equations edition, and summary fields configuration.
|
6 |
+
* Fixes a minor error in logarithmic sliders with decimal steps.
|
7 |
+
* Fixes a minor issue with cached forms.
|
8 |
+
* Improves the navigation menu.
|
9 |
+
* Modifies the new form dialog to allow updating the form name in the library popup.
|
10 |
+
|
11 |
= 1.1.128 =
|
12 |
|
13 |
* Fixes a conflict with the Elementor popup.
|
cp_calculatedfieldsf_free.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Calculated Fields Form
|
4 |
Plugin URI: https://cff.dwbooster.com
|
5 |
Description: Create forms with field values calculated based in other form field values.
|
6 |
-
Version: 1.1.
|
7 |
Text Domain: calculated-fields-form
|
8 |
Author: CodePeople
|
9 |
Author URI: https://cff.dwbooster.com
|
@@ -15,7 +15,7 @@ if ( ! defined( 'WP_DEBUG' ) || true != WP_DEBUG ) {
|
|
15 |
}
|
16 |
|
17 |
// Defining main constants
|
18 |
-
define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.
|
19 |
define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
|
20 |
define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
21 |
define( 'CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
3 |
Plugin Name: Calculated Fields Form
|
4 |
Plugin URI: https://cff.dwbooster.com
|
5 |
Description: Create forms with field values calculated based in other form field values.
|
6 |
+
Version: 1.1.129
|
7 |
Text Domain: calculated-fields-form
|
8 |
Author: CodePeople
|
9 |
Author URI: https://cff.dwbooster.com
|
15 |
}
|
16 |
|
17 |
// Defining main constants
|
18 |
+
define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.129' );
|
19 |
define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
|
20 |
define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
21 |
define( 'CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
css/stylelibrary.css
CHANGED
@@ -49,7 +49,6 @@
|
|
49 |
}
|
50 |
|
51 |
.cff-form-library-categories ul>li:not(:first-child){margin-left:20px}
|
52 |
-
|
53 |
.cff-form-library-categories a{text-decoration:none;}
|
54 |
.cff-form-library-categories a:hover,
|
55 |
.cff-form-library-categories a:active,
|
@@ -79,7 +78,7 @@
|
|
79 |
.cff-form-library-close:hover::before{color:#c52359;}
|
80 |
|
81 |
.cff-form-library-main{
|
82 |
-
top:
|
83 |
position:absolute;
|
84 |
padding:10px;
|
85 |
left:0;
|
@@ -92,28 +91,31 @@
|
|
92 |
}
|
93 |
|
94 |
.cff-form-library-no-form{text-align:center;}
|
95 |
-
|
96 |
.cff-form-library-form{width:46%;margin:1%;float:left;box-sizing:border-box;border:1px solid #ddd;}
|
97 |
-
|
98 |
.cff-form-library-form-title{font-size:1.2em;font-weight:bold;padding:10px;}
|
99 |
-
|
100 |
.cff-form-library-form-description{padding:0 10px 10px 10px;}
|
101 |
-
|
102 |
.cff-form-library-form-category{border-top:1px solid #ddd;padding:10px;font-style:italic;}
|
103 |
-
|
104 |
.cff-form-library-form [type="button"]{margin:0 10px 10px 10px;}
|
105 |
-
|
|
|
|
|
106 |
|
107 |
/* Desktop */
|
108 |
@media screen and (min-width:710px) {
|
109 |
-
|
110 |
}
|
111 |
|
112 |
/* Mobiles devices */
|
113 |
@media screen and (max-width:710px) {
|
114 |
.cff-form-library-container{flex-direction:column;}
|
115 |
.cff-form-library-column-left,
|
116 |
-
.cff-form-library-search-box{border:0;}
|
|
|
117 |
.cff-form-library-categories{display:none;}
|
118 |
.cff-form-library-form{width:98%;}
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
49 |
}
|
50 |
|
51 |
.cff-form-library-categories ul>li:not(:first-child){margin-left:20px}
|
|
|
52 |
.cff-form-library-categories a{text-decoration:none;}
|
53 |
.cff-form-library-categories a:hover,
|
54 |
.cff-form-library-categories a:active,
|
78 |
.cff-form-library-close:hover::before{color:#c52359;}
|
79 |
|
80 |
.cff-form-library-main{
|
81 |
+
top:45px;
|
82 |
position:absolute;
|
83 |
padding:10px;
|
84 |
left:0;
|
91 |
}
|
92 |
|
93 |
.cff-form-library-no-form{text-align:center;}
|
|
|
94 |
.cff-form-library-form{width:46%;margin:1%;float:left;box-sizing:border-box;border:1px solid #ddd;}
|
|
|
95 |
.cff-form-library-form-title{font-size:1.2em;font-weight:bold;padding:10px;}
|
|
|
96 |
.cff-form-library-form-description{padding:0 10px 10px 10px;}
|
|
|
97 |
.cff-form-library-form-category{border-top:1px solid #ddd;padding:10px;font-style:italic;}
|
|
|
98 |
.cff-form-library-form [type="button"]{margin:0 10px 10px 10px;}
|
99 |
+
.cff-form-library-blank-form{padding:10px;width: calc( 100% - 40px );float:left;clear:none;box-sizing:border-box;}
|
100 |
+
.cff-form-library-blank-form input[type="button"]{width:150px;}
|
101 |
+
.cff-form-library-blank-form input[type="text"]{width: calc( 100% - 160px );}
|
102 |
|
103 |
/* Desktop */
|
104 |
@media screen and (min-width:710px) {
|
105 |
+
.cff-form-library-column-left .cff-form-library-close{display:none;}
|
106 |
}
|
107 |
|
108 |
/* Mobiles devices */
|
109 |
@media screen and (max-width:710px) {
|
110 |
.cff-form-library-container{flex-direction:column;}
|
111 |
.cff-form-library-column-left,
|
112 |
+
.cff-form-library-search-box{border:0;height:auto;}
|
113 |
+
.cff-form-library-search-box input{margin-bottom:0;}
|
114 |
.cff-form-library-categories{display:none;}
|
115 |
.cff-form-library-form{width:98%;}
|
116 |
+
.cff-form-library-blank-form{float:none;width:100%;padding-top:0;}
|
117 |
+
.cff-form-library-blank-form input[type="text"]{width:100%;}
|
118 |
+
.cff-form-library-blank-form input[type="button"]{width:100%;margin-top:10px;}
|
119 |
+
.cff-form-library-main{top:100px;bottom:5px;}
|
120 |
+
.cff-form-library-column-right .cff-form-library-close{display:none;}
|
121 |
}
|
inc/cpcff_main.inc.php
CHANGED
@@ -173,6 +173,7 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
173 |
|
174 |
// Creates the menu entries in the WordPress menu.
|
175 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
|
|
176 |
|
177 |
// Displays the shortcode insertion buttons.
|
178 |
add_action( 'media_buttons', array( $this, 'media_buttons' ) );
|
@@ -240,6 +241,8 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
240 |
* @return void.
|
241 |
*/
|
242 |
public function admin_menu() {
|
|
|
|
|
243 |
// Settings page
|
244 |
add_options_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array( $this, 'admin_pages' ) );
|
245 |
|
@@ -247,15 +250,52 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
247 |
add_menu_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array( $this, 'admin_pages' ) );
|
248 |
|
249 |
// Submenu options
|
250 |
-
add_submenu_page( 'cp_calculated_fields_form', '
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
-
add_submenu_page( 'cp_calculated_fields_form', 'Marketplace', 'Marketplace', 'manage_options', '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
|
256 |
-
add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', 'cp_calculated_fields_form_sub4', array( $this, 'admin_pages' ) );
|
257 |
} // End admin_menu
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
/**
|
260 |
* Loads the corresponding pages in the WordPress or redirects the user to the external URLs.
|
261 |
*
|
@@ -270,15 +310,19 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
270 |
@include_once CP_CALCULATEDFIELDSF_BASE_PATH . '/inc/cpcff_admin_int.inc.php';
|
271 |
} else {
|
272 |
// Redirecting outer website
|
273 |
-
if ( isset( $_GET['page'] ) && '
|
274 |
if ( @wp_redirect( 'https://cff.dwbooster.com/download' ) ) {
|
275 |
exit;
|
276 |
}
|
277 |
-
} elseif ( isset( $_GET['page'] ) && '
|
278 |
if ( @wp_redirect( 'https://cff.dwbooster.com/documentation' ) ) {
|
279 |
exit;
|
280 |
}
|
281 |
-
} elseif (
|
|
|
|
|
|
|
|
|
282 |
if ( @wp_redirect( 'https://wordpress.org/support/plugin/calculated-fields-form#new-post' ) ) {
|
283 |
exit;
|
284 |
}
|
@@ -302,7 +346,42 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
302 |
public function admin_resources( $hook ) {
|
303 |
// Checks if it is the plugin's page
|
304 |
if ( isset( $_GET['page'] ) ) {
|
305 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
wp_deregister_script( 'tribe-events-bootstrap-datepicker' );
|
307 |
wp_register_script( 'tribe-events-bootstrap-datepicker', plugins_url( '/js/nope.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
308 |
|
@@ -336,38 +415,7 @@ if ( ! class_exists( 'CPCFF_MAIN' ) ) {
|
|
336 |
wp_enqueue_style( 'cp_calculatedfieldsf_builder_style', plugins_url( '/css/style.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
337 |
wp_enqueue_style( 'cp_calculatedfieldsf_builder_library_style', plugins_url( '/css/stylelibrary.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array( 'cp_calculatedfieldsf_builder_style' ), CP_CALCULATEDFIELDSF_VERSION );
|
338 |
wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', array(), CP_CALCULATEDFIELDSF_VERSION );
|
339 |
-
|
340 |
-
in_array(
|
341 |
-
$_GET['page'],
|
342 |
-
array(
|
343 |
-
'cp_calculated_fields_form_sub2',
|
344 |
-
'cp_calculated_fields_form_sub3',
|
345 |
-
'cp_calculated_fields_form_sub4',
|
346 |
-
'cp_calculated_fields_form_sub5',
|
347 |
-
)
|
348 |
-
)
|
349 |
-
) {
|
350 |
-
$cpcff_redirect = array();
|
351 |
-
switch ( $_GET['page'] ) {
|
352 |
-
case 'cp_calculated_fields_form_sub2':
|
353 |
-
$cpcff_redirect['url'] = 'https://cff.dwbooster.com/documentation';
|
354 |
-
break;
|
355 |
-
case 'cp_calculated_fields_form_sub3':
|
356 |
-
$cpcff_redirect['url'] = 'https://cff.dwbooster.com/download';
|
357 |
-
break;
|
358 |
-
case 'cp_calculated_fields_form_sub4':
|
359 |
-
$cpcff_redirect['url'] = 'https://wordpress.org/support/plugin/calculated-fields-form#new-post';
|
360 |
-
break;
|
361 |
-
case 'cp_calculated_fields_form_sub5':
|
362 |
-
$cpcff_redirect['url'] = 'https://cff-bundles.dwbooster.com';
|
363 |
-
break;
|
364 |
-
}
|
365 |
-
wp_enqueue_script( 'cp_calculatedfieldsf_redirect_script', plugins_url( '/js/redirect_script.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
366 |
-
wp_localize_script(
|
367 |
-
'cp_calculatedfieldsf_redirect_script',
|
368 |
-
'cpcff_redirect',
|
369 |
-
$cpcff_redirect
|
370 |
-
);
|
371 |
}
|
372 |
}
|
373 |
|
173 |
|
174 |
// Creates the menu entries in the WordPress menu.
|
175 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
176 |
+
add_action( 'admin_head', array( $this, 'admin_menu_styles' ), 11 );
|
177 |
|
178 |
// Displays the shortcode insertion buttons.
|
179 |
add_action( 'media_buttons', array( $this, 'media_buttons' ) );
|
241 |
* @return void.
|
242 |
*/
|
243 |
public function admin_menu() {
|
244 |
+
global $submenu;
|
245 |
+
|
246 |
// Settings page
|
247 |
add_options_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array( $this, 'admin_pages' ) );
|
248 |
|
250 |
add_menu_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array( $this, 'admin_pages' ) );
|
251 |
|
252 |
// Submenu options
|
253 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Calculated Fields Form', 'All Forms', 'manage_options', "cp_calculated_fields_form", array($this, 'admin_pages') );
|
254 |
+
|
255 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Calculated Fields Form - New Form', 'Add New', 'manage_options', "cp_calculated_fields_form_sub_new", array($this, 'admin_pages') );
|
256 |
+
|
257 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Calculated Fields Form - Troubleshoot Area & General Settings', 'Troubleshoot Area & General Settings', 'manage_options', "cp_calculated_fields_form_sub_troubleshoots_settings", array($this, 'admin_pages') );
|
258 |
+
|
259 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Upgrade', 'Upgrade', 'manage_options', 'cp_calculated_fields_form_sub_upgrade', array( $this, 'admin_pages' ) );
|
260 |
|
261 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Marketplace', 'Marketplace', 'manage_options', 'cp_calculated_fields_form_sub_marketplace', array( $this, 'admin_pages' ) );
|
262 |
+
|
263 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Documentation', 'Documentation', 'manage_options', 'cp_calculated_fields_form_sub_documentation', array( $this, 'admin_pages' ) );
|
264 |
+
|
265 |
+
add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', 'cp_calculated_fields_form_sub_forum', array( $this, 'admin_pages' ) );
|
266 |
+
|
267 |
+
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
|
268 |
+
foreach ( $submenu["cp_calculated_fields_form"] as $index => $item ) {
|
269 |
+
if ( 'cp_calculated_fields_form_sub_marketplace' == $item[2] ) {
|
270 |
+
if ( isset( $item[4] ) ) {
|
271 |
+
$submenu["cp_calculated_fields_form"][ $index ][4] .= ' calculated-fields-form-submenu-marketplace';
|
272 |
+
} else {
|
273 |
+
$submenu["cp_calculated_fields_form"][ $index ][] = 'calculated-fields-form-submenu-marketplace';
|
274 |
+
}
|
275 |
+
}
|
276 |
|
277 |
+
if ( 'cp_calculated_fields_form_sub_upgrade' == $item[2] ) {
|
278 |
+
if ( isset( $item[4] ) ) {
|
279 |
+
$submenu["cp_calculated_fields_form"][ $index ][4] .= ' calculated-fields-form-submenu-upgrade';
|
280 |
+
} else {
|
281 |
+
$submenu["cp_calculated_fields_form"][ $index ][] = 'calculated-fields-form-submenu-upgrade';
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
// phpcs:enable WordPress.WP.GlobalVariablesOverride.Prohibited
|
286 |
|
|
|
287 |
} // End admin_menu
|
288 |
|
289 |
+
public function admin_menu_styles() {
|
290 |
+
$styles = '';
|
291 |
+
|
292 |
+
$styles .= 'a.calculated-fields-form-submenu-marketplace { background-color: #f0db4f !important; color: #323330 !important; font-weight: 600 !important; }';
|
293 |
+
$styles .= 'a.calculated-fields-form-submenu-upgrade { background-color: #ee7878 !important; color: #ffffff !important; font-weight: 600 !important; }';
|
294 |
+
|
295 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
296 |
+
printf( '<style>%s</style>', $styles );
|
297 |
+
} // End admin_menu_styles
|
298 |
+
|
299 |
/**
|
300 |
* Loads the corresponding pages in the WordPress or redirects the user to the external URLs.
|
301 |
*
|
310 |
@include_once CP_CALCULATEDFIELDSF_BASE_PATH . '/inc/cpcff_admin_int.inc.php';
|
311 |
} else {
|
312 |
// Redirecting outer website
|
313 |
+
if ( isset( $_GET['page'] ) && 'cp_calculated_fields_form_sub_upgrade' == $_GET['page'] ) {
|
314 |
if ( @wp_redirect( 'https://cff.dwbooster.com/download' ) ) {
|
315 |
exit;
|
316 |
}
|
317 |
+
} elseif ( isset( $_GET['page'] ) && 'cp_calculated_fields_form_sub_documentation' == $_GET['page'] ) {
|
318 |
if ( @wp_redirect( 'https://cff.dwbooster.com/documentation' ) ) {
|
319 |
exit;
|
320 |
}
|
321 |
+
} elseif (isset($_GET["page"]) && $_GET["page"] == 'cp_calculated_fields_form_sub_marketplace') {
|
322 |
+
if ( @wp_redirect( 'https://cff-bundles.dwbooster.com' ) ) {
|
323 |
+
exit;
|
324 |
+
}
|
325 |
+
} elseif ( isset( $_GET['page'] ) && 'cp_calculated_fields_form_sub_forum' == $_GET['page'] ) {
|
326 |
if ( @wp_redirect( 'https://wordpress.org/support/plugin/calculated-fields-form#new-post' ) ) {
|
327 |
exit;
|
328 |
}
|
346 |
public function admin_resources( $hook ) {
|
347 |
// Checks if it is the plugin's page
|
348 |
if ( isset( $_GET['page'] ) ) {
|
349 |
+
// Checks if it is to an external page
|
350 |
+
if(
|
351 |
+
'cp_calculated_fields_form_sub_documentation' == $_GET["page"] ||
|
352 |
+
'cp_calculated_fields_form_sub_marketplace' == $_GET["page"] ||
|
353 |
+
'cp_calculated_fields_form_sub_upgrade' == $_GET["page"] ||
|
354 |
+
'cp_calculated_fields_form_sub_forum' == $_GET["page"]
|
355 |
+
)
|
356 |
+
{
|
357 |
+
|
358 |
+
$redirect_url = '';
|
359 |
+
$cpcff_redirect = array();
|
360 |
+
switch ( $_GET['page'] ) {
|
361 |
+
case 'cp_calculated_fields_form_sub_documentation':
|
362 |
+
$cpcff_redirect['url'] = 'https://cff.dwbooster.com/documentation';
|
363 |
+
break;
|
364 |
+
case 'cp_calculated_fields_form_sub_upgrade':
|
365 |
+
$cpcff_redirect['url'] = 'https://cff.dwbooster.com/download';
|
366 |
+
break;
|
367 |
+
case 'cp_calculated_fields_form_sub_forum':
|
368 |
+
$cpcff_redirect['url'] = 'https://wordpress.org/support/plugin/calculated-fields-form#new-post';
|
369 |
+
break;
|
370 |
+
case 'cp_calculated_fields_form_sub_marketplace':
|
371 |
+
$cpcff_redirect['url'] = 'https://cff-bundles.dwbooster.com';
|
372 |
+
break;
|
373 |
+
}
|
374 |
+
wp_enqueue_script( 'cp_calculatedfieldsf_redirect_script', plugins_url( '/js/redirect_script.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
375 |
+
wp_localize_script(
|
376 |
+
'cp_calculatedfieldsf_redirect_script',
|
377 |
+
'cpcff_redirect',
|
378 |
+
$cpcff_redirect
|
379 |
+
);
|
380 |
+
|
381 |
+
} elseif (
|
382 |
+
in_array( $_GET['page'], array( 'cp_calculated_fields_form', 'cp_calculated_fields_form_sub_new', 'cp_calculated_fields_form_sub_troubleshoots_settings' ) )
|
383 |
+
) {
|
384 |
+
|
385 |
wp_deregister_script( 'tribe-events-bootstrap-datepicker' );
|
386 |
wp_register_script( 'tribe-events-bootstrap-datepicker', plugins_url( '/js/nope.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
387 |
|
415 |
wp_enqueue_style( 'cp_calculatedfieldsf_builder_style', plugins_url( '/css/style.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array(), CP_CALCULATEDFIELDSF_VERSION );
|
416 |
wp_enqueue_style( 'cp_calculatedfieldsf_builder_library_style', plugins_url( '/css/stylelibrary.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ), array( 'cp_calculatedfieldsf_builder_style' ), CP_CALCULATEDFIELDSF_VERSION );
|
417 |
wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', array(), CP_CALCULATEDFIELDSF_VERSION );
|
418 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
}
|
420 |
}
|
421 |
|
js/fbuilder-pro-admin.jquery.js
CHANGED
@@ -167,7 +167,7 @@
|
|
167 |
$('#tabs-2').html( items[id].showAllSettings() );
|
168 |
} catch (e) {}
|
169 |
items[id].editItemEvents();
|
170 |
-
setTimeout(function(){try{$('#tabs-2 .choicesSet select:visible, #tabs-2 .cf_dependence_field:visible, #tabs-2 #sSelectedField, #tabs-2 #sFieldList').chosen();}catch(e){}}, 50);
|
171 |
};
|
172 |
|
173 |
$.fbuilder[ 'removeItem' ] = function( index )
|
@@ -1286,4 +1286,17 @@
|
|
1286 |
'cff-metabox-nonce' : cff_metabox_nonce || 0
|
1287 |
}
|
1288 |
);
|
1289 |
-
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
$('#tabs-2').html( items[id].showAllSettings() );
|
168 |
} catch (e) {}
|
169 |
items[id].editItemEvents();
|
170 |
+
setTimeout(function(){try{$('#tabs-2 .choicesSet select:visible, #tabs-2 .cf_dependence_field:visible, #tabs-2 #sSelectedField, #tabs-2 #sFieldList').chosen({search_contains: true});}catch(e){}}, 50);
|
171 |
};
|
172 |
|
173 |
$.fbuilder[ 'removeItem' ] = function( index )
|
1286 |
'cff-metabox-nonce' : cff_metabox_nonce || 0
|
1287 |
}
|
1288 |
);
|
1289 |
+
} );
|
1290 |
+
|
1291 |
+
// Redirect to the admin list sections
|
1292 |
+
$(window).on('load', function(){
|
1293 |
+
if ( /cp_calculated_fields_form_sub_addons/i.test(document.location.search) ) {
|
1294 |
+
$('#metabox_addons_area')[0].scrollIntoView();
|
1295 |
+
} else if ( /cp_calculated_fields_form_sub_troubleshoots_settings/i.test(document.location.search) ) {
|
1296 |
+
$('#metabox_troubleshoot_area')[0].scrollIntoView();
|
1297 |
+
} else if ( /cp_calculated_fields_form_sub_import_export/i.test(document.location.search) ) {
|
1298 |
+
$('#metabox_import_export_area')[0].scrollIntoView();
|
1299 |
+
} else if ( /cp_calculated_fields_form_sub_new/i.test(document.location.search) ) {
|
1300 |
+
cff_openLibraryDialog( true );
|
1301 |
+
}
|
1302 |
+
});
|
js/fbuilder-pro-public.jquery.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
$.fbuilder['version'] = '1.1.
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
1 |
+
$.fbuilder['version'] = '1.1.129';
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
js/fields-public/02_fbuilder.fslider.js
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
maxv = Math.log(max),
|
36 |
scale = (maxv - minv) / (max - min);
|
37 |
|
38 |
-
return
|
39 |
},
|
40 |
_inverse : function(v)
|
41 |
{
|
@@ -48,7 +48,7 @@
|
|
48 |
maxv = Math.log(max),
|
49 |
scale = (maxv - minv) / (max - min);
|
50 |
|
51 |
-
return
|
52 |
},
|
53 |
_setThousandsSeparator : function(v)
|
54 |
{
|
35 |
maxv = Math.log(max),
|
36 |
scale = (maxv - minv) / (max - min);
|
37 |
|
38 |
+
return ROUND( ROUND( Math.exp( minv + scale * ( v - min ) ) / step ) * step, step ) * 1;
|
39 |
},
|
40 |
_inverse : function(v)
|
41 |
{
|
48 |
maxv = Math.log(max),
|
49 |
scale = (maxv - minv) / (max - min);
|
50 |
|
51 |
+
return ROUND( ROUND( ( ( Math.log( v ) - minv ) / scale + min ) / step ) * step, step ) * 1;
|
52 |
},
|
53 |
_setThousandsSeparator : function(v)
|
54 |
{
|
js/library.js
CHANGED
@@ -9,6 +9,7 @@ jQuery(function () {
|
|
9 |
<div class="cff-form-library-container">
|
10 |
<div class="cff-form-library-column-left">
|
11 |
<div class="cff-form-library-search-box">
|
|
|
12 |
<input type="search" placeholder="Search..." onkeyup="cff_filteringFormsByText(this)">
|
13 |
</div>
|
14 |
<div class="cff-form-library-categories">
|
@@ -18,7 +19,14 @@ jQuery(function () {
|
|
18 |
</div>
|
19 |
</div>
|
20 |
<div class="cff-form-library-column-right">
|
21 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<div class="cff-form-library-main">
|
23 |
<div class="cff-form-library-no-form">No form meets the search criteria</div>
|
24 |
</div>
|
@@ -38,7 +46,7 @@ jQuery(function () {
|
|
38 |
</div>
|
39 |
`,
|
40 |
|
41 |
-
|
42 |
|
43 |
$.expr[":"].contains = $.expr.createPseudo(function (arg) {
|
44 |
return function (elem) {
|
@@ -46,15 +54,16 @@ jQuery(function () {
|
|
46 |
};
|
47 |
});
|
48 |
|
49 |
-
function openDialog() {
|
|
|
50 |
var version = 'free',
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
|
55 |
form_name_field.val(form_name_field.val().replace(/^\s*/, '').replace(/\s*$/, ''));
|
56 |
|
57 |
-
if('reportValidity' in form_tag && !form_tag.reportValidity()) return;
|
58 |
|
59 |
if (!$('.cff-form-library-container').length) {
|
60 |
$('body').append(dialog_tpl);
|
@@ -111,6 +120,9 @@ jQuery(function () {
|
|
111 |
$('.cff-form-library-search-box input').val('');
|
112 |
$('.cff-form-library-categories ul>li:first-child a').click();
|
113 |
$('.cff-form-library-cover').show();
|
|
|
|
|
|
|
114 |
};
|
115 |
|
116 |
function closeDialog() {
|
@@ -159,7 +171,7 @@ jQuery(function () {
|
|
159 |
};
|
160 |
|
161 |
function getTemplate(id) {
|
162 |
-
var form_name = encodeURIComponent(
|
163 |
category_name = encodeURIComponent($('[id="calculated-fields-form-category"]').val() || ''),
|
164 |
url;
|
165 |
|
@@ -178,6 +190,7 @@ jQuery(function () {
|
|
178 |
};
|
179 |
|
180 |
$(document).on('keyup', function(evt){ if ( evt.keyCode == 27 ) { cff_closeLibraryDialog(); } });
|
|
|
181 |
|
182 |
// Export
|
183 |
window['cff_openLibraryDialog'] = openDialog;
|
@@ -185,4 +198,4 @@ jQuery(function () {
|
|
185 |
window['cff_getTemplate'] = getTemplate;
|
186 |
window['cff_templatesInCategory'] = displayTemplates;
|
187 |
window['cff_filteringFormsByText'] = formsByText;
|
188 |
-
});
|
9 |
<div class="cff-form-library-container">
|
10 |
<div class="cff-form-library-column-left">
|
11 |
<div class="cff-form-library-search-box">
|
12 |
+
<div class="cff-form-library-close"></div>
|
13 |
<input type="search" placeholder="Search..." onkeyup="cff_filteringFormsByText(this)">
|
14 |
</div>
|
15 |
<div class="cff-form-library-categories">
|
19 |
</div>
|
20 |
</div>
|
21 |
<div class="cff-form-library-column-right">
|
22 |
+
<div>
|
23 |
+
<div class="cff-form-library-blank-form">
|
24 |
+
<input type="text" placeholder="Form name..." id="cp_itemname_library">
|
25 |
+
<input type="button" value="Create Basic Form" class="button-secondary" onclick="cff_getTemplate(0);">
|
26 |
+
</div>
|
27 |
+
<div class="cff-form-library-close"></div>
|
28 |
+
<div style="clear:both"></div>
|
29 |
+
</div>
|
30 |
<div class="cff-form-library-main">
|
31 |
<div class="cff-form-library-no-form">No form meets the search criteria</div>
|
32 |
</div>
|
46 |
</div>
|
47 |
`,
|
48 |
|
49 |
+
form_name_library_field;
|
50 |
|
51 |
$.expr[":"].contains = $.expr.createPseudo(function (arg) {
|
52 |
return function (elem) {
|
54 |
};
|
55 |
});
|
56 |
|
57 |
+
function openDialog(explicit) {
|
58 |
+
|
59 |
var version = 'free',
|
60 |
+
form_name_field = $('[id="cp_itemname"]'),
|
61 |
+
form_tag = form_name_field.closest('form')[0],
|
62 |
+
data = [];
|
63 |
|
64 |
form_name_field.val(form_name_field.val().replace(/^\s*/, '').replace(/\s*$/, ''));
|
65 |
|
66 |
+
if( ( typeof explicit == 'undefined' || !explicit ) && 'reportValidity' in form_tag && !form_tag.reportValidity()) return;
|
67 |
|
68 |
if (!$('.cff-form-library-container').length) {
|
69 |
$('body').append(dialog_tpl);
|
120 |
$('.cff-form-library-search-box input').val('');
|
121 |
$('.cff-form-library-categories ul>li:first-child a').click();
|
122 |
$('.cff-form-library-cover').show();
|
123 |
+
|
124 |
+
form_name_library_field = $('[id="cp_itemname_library"]');
|
125 |
+
form_name_library_field.val(form_name_field.val());
|
126 |
};
|
127 |
|
128 |
function closeDialog() {
|
171 |
};
|
172 |
|
173 |
function getTemplate(id) {
|
174 |
+
var form_name = encodeURIComponent(form_name_library_field.val() || ''),
|
175 |
category_name = encodeURIComponent($('[id="calculated-fields-form-category"]').val() || ''),
|
176 |
url;
|
177 |
|
190 |
};
|
191 |
|
192 |
$(document).on('keyup', function(evt){ if ( evt.keyCode == 27 ) { cff_closeLibraryDialog(); } });
|
193 |
+
$(document).on('click', '.cff-form-library-close', closeDialog);
|
194 |
|
195 |
// Export
|
196 |
window['cff_openLibraryDialog'] = openDialog;
|
198 |
window['cff_getTemplate'] = getTemplate;
|
199 |
window['cff_templatesInCategory'] = displayTemplates;
|
200 |
window['cff_filteringFormsByText'] = formsByText;
|
201 |
+
});
|
languages/calculated-fields-form-en_US.mo
CHANGED
Binary file
|
languages/calculated-fields-form-en_US.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date: 2022-11-
|
5 |
-
"PO-Revision-Date: 2022-11-
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
@@ -271,7 +271,7 @@ msgid "Request Custom Modifications"
|
|
271 |
msgstr ""
|
272 |
|
273 |
#: inc/cpcff_admin_int.inc.php:382 inc/cpcff_admin_int.inc.php:733
|
274 |
-
#: inc/cpcff_admin_int_list.inc.php:436 inc/cpcff_main.inc.php:
|
275 |
msgid "Help"
|
276 |
msgstr ""
|
277 |
|
@@ -678,7 +678,7 @@ msgstr ""
|
|
678 |
msgid "Update"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: inc/cpcff_admin_int_list.inc.php:304 inc/cpcff_main.inc.php:
|
682 |
msgid "Settings"
|
683 |
msgstr ""
|
684 |
|
@@ -836,7 +836,7 @@ msgstr ""
|
|
836 |
msgid "Calculated Fields Form Marketplace"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: inc/cpcff_admin_int_list.inc.php:436 inc/cpcff_main.inc.php:
|
840 |
msgid "Upgrade"
|
841 |
msgstr ""
|
842 |
|
@@ -905,15 +905,15 @@ msgid ""
|
|
905 |
"settings."
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: inc/cpcff_main.inc.php:
|
909 |
msgid "Request custom changes"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: inc/cpcff_main.inc.php:
|
913 |
msgid "Insert Calculated Fields Form"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: inc/cpcff_main.inc.php:
|
917 |
msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
|
918 |
msgstr ""
|
919 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2022-11-22 01:56+0100\n"
|
5 |
+
"PO-Revision-Date: 2022-11-22 01:56+0100\n"
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
271 |
msgstr ""
|
272 |
|
273 |
#: inc/cpcff_admin_int.inc.php:382 inc/cpcff_admin_int.inc.php:733
|
274 |
+
#: inc/cpcff_admin_int_list.inc.php:436 inc/cpcff_main.inc.php:219
|
275 |
msgid "Help"
|
276 |
msgstr ""
|
277 |
|
678 |
msgid "Update"
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: inc/cpcff_admin_int_list.inc.php:304 inc/cpcff_main.inc.php:217
|
682 |
msgid "Settings"
|
683 |
msgstr ""
|
684 |
|
836 |
msgid "Calculated Fields Form Marketplace"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: inc/cpcff_admin_int_list.inc.php:436 inc/cpcff_main.inc.php:218
|
840 |
msgid "Upgrade"
|
841 |
msgstr ""
|
842 |
|
905 |
"settings."
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: inc/cpcff_main.inc.php:216
|
909 |
msgid "Request custom changes"
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: inc/cpcff_main.inc.php:235
|
913 |
msgid "Insert Calculated Fields Form"
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: inc/cpcff_main.inc.php:235
|
917 |
msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
|
918 |
msgstr ""
|
919 |
|