Calculated Fields Form - Version 1.0.280

Version Description

  • Modifies the slider controls allowing to integrate other fields in the form with the attributes: min, max and step, and vary them dynamically at runtime.
  • Modifies the predefined template 12 to display the down arrow in the DropDown fields.
  • Allows to include the tags of the Section Break controls in the notification emails and thank you pages (Professional, Developer and Platinum verisons of the plugin)
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Calculated Fields Form
Version 1.0.280
Comparing to
See all releases

Code changes from version 1.0.263 to 1.0.280

README.txt CHANGED
@@ -48,6 +48,13 @@ Calculated Fields Form can be used for creating both single and complex calculat
48
  * Intuitive and interactive form builder interface
49
  * Predefined forms templates
50
 
 
 
 
 
 
 
 
51
  = Latest Features Added =
52
 
53
  * Dependent fields: Fields can be shown/hidden based on other checkboxes, radiobuttons or drop-down selections
@@ -879,74 +886,74 @@ A: Please, visit the following entry in our technical blog:
879
  == Screenshots ==
880
 
881
  1. Calculated forms list
882
- 2. Inserting a calculated form into a page
883
- 3. Sample calculated form
884
- 4. Calculated field settings
885
- 5. Calculator Form builder
886
- 6. Editing general fields
887
- 7. Available designs
888
- 8. Add-ons section
889
- 9. WooCommerce add-on
890
- 10. SalesForce add-on
891
- 11. WebHook add-on, and its integration with Zapier
 
 
892
 
893
  == Changelog ==
894
 
895
- = 1.0.263 =
896
 
897
- * Fixes another conflict with the Speed Booster Pack plugin.
898
- * Includes a new operation to access easier to the fields, for example to assign a value to the slider field: fieldname1, enter as part of the equation getField(1).setVal(50);
 
899
 
900
- = 1.0.262 =
901
 
902
- * Fixes a conflict with the new version of Gutenberg.
903
 
904
- = 1.0.261 =
905
 
906
- * Allows read the raw values of every field in the form.
907
- * Fixes a conflict with some themes that apply a max-width css rule to the form's fields.
908
- * Fixes a conflict with the Speed Booster Pack plugin.
909
 
910
- = 1.0.260 =
911
 
912
- * Fixes an issue in the controls: radio button, checkbox and dropdown.
 
 
 
913
 
914
- = 1.0.259 =
915
 
916
- * Fixes an issue in the date/time fields that allows select by default an invalid time.
917
- * Suppports other plugins for managing the AMP versions of pages.
918
- * Includes other minor changes.
919
- * Modifies the iCal add-on (Platinum version of plugin)
920
- * Includes the PrintFriendly add-on (Platinum version of plugin)
921
 
922
- = 1.0.258 =
923
 
924
- * Allows to use the Acceptance fields into the equations.
925
- * Modifies the selector to the tag with the price of the product to replace in the CFF - WooCommerce add-on (Developer and Platinum versions of the plugin)
926
- * Allows to use other special constants like: submissiondate_mmddyyyy, submissiondate_ddmmyyyy, and ipaddress, in the integration with WebHooks URLs (Developer and Platinum versions of the plugin) and the WebMerge add-on (the Platinum version of the plugin).
927
 
928
- = 1.0.257 =
929
 
930
- * Modifies the date/time field doing the time components more coherents, and fixes an issue in the field's validation. Applies the styles for errors to the time components.
931
- * Applies different class names to the different components in the slider fields to take total control to their visual appearance.
932
- * Categorizes the add-ons for grouping them in the settings page of the plugin (Developer and Platinum versions of the plugin).
933
 
934
- = 1.0.256 =
935
 
936
- * Fixes an issue with Date/Time fields in multi-pages forms. In multi-pages forms if the date/time field is the first one in the page, the datepicker dialog was displayed by default, now this behavior has been solved.
937
- * Includes the Autocomplete Places add-on, alternative to the Google Places add-on but using the Photon API (Distributed with the Platinum version of the plugin)
938
 
939
- = 1.0.255 =
940
 
941
- * Fixes an issue with No Cents attribute in the currency fields.
 
942
 
943
- = 1.0.254 =
944
 
945
- * Fixes an issue with the values of the checkbox fields when its used the modifier |r in the equations.
946
- * Fixes an issue in the tags replacements in the thank you pages and notifiation emails (Professional, Developer and Platinum versions)
947
 
948
  == Upgrade Notice ==
949
 
950
- = 1.0.263 =
951
 
952
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://cff.dwbooster.com/contact-us
48
  * Intuitive and interactive form builder interface
49
  * Predefined forms templates
50
 
51
+ The "Calculated Fields Form" plugin allows the specific integration with the following editors:
52
+
53
+ * Classic WordPress Editor.
54
+ * Gutenberg Editor.
55
+ * Elementor.
56
+ * For other editors, the shortcodes should be inserted using other controls of general purpose, like the controls for inserting HTML or shortcodes.
57
+
58
  = Latest Features Added =
59
 
60
  * Dependent fields: Fields can be shown/hidden based on other checkboxes, radiobuttons or drop-down selections
886
  == Screenshots ==
887
 
888
  1. Calculated forms list
889
+ 2. Inserting the form using the Classic Editor
890
+ 3. Inserting the form using the Gutenberg Editor
891
+ 4. Inserting the form using Elementor
892
+ 5. Sample calculated form
893
+ 6. Calculated field settings
894
+ 7. Calculator Form builder
895
+ 8. Editing general fields
896
+ 9. Available designs
897
+ 10. Add-ons section
898
+ 11. WooCommerce add-on
899
+ 12. SalesForce add-on
900
+ 13. WebHook add-on, and its integration with Zapier
901
 
902
  == Changelog ==
903
 
904
+ = 1.0.280 =
905
 
906
+ * Modifies the slider controls allowing to integrate other fields in the form with the attributes: min, max and step, and vary them dynamically at runtime.
907
+ * Modifies the predefined template 12 to display the down arrow in the DropDown fields.
908
+ * Allows to include the tags of the Section Break controls in the notification emails and thank you pages (Professional, Developer and Platinum verisons of the plugin)
909
 
910
+ = 1.0.279 =
911
 
912
+ * Fixes an issue with the tooltips defined in the radio buttons and checkbox controls.
913
 
914
+ = 1.0.278 =
915
 
916
+ * Modifies the module that generates the forms' previews, and the AMP versions of forms.
917
+ * Implements the specific integration with the Elementor pages builder.
918
+ * Improves the forms appearance in small screens.
919
 
920
+ = 1.0.277 =
921
 
922
+ * Improves the some of predefined templates.
923
+ * Optimizes the form's styles.
924
+ * Allows to includes images and html tags in the tooltips.
925
+ * Fixes an issue printing the list of messages when includes images (Professional, Developer, and Platinum versions of the plugin)
926
 
927
+ = 1.0.276 =
928
 
929
+ * Implements a new columns system to format the forms easier.
 
 
 
 
930
 
931
+ = 1.0.275 =
932
 
933
+ * Includes new operations: RADIANS to convert an angle in degrees to radians, DEGREES to convert a number in radians to degrees, ATANH to get the hyperbolic arctangent of a number.
934
+ * Includes new controls in the interface of the equations edition: SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, ATANH, RADIANS, DEGREES.
 
935
 
936
+ = 1.0.274 =
937
 
938
+ * Modifies the blocks dimensions.
939
+ * Fixes an issue editing the additional attributes.
940
+ * Includes the Form ID in the submissions list.
941
 
942
+ = 1.0.273 =
943
 
944
+ * Improves the integration with the Gutenberg editor.
 
945
 
946
+ = 1.0.272 =
947
 
948
+ * Modifies the nonces to increase the plugin's security.
949
+ * Fixes some little issues with the messages list.
950
 
951
+ = 1.0.271 =
952
 
953
+ * Fixes an issue between the Promote Banner and the official distribution of WP5.0
 
954
 
955
  == Upgrade Notice ==
956
 
957
+ = 1.0.280 =
958
 
959
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://cff.dwbooster.com/contact-us
captcha/captcha.php CHANGED
@@ -11,8 +11,7 @@ if(!defined('WP_DEBUG') || true != WP_DEBUG)
11
 
12
  ob_clean();
13
 
14
- if( class_exists( 'CP_SESSION' ) ) CP_SESSION::session_start();
15
- elseif( session_id() == '' ) session_start();
16
 
17
  if (!isset($_GET["ps"])) $_GET["ps"] = '';
18
 
11
 
12
  ob_clean();
13
 
14
+ if( !class_exists( 'CP_SESSION' ) && session_id() == '' ) session_start();
 
15
 
16
  if (!isset($_GET["ps"])) $_GET["ps"] = '';
17
 
changelog.txt CHANGED
@@ -1,5 +1,89 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.263 =
4
 
5
  * Fixes another conflict with the Speed Booster Pack plugin.
1
  == Changelog ==
2
 
3
+ = 1.0.280 =
4
+
5
+ * Modifies the slider controls allowing to integrate other fields in the form with the attributes: min, max and step, and vary them dynamically at runtime.
6
+ * Modifies the predefined template 12 to display the down arrow in the DropDown fields.
7
+ * Allows to include the tags of the Section Break controls in the notification emails and thank you pages (Professional, Developer and Platinum verisons of the plugin)
8
+
9
+ = 1.0.279 =
10
+
11
+ * Fixes an issue with the tooltips defined in the radio buttons and checkbox controls.
12
+
13
+ = 1.0.278 =
14
+
15
+ * Modifies the module that generates the forms' previews, and the AMP versions of forms.
16
+ * Implements the specific integration with the Elementor pages builder.
17
+ * Improves the forms appearance in small screens.
18
+
19
+ = 1.0.277 =
20
+
21
+ * Improves the some of predefined templates.
22
+ * Optimizes the form's styles.
23
+ * Allows to includes images and html tags in the tooltips.
24
+ * Fixes an issue printing the list of messages when includes images (Professional, Developer, and Platinum versions of the plugin)
25
+
26
+ = 1.0.276 =
27
+
28
+ * Implements a new columns system to format the forms easier.
29
+
30
+ = 1.0.275 =
31
+
32
+ * Includes new operations: RADIANS to convert an angle in degrees to radians, DEGREES to convert a number in radians to degrees, ATANH to get the hyperbolic arctangent of a number.
33
+ * Includes new controls in the interface of the equations edition: SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, ATANH, RADIANS, DEGREES.
34
+
35
+ = 1.0.274 =
36
+
37
+ * Modifies the blocks dimensions.
38
+ * Fixes an issue editing the additional attributes.
39
+ * Includes the Form ID in the submissions list.
40
+
41
+ = 1.0.273 =
42
+
43
+ * Improves the integration with the Gutenberg editor.
44
+
45
+ = 1.0.272 =
46
+
47
+ * Modifies the nonces to increase the plugin's security.
48
+ * Fixes some little issues with the messages list.
49
+
50
+ = 1.0.271 =
51
+
52
+ * Fixes an issue between the Promote Banner and the official distribution of WP5.0
53
+
54
+ = 1.0.270 =
55
+
56
+ * Includes new validations to prevent conflicts with wp-cron.
57
+ * Modifies the location of fields handler in the forms builder for dragging the fields easier.
58
+ * Modifies the styles in the public forms for fixing a conflict with some themes when the fields are distributed in columns.
59
+
60
+ = 1.0.269 =
61
+
62
+ * Fixes an issue managing the sessions.
63
+
64
+ = 1.0.268 =
65
+
66
+ * Modifies the management of sessions.
67
+ * Modifies the use of nonces and captcha.
68
+
69
+ = 1.0.267 =
70
+
71
+ * Fixes an issue in the PREC operation.
72
+
73
+ = 1.0.266 =
74
+
75
+ * Modifies the PREC operation.
76
+ * Modifies the rounding operations: ROUND, FLOOR, CEIL.
77
+ * Fixes an issue calculating the seconds in the DATEDIFF operation in the DATE/TIME operations module (Developer and Platinum versions of the plugin)
78
+
79
+ = 1.0.265 =
80
+
81
+ * Fixes an issue with the thousands separator in the number fields.
82
+
83
+ = 1.0.264 =
84
+
85
+ * Packs the getField operation into new operations module to be inserted directly from the equations editor.
86
+
87
  = 1.0.263 =
88
 
89
  * Fixes another conflict with the Speed Booster Pack plugin.
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.0.263
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
@@ -17,10 +17,10 @@ if(!defined('WP_DEBUG') || true != WP_DEBUG)
17
 
18
  require_once 'inc/cpcff_session.inc.php';
19
  // Start Session
20
- if( !defined('DOING_AJAX') ) CP_SESSION::session_start();
21
 
22
  // Defining main constants
23
- define('CP_CALCULATEDFIELDSF_VERSION', '1.0.263' );
24
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
25
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
26
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
@@ -66,7 +66,7 @@ function cp_calculated_fields_form_check_posted_data() {
66
 
67
  function cp_calculatedfieldsf_save_options()
68
  {
69
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
70
  global $wpdb;
71
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
72
  define ('CP_CALCULATEDFIELDSF_ID',$_POST["cp_calculatedfieldsf_id"]);
@@ -108,5 +108,4 @@ function cp_calculatedfieldsf_save_options()
108
  global $cff_structure_error;
109
  $cff_structure_error = __('<div class="error-text">The data cannot be stored in database because has occurred an error with the form structure. Please, try to save the data again. If have been copied and pasted data from external text editors, the data can contain invalid characters. If the issue persist, please <a href="https://cff.dwbooster.com/contact-us">contact us</a></div>', 'calculated-fields-form' );
110
  }
111
- }
112
- ?>
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.0.280
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
17
 
18
  require_once 'inc/cpcff_session.inc.php';
19
  // Start Session
20
+ if( !defined('DOING_AJAX') && !defined('DOING_CRON')) CP_SESSION::session_start();
21
 
22
  // Defining main constants
23
+ define('CP_CALCULATEDFIELDSF_VERSION', '1.0.280' );
24
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
25
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
26
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
66
 
67
  function cp_calculatedfieldsf_save_options()
68
  {
69
+ check_admin_referer( 'cff-form-settings', '_cpcff_nonce' );
70
  global $wpdb;
71
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
72
  define ('CP_CALCULATEDFIELDSF_ID',$_POST["cp_calculatedfieldsf_id"]);
108
  global $cff_structure_error;
109
  $cff_structure_error = __('<div class="error-text">The data cannot be stored in database because has occurred an error with the form structure. Please, try to save the data again. If have been copied and pasted data from external text editors, the data can contain invalid characters. If the issue persist, please <a href="https://cff.dwbooster.com/contact-us">contact us</a></div>', 'calculated-fields-form' );
110
  }
111
+ }
 
css/gutenberg.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .cff-iframe-container {
2
+ position: relative;
3
+ }
4
+ .cff-iframe-overlay {
5
+ position: absolute;
6
+ top: 0; right: 0; bottom: 0; left: 0;
7
+ }
css/style.css CHANGED
@@ -18,7 +18,6 @@
18
  #tabs{height:650px;width:100%;overflow-y:auto;}
19
  #fbuilder{height:640px;overflow:auto;position:relative;}
20
  #fbuilder .fields{border:1px solid transparent;padding:3px 10px 14px 10px;margin:5px 0px;display:block;position:relative;}
21
- #fbuilder .fields .arrow{position:absolute;left:-15px;top:20px;display:none;}
22
 
23
  #fbuilder .fields .collapse,
24
  #fbuilder .fields .uncollapse,
@@ -77,7 +76,8 @@ input [readonly] {background-color: #f00;}
77
  #fbuilder .fields.ui-over{border:1px dashed #888;}
78
 
79
  #fbuilder .fform{border:1px solid transparent;padding:10px;margin:5px 0px;display:block;position:relative}
80
- #fbuilder .fform .arrow{position:absolute;left:-15px;top:20px;display:none}
 
81
  #fbuilder .fform.ui-selected{background-color:#E7FFCF;border:1px solid #C2EF95}
82
  #fbuilder .fform.ui-selected .arrow{display:inline}
83
  #fbuilder .fform.ui-over{border:1px dashed #888;}
18
  #tabs{height:650px;width:100%;overflow-y:auto;}
19
  #fbuilder{height:640px;overflow:auto;position:relative;}
20
  #fbuilder .fields{border:1px solid transparent;padding:3px 10px 14px 10px;margin:5px 0px;display:block;position:relative;}
 
21
 
22
  #fbuilder .fields .collapse,
23
  #fbuilder .fields .uncollapse,
76
  #fbuilder .fields.ui-over{border:1px dashed #888;}
77
 
78
  #fbuilder .fform{border:1px solid transparent;padding:10px;margin:5px 0px;display:block;position:relative}
79
+ #fbuilder .fields .arrow,
80
+ #fbuilder .fform .arrow{position:absolute;left:-2px;top:10px;margin-left:0; display:none;}
81
  #fbuilder .fform.ui-selected{background-color:#E7FFCF;border:1px solid #C2EF95}
82
  #fbuilder .fform.ui-selected .arrow{display:inline}
83
  #fbuilder .fform.ui-over{border:1px dashed #888;}
css/stylepublic.css CHANGED
@@ -1,10 +1,18 @@
1
  .clearer{clear:both;}
2
 
3
- #fbuilder{}
4
- #fbuilder .fields,#fbuilder .fform{padding:5px 0px;}
 
5
  #fbuilder .fform h1,
6
  #fbuilder .fform h2{margin:5px 0px;padding:0px;}
7
 
 
 
 
 
 
 
 
8
  #fbuilder input[type="text"],
9
  #fbuilder input[type="date"],
10
  #fbuilder input[type="datetime"],
@@ -21,16 +29,282 @@
21
  #fbuilder .medium{width:50% !important;}
22
  #fbuilder .large{width:100% !important;}
23
 
 
24
  @media screen and (min-width: 740px),print{
25
- #fbuilder .fields.column2{float:left;width:49.9%;}
26
- #fbuilder .fields.column3{float:left;width:33.3%;}
27
- #fbuilder .fields.column4{float:left;width:24.9%;}
 
28
 
29
- *[dir="rtl"] #fbuilder .fields.column2{float:right;}
30
- *[dir="rtl"] #fbuilder .fields.column3{float:right;}
31
- *[dir="rtl"] #fbuilder .fields.column4{float:right;}
 
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  @media screen and (max-width: 640px){
35
  #fbuilder .small,
36
  #fbuilder .medium{width:100% !important;}
@@ -49,16 +323,19 @@
49
  #fbuilder .dfield{position:relative;}
50
  #fbuilder .top_aligned .fields label{}
51
  #fbuilder .top_aligned .fields .dfield{}
52
- #fbuilder .left_aligned .fields label{float:left;width:31%;}
53
- #fbuilder .left_aligned .fields .dfield{float:left;width:65%;}
54
- #fbuilder .right_aligned .fields label{float:left;width:31%;text-align:right;padding:3px 3px 0px 0px;}
55
- #fbuilder .right_aligned .fields .dfield{float:left;width:65%;}
 
 
 
56
  #fbuilder .right_aligned .fields .dfield label{text-align:left;}
57
 
58
- *[dir="rtl"] #fbuilder .left_aligned .fields label{float:right;}
59
- *[dir="rtl"] #fbuilder .left_aligned .fields .dfield{float:right;}
60
- *[dir="rtl"] #fbuilder .right_aligned .fields label{float:right;text-align:left;}
61
- *[dir="rtl"] #fbuilder .right_aligned .fields .dfield{float:right;}
62
  *[dir="rtl"] #fbuilder .right_aligned .fields .dfield label{text-align:right;}
63
 
64
  #fbuilder .one_column label,
@@ -114,6 +391,7 @@
114
 
115
  #fbuilder input[type='radio'],#fbuilder input[type='checkbox']{width:auto;}
116
  .ui-tooltip.uh-tooltip{width:250px;font-size:10px;font-weight:normal;padding:5px;z-index:9999 !important;}
 
117
  #fbuilder input[type="checkbox"]{-webkit-appearance:checkbox!important;}
118
  #fbuilder input[type="radio"]{-webkit-appearance:radio!important;}
119
 
@@ -145,7 +423,5 @@
145
 
146
  #fbuilder .cff-close-dlg{display:inline-block;width:16px;height:16px;position:absolute;top:10px;right:10px;cursor:pointer;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAowAAAKMB8MeazgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB5SURBVDiNrZPRCcAwCEQfnUiySAZuF8kSWeH6Yz8KrQZMQAicJ+epAB0YwAmYJKIADLic0/GPPCbQAnLznCd/4NWUFfkgy1VjH8CryA95ApYltAiTRCZxpuoW+gz9WXE6NPeg+ra1UDIxGlWEObe4SGxY5fIxlc75Bkt9V4JS7KWJAAAAAElFTkSuQmCC59ef34356faa7edebc7ed5432ddb673d');
147
  }
148
-
149
  #fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
150
-
151
  #fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;}
1
  .clearer{clear:both;}
2
 
3
+ #fbuilder,
4
+ #fbuilder *{-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
5
+ #fbuilder .fields,#fbuilder .fform{padding:5px 0px;clear:both;}
6
  #fbuilder .fform h1,
7
  #fbuilder .fform h2{margin:5px 0px;padding:0px;}
8
 
9
+ #fbuilder h1,
10
+ #fbuilder h2,
11
+ #fbuilder h3,
12
+ #fbuilder h4,
13
+ #fbuilder h5,
14
+ #fbuilder label{white-space:normal;}
15
+
16
  #fbuilder input[type="text"],
17
  #fbuilder input[type="date"],
18
  #fbuilder input[type="datetime"],
29
  #fbuilder .medium{width:50% !important;}
30
  #fbuilder .large{width:100% !important;}
31
 
32
+ /* ORIGNAL COLUMNS SYSTEM */
33
  @media screen and (min-width: 740px),print{
34
+ #fbuilder .fields.column2{float:left;width:49.9%;clear:none;}
35
+ #fbuilder .fields.column3{float:left;width:33.3%;clear:none;}
36
+ #fbuilder .fields.column4{float:left;width:24.9%;clear:none;}
37
+ #fbuilder .fields.column5{float:left;width:19.9%;clear:none;}
38
 
39
+ *[dir="rtl"] #fbuilder .fields.column2,
40
+ *[dir="rtl"] #fbuilder .fields.column3,
41
+ *[dir="rtl"] #fbuilder .fields.column4,
42
+ *[dir="rtl"] #fbuilder .fields.column5{float:right;}
43
  }
44
 
45
+ /* NEW COLUMNS SYSTEM */
46
+
47
+ #fbuilder .col-xs-1,
48
+ #fbuilder .col-xs-2,
49
+ #fbuilder .col-xs-3,
50
+ #fbuilder .col-xs-4,
51
+ #fbuilder .col-xs-5,
52
+ #fbuilder .col-xs-6,
53
+ #fbuilder .col-xs-7,
54
+ #fbuilder .col-xs-8,
55
+ #fbuilder .col-xs-9,
56
+ #fbuilder .col-xs-10,
57
+ #fbuilder .col-xs-11{float:left; clear: none; }
58
+ #fbuilder .col-xs-12{float:none; clear: both; }
59
+
60
+ #fbuilder .col-xs-1 {width: 8.33333333%;}
61
+ #fbuilder .col-xs-2 {width: 16.66666667%;}
62
+ #fbuilder .col-xs-3 {width: 25%;}
63
+ #fbuilder .col-xs-4 {width: 33.33333333%;}
64
+ #fbuilder .col-xs-5 {width: 41.66666667%; }
65
+ #fbuilder .col-xs-6 {width: 50%;}
66
+ #fbuilder .col-xs-7 {width: 58.33333333%;}
67
+ #fbuilder .col-xs-8 {width: 66.66666667%;}
68
+ #fbuilder .col-xs-9 {width: 75%;}
69
+ #fbuilder .col-xs-10 {width: 83.33333333%;}
70
+ #fbuilder .col-xs-11 {width: 91.66666667%;}
71
+
72
+ #fbuilder .col-xs-offset-1 {margin-left: 8.33333333%;}
73
+ #fbuilder .col-xs-offset-2 {margin-left: 16.66666667%;}
74
+ #fbuilder .col-xs-offset-3 {margin-left: 25%;}
75
+ #fbuilder .col-xs-offset-4 {margin-left: 33.33333333%;}
76
+ #fbuilder .col-xs-offset-5 {margin-left: 41.66666667%;}
77
+ #fbuilder .col-xs-offset-6 {margin-left: 50%;}
78
+ #fbuilder .col-xs-offset-7 {margin-left: 58.33333333%;}
79
+ #fbuilder .col-xs-offset-8 {margin-left: 66.66666667%;}
80
+ #fbuilder .col-xs-offset-9 {margin-left: 75%;}
81
+ #fbuilder .col-xs-offset-10 {margin-left: 83.33333333%;}
82
+ #fbuilder .col-xs-offset-11 {margin-left: 91.66666667%;}
83
+
84
+ *[dir="rtl"] #fbuiler .col-xs-1,
85
+ *[dir="rtl"] #fbuiler .col-xs-2,
86
+ *[dir="rtl"] #fbuiler .col-xs-3,
87
+ *[dir="rtl"] #fbuiler .col-xs-4,
88
+ *[dir="rtl"] #fbuiler .col-xs-5,
89
+ *[dir="rtl"] #fbuiler .col-xs-6,
90
+ *[dir="rtl"] #fbuiler .col-xs-7,
91
+ *[dir="rtl"] #fbuiler .col-xs-8,
92
+ *[dir="rtl"] #fbuiler .col-xs-9,
93
+ *[dir="rtl"] #fbuiler .col-xs-10,
94
+ *[dir="rtl"] #fbuiler .col-xs-11{float:right;}
95
+
96
+ *[dir="rtl"] #fbuilder .col-xs-offset-1 {margin-right: 8.33333333%;}
97
+ *[dir="rtl"] #fbuilder .col-xs-offset-2 {margin-right: 16.66666667%;}
98
+ *[dir="rtl"] #fbuilder .col-xs-offset-3 {margin-right: 25%;}
99
+ *[dir="rtl"] #fbuilder .col-xs-offset-4 {margin-right: 33.33333333%;}
100
+ *[dir="rtl"] #fbuilder .col-xs-offset-5 {margin-right: 41.66666667%;}
101
+ *[dir="rtl"] #fbuilder .col-xs-offset-6 {margin-right: 50%;}
102
+ *[dir="rtl"] #fbuilder .col-xs-offset-7 {margin-right: 58.33333333%;}
103
+ *[dir="rtl"] #fbuilder .col-xs-offset-8 {margin-right: 66.66666667%;}
104
+ *[dir="rtl"] #fbuilder .col-xs-offset-9 {margin-right: 75%;}
105
+ *[dir="rtl"] #fbuilder .col-xs-offset-10 {margin-right: 83.33333333%;}
106
+ *[dir="rtl"] #fbuilder .col-xs-offset-11 {margin-right: 91.66666667%;}
107
+
108
+ @media only screen and (min-width: 48em) {
109
+ #fbuilder .col-sm-1,
110
+ #fbuilder .col-sm-2,
111
+ #fbuilder .col-sm-3,
112
+ #fbuilder .col-sm-4,
113
+ #fbuilder .col-sm-5,
114
+ #fbuilder .col-sm-6,
115
+ #fbuilder .col-sm-7,
116
+ #fbuilder .col-sm-8,
117
+ #fbuilder .col-sm-9,
118
+ #fbuilder .col-sm-10,
119
+ #fbuilder .col-sm-11{float:left;clear:none;margin-left:0;margin-right:0;}
120
+ #fbuilder .col-sm-12{float:none;clear:bothmargin-left:0;margin-right:0;;}
121
+
122
+ #fbuilder .col-sm-1 {width: 8.33333333%;}
123
+ #fbuilder .col-sm-2 {width: 16.66666667%;}
124
+ #fbuilder .col-sm-3 {width: 25%;}
125
+ #fbuilder .col-sm-4 {width: 33.33333333%;}
126
+ #fbuilder .col-sm-5 {width: 41.66666667%;}
127
+ #fbuilder .col-sm-6 {width: 50%;}
128
+ #fbuilder .col-sm-7 {width: 58.33333333%;}
129
+ #fbuilder .col-sm-8 {width: 66.66666667%;}
130
+ #fbuilder .col-sm-9 {width: 75%;}
131
+ #fbuilder .col-sm-10 {width: 83.33333333%;}
132
+ #fbuilder .col-sm-11 {width: 91.66666667%;}
133
+ #fbuilder .col-sm-12 {width: 100%;}
134
+
135
+ #fbuilder .col-sm-offset-0 {margin-left: 0;}
136
+ #fbuilder .col-sm-offset-1 {margin-left: 8.33333333%;}
137
+ #fbuilder .col-sm-offset-2 {margin-left: 16.66666667%;}
138
+ #fbuilder .col-sm-offset-3 {margin-left: 25%;}
139
+ #fbuilder .col-sm-offset-4 {margin-left: 33.33333333%;}
140
+ #fbuilder .col-sm-offset-5 {margin-left: 41.66666667%;}
141
+ #fbuilder .col-sm-offset-6 {margin-left: 50%;}
142
+ #fbuilder .col-sm-offset-7 {margin-left: 58.33333333%;}
143
+ #fbuilder .col-sm-offset-8 {margin-left: 66.66666667%;}
144
+ #fbuilder .col-sm-offset-9 {margin-left: 75%;}
145
+ #fbuilder .col-sm-offset-10 {margin-left: 83.33333333%;}
146
+ #fbuilder .col-sm-offset-11 {margin-left: 91.66666667%;}
147
+
148
+ *[dir="rtl"] #fbuilder .col-sm-1,
149
+ *[dir="rtl"] #fbuilder .col-sm-2,
150
+ *[dir="rtl"] #fbuilder .col-sm-3,
151
+ *[dir="rtl"] #fbuilder .col-sm-4,
152
+ *[dir="rtl"] #fbuilder .col-sm-5,
153
+ *[dir="rtl"] #fbuilder .col-sm-6,
154
+ *[dir="rtl"] #fbuilder .col-sm-7,
155
+ *[dir="rtl"] #fbuilder .col-sm-8,
156
+ *[dir="rtl"] #fbuilder .col-sm-9,
157
+ *[dir="rtl"] #fbuilder .col-sm-10,
158
+ *[dir="rtl"] #fbuilder .col-sm-11{float:right;}
159
+
160
+ *[dir="rtl"] #fbuilder .col-sm-offset-0 {margin-right: 0;}
161
+ *[dir="rtl"] #fbuilder .col-sm-offset-1 {margin-right: 8.33333333%;}
162
+ *[dir="rtl"] #fbuilder .col-sm-offset-2 {margin-right: 16.66666667%;}
163
+ *[dir="rtl"] #fbuilder .col-sm-offset-3 {margin-right: 25%;}
164
+ *[dir="rtl"] #fbuilder .col-sm-offset-4 {margin-right: 33.33333333%;}
165
+ *[dir="rtl"] #fbuilder .col-sm-offset-5 {margin-right: 41.66666667%;}
166
+ *[dir="rtl"] #fbuilder .col-sm-offset-6 {margin-right: 50%;}
167
+ *[dir="rtl"] #fbuilder .col-sm-offset-7 {margin-right: 58.33333333%;}
168
+ *[dir="rtl"] #fbuilder .col-sm-offset-8 {margin-right: 66.66666667%;}
169
+ *[dir="rtl"] #fbuilder .col-sm-offset-9 {margin-right: 75%;}
170
+ *[dir="rtl"] #fbuilder .col-sm-offset-10 {margin-right: 83.33333333%;}
171
+ *[dir="rtl"] #fbuilder .col-sm-offset-11 {margin-right: 91.66666667%;}
172
+ }
173
+
174
+ @media only screen and (min-width: 64em) {
175
+ #fbuilder .col-md-1,
176
+ #fbuilder .col-md-2,
177
+ #fbuilder .col-md-3,
178
+ #fbuilder .col-md-4,
179
+ #fbuilder .col-md-5,
180
+ #fbuilder .col-md-6,
181
+ #fbuilder .col-md-7,
182
+ #fbuilder .col-md-8,
183
+ #fbuilder .col-md-9,
184
+ #fbuilder .col-md-10,
185
+ #fbuilder .col-md-11{float:left;clear:none;margin-left:0;margin-right:0;}
186
+ #fbuilder .col-md-12{float:none;clear:both;margin-left:0;margin-right:0;}
187
+
188
+ #fbuilder .col-md-1 {width: 8.33333333%;}
189
+ #fbuilder .col-md-2 {width: 16.66666667%;}
190
+ #fbuilder .col-md-3 {width: 25%;}
191
+ #fbuilder .col-md-4 {width: 33.33333333%;}
192
+ #fbuilder .col-md-5 {width: 41.66666667%;}
193
+ #fbuilder .col-md-6 {width: 50%;}
194
+ #fbuilder .col-md-7 {width: 58.33333333%;}
195
+ #fbuilder .col-md-8 {width: 66.66666667%;}
196
+ #fbuilder .col-md-9 {width: 75%;}
197
+ #fbuilder .col-md-10 {width: 83.33333333%;}
198
+ #fbuilder .col-md-11 {width: 91.66666667%;}
199
+ #fbuilder .col-md-12 {width: 100%;}
200
+
201
+ #fbuilder .col-md-offset-0 {margin-left: 0;}
202
+ #fbuilder .col-md-offset-1 {margin-left: 8.33333333%;}
203
+ #fbuilder .col-md-offset-2 {margin-left: 16.66666667%;}
204
+ #fbuilder .col-md-offset-3 {margin-left: 25%;}
205
+ #fbuilder .col-md-offset-4 {margin-left: 33.33333333%;}
206
+ #fbuilder .col-md-offset-5 {margin-left: 41.66666667%;}
207
+ #fbuilder .col-md-offset-6 {margin-left: 50%;}
208
+ #fbuilder .col-md-offset-7 {margin-left: 58.33333333%;}
209
+ #fbuilder .col-md-offset-8 {margin-left: 66.66666667%;}
210
+ #fbuilder .col-md-offset-9 {margin-left: 75%;}
211
+ #fbuilder .col-md-offset-10 {margin-left: 83.33333333%;}
212
+ #fbuilder .col-md-offset-11 {margin-left: 91.66666667%;}
213
+
214
+ *[dir="rtl"] #fbuilder .col-md-1,
215
+ *[dir="rtl"] #fbuilder .col-md-2,
216
+ *[dir="rtl"] #fbuilder .col-md-3,
217
+ *[dir="rtl"] #fbuilder .col-md-4,
218
+ *[dir="rtl"] #fbuilder .col-md-5,
219
+ *[dir="rtl"] #fbuilder .col-md-6,
220
+ *[dir="rtl"] #fbuilder .col-md-7,
221
+ *[dir="rtl"] #fbuilder .col-md-8,
222
+ *[dir="rtl"] #fbuilder .col-md-9,
223
+ *[dir="rtl"] #fbuilder .col-md-10,
224
+ *[dir="rtl"] #fbuilder .col-md-11{float:right;}
225
+
226
+ *[dir="rtl"] #fbuilder .col-md-offset-0 {margin-right: 0;}
227
+ *[dir="rtl"] #fbuilder .col-md-offset-1 {margin-right: 8.33333333%;}
228
+ *[dir="rtl"] #fbuilder .col-md-offset-2 {margin-right: 16.66666667%;}
229
+ *[dir="rtl"] #fbuilder .col-md-offset-3 {margin-right: 25%;}
230
+ *[dir="rtl"] #fbuilder .col-md-offset-4 {margin-right: 33.33333333%;}
231
+ *[dir="rtl"] #fbuilder .col-md-offset-5 {margin-right: 41.66666667%;}
232
+ *[dir="rtl"] #fbuilder .col-md-offset-6 {margin-right: 50%;}
233
+ *[dir="rtl"] #fbuilder .col-md-offset-7 {margin-right: 58.33333333%;}
234
+ *[dir="rtl"] #fbuilder .col-md-offset-8 {margin-right: 66.66666667%;}
235
+ *[dir="rtl"] #fbuilder .col-md-offset-9 {margin-right: 75%;}
236
+ *[dir="rtl"] #fbuilder .col-md-offset-10 {margin-right: 83.33333333%;}
237
+ *[dir="rtl"] #fbuilder .col-md-offset-11 {margin-right: 91.66666667%;}
238
+ }
239
+
240
+ @media only screen and (min-width: 75em) {
241
+ #fbuilder .col-lg-1,
242
+ #fbuilder .col-lg-2,
243
+ #fbuilder .col-lg-3,
244
+ #fbuilder .col-lg-4,
245
+ #fbuilder .col-lg-5,
246
+ #fbuilder .col-lg-6,
247
+ #fbuilder .col-lg-7,
248
+ #fbuilder .col-lg-8,
249
+ #fbuilder .col-lg-9,
250
+ #fbuilder .col-lg-10,
251
+ #fbuilder .col-lg-11{float:left;clear:none;margin-left:0;margin-right:0;}
252
+ #fbuilder .col-lg-12{float:none;clear:both;margin-left:0;margin-right:0;}
253
+
254
+ #fbuilder .col-lg-1 {width: 8.33333333%;}
255
+ #fbuilder .col-lg-2 {width: 16.66666667%;}
256
+ #fbuilder .col-lg-3 {width: 25%;}
257
+ #fbuilder .col-lg-4 {width: 33.33333333%;}
258
+ #fbuilder .col-lg-5 {width: 41.66666667%;}
259
+ #fbuilder .col-lg-6 {width: 50%;}
260
+ #fbuilder .col-lg-7 {width: 58.33333333%;}
261
+ #fbuilder .col-lg-8 {width: 66.66666667%;}
262
+ #fbuilder .col-lg-9 {width: 75%;}
263
+ #fbuilder .col-lg-10 {width: 83.33333333%;}
264
+ #fbuilder .col-lg-11 {width: 91.66666667%;}
265
+ #fbuilder .col-lg-12 {width: 100%;}
266
+
267
+ #fbuilder .col-lg-offset-0 {margin-left: 0;}
268
+ #fbuilder .col-lg-offset-1 {margin-left: 8.33333333%;}
269
+ #fbuilder .col-lg-offset-2 {margin-left: 16.66666667%;}
270
+ #fbuilder .col-lg-offset-3 {margin-left: 25%;}
271
+ #fbuilder .col-lg-offset-4 {margin-left: 33.33333333%;}
272
+ #fbuilder .col-lg-offset-5 {margin-left: 41.66666667%;}
273
+ #fbuilder .col-lg-offset-6 {margin-left: 50%;}
274
+ #fbuilder .col-lg-offset-7 {margin-left: 58.33333333%;}
275
+ #fbuilder .col-lg-offset-8 {margin-left: 66.66666667%;}
276
+ #fbuilder .col-lg-offset-9 {margin-left: 75%;}
277
+ #fbuilder .col-lg-offset-10 {margin-left: 83.33333333%;}
278
+ #fbuilder .col-lg-offset-11 {margin-left: 91.66666667%;}
279
+
280
+ *[dir="rtl"] #fbuilder .col-lg-1,
281
+ *[dir="rtl"] #fbuilder .col-lg-2,
282
+ *[dir="rtl"] #fbuilder .col-lg-3,
283
+ *[dir="rtl"] #fbuilder .col-lg-4,
284
+ *[dir="rtl"] #fbuilder .col-lg-5,
285
+ *[dir="rtl"] #fbuilder .col-lg-6,
286
+ *[dir="rtl"] #fbuilder .col-lg-7,
287
+ *[dir="rtl"] #fbuilder .col-lg-8,
288
+ *[dir="rtl"] #fbuilder .col-lg-9,
289
+ *[dir="rtl"] #fbuilder .col-lg-10,
290
+ *[dir="rtl"] #fbuilder .col-lg-11{float:right;}
291
+ *[dir="rtl"]
292
+ *[dir="rtl"] #fbuilder .col-lg-offset-0 {margin-right: 0;}
293
+ *[dir="rtl"] #fbuilder .col-lg-offset-1 {margin-right: 8.33333333%;}
294
+ *[dir="rtl"] #fbuilder .col-lg-offset-2 {margin-right: 16.66666667%;}
295
+ *[dir="rtl"] #fbuilder .col-lg-offset-3 {margin-right: 25%;}
296
+ *[dir="rtl"] #fbuilder .col-lg-offset-4 {margin-right: 33.33333333%;}
297
+ *[dir="rtl"] #fbuilder .col-lg-offset-5 {margin-right: 41.66666667%;}
298
+ *[dir="rtl"] #fbuilder .col-lg-offset-6 {margin-right: 50%;}
299
+ *[dir="rtl"] #fbuilder .col-lg-offset-7 {margin-right: 58.33333333%;}
300
+ *[dir="rtl"] #fbuilder .col-lg-offset-8 {margin-right: 66.66666667%;}
301
+ *[dir="rtl"] #fbuilder .col-lg-offset-9 {margin-right: 75%;}
302
+ *[dir="rtl"] #fbuilder .col-lg-offset-10 {margin-right: 83.33333333%;}
303
+ *[dir="rtl"] #fbuilder .col-lg-offset-11 {margin-right: 91.66666667%;}
304
+ }
305
+
306
+ /* END NEW COLUMNS SYSTEM */
307
+
308
  @media screen and (max-width: 640px){
309
  #fbuilder .small,
310
  #fbuilder .medium{width:100% !important;}
323
  #fbuilder .dfield{position:relative;}
324
  #fbuilder .top_aligned .fields label{}
325
  #fbuilder .top_aligned .fields .dfield{}
326
+
327
+ @media print, screen and (min-width: 24em) {
328
+ #fbuilder .left_aligned .fields label:not(:empty){float:left;width:35%;}
329
+ #fbuilder .left_aligned .fields label:not(:empty) + .dfield{float:left;width:65%;}
330
+ #fbuilder .right_aligned .fields label:not(:empty){float:left;width:35%;text-align:right;padding:3px 3px 0px 0px;}
331
+ #fbuilder .right_aligned .fields label:not(:empty) + .dfield{float:left;width:65%;}
332
+ }
333
  #fbuilder .right_aligned .fields .dfield label{text-align:left;}
334
 
335
+ *[dir="rtl"] #fbuilder .left_aligned .fields label:not(:empty){float:right;}
336
+ *[dir="rtl"] #fbuilder .left_aligned .fields label:not(:empty) + .dfield{float:right;}
337
+ *[dir="rtl"] #fbuilder .right_aligned .fields label:not(:empty){float:right;text-align:left;}
338
+ *[dir="rtl"] #fbuilder .right_aligned .fields label:not(:empty) + .dfield{float:right;}
339
  *[dir="rtl"] #fbuilder .right_aligned .fields .dfield label{text-align:right;}
340
 
341
  #fbuilder .one_column label,
391
 
392
  #fbuilder input[type='radio'],#fbuilder input[type='checkbox']{width:auto;}
393
  .ui-tooltip.uh-tooltip{width:250px;font-size:10px;font-weight:normal;padding:5px;z-index:9999 !important;}
394
+ .ui-tooltip img{max-width:100%;}
395
  #fbuilder input[type="checkbox"]{-webkit-appearance:checkbox!important;}
396
  #fbuilder input[type="radio"]{-webkit-appearance:radio!important;}
397
 
423
 
424
  #fbuilder .cff-close-dlg{display:inline-block;width:16px;height:16px;position:absolute;top:10px;right:10px;cursor:pointer;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAowAAAKMB8MeazgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB5SURBVDiNrZPRCcAwCEQfnUiySAZuF8kSWeH6Yz8KrQZMQAicJ+epAB0YwAmYJKIADLic0/GPPCbQAnLznCd/4NWUFfkgy1VjH8CryA95ApYltAiTRCZxpuoW+gz9WXE6NPeg+ra1UDIxGlWEObe4SGxY5fIxlc75Bkt9V4JS7KWJAAAAAElFTkSuQmCC59ef34356faa7edebc7ed5432ddb673d');
425
  }
 
426
  #fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
 
427
  #fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;}
inc/cpcff_admin_int.inc.php CHANGED
@@ -9,7 +9,7 @@ if ( !is_admin() )
9
  // Required scripts
10
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_templates.inc.php';
11
 
12
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
13
  wp_enqueue_media();
14
 
15
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
@@ -49,7 +49,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
49
  <br /><br />
50
 
51
  <form method="post" action="" name="cpformconf" class="cff_form_builder">
52
- <input type="hidden" name="_cpcff_nonce" value="<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>" />
53
  <input name="cp_calculatedfieldsf_post_options" type="hidden" value="1" />
54
  <input name="cp_calculatedfieldsf_id" type="hidden" value="<?php echo CP_CALCULATEDFIELDSF_ID; ?>" />
55
 
@@ -113,7 +113,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
113
  result = window.confirm('<?php print esc_js(__('The action will load the revision selected, the data are not stored will be lose. Do you want continue?', 'calculated-fields-form'));?>');
114
  if(result)
115
  {
116
- $calculatedfieldsfQuery('<form method="post" action="" name="cpformconf" class="cff_form_builder"><input type="hidden" name="_cpcff_nonce" value="<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>" /><input name="cp_calculatedfieldsf_id" type="hidden" value="<?php echo CP_CALCULATEDFIELDSF_ID; ?>" /><input type="hidden" name="cpcff_revision_to_apply" value="'+revision+'"></form>').appendTo('body').submit();
117
  }
118
  }
119
  }
9
  // Required scripts
10
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_templates.inc.php';
11
 
12
+ check_admin_referer( 'cff-form-settings', '_cpcff_nonce' );
13
  wp_enqueue_media();
14
 
15
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
49
  <br /><br />
50
 
51
  <form method="post" action="" name="cpformconf" class="cff_form_builder">
52
+ <input type="hidden" name="_cpcff_nonce" value="<?php echo wp_create_nonce( 'cff-form-settings' ); ?>" />
53
  <input name="cp_calculatedfieldsf_post_options" type="hidden" value="1" />
54
  <input name="cp_calculatedfieldsf_id" type="hidden" value="<?php echo CP_CALCULATEDFIELDSF_ID; ?>" />
55
 
113
  result = window.confirm('<?php print esc_js(__('The action will load the revision selected, the data are not stored will be lose. Do you want continue?', 'calculated-fields-form'));?>');
114
  if(result)
115
  {
116
+ $calculatedfieldsfQuery('<form method="post" action="" name="cpformconf" class="cff_form_builder"><input type="hidden" name="_cpcff_nonce" value="<?php echo wp_create_nonce( 'cff-form-settings' ); ?>" /><input name="cp_calculatedfieldsf_id" type="hidden" value="<?php echo CP_CALCULATEDFIELDSF_ID; ?>" /><input type="hidden" name="cpcff_revision_to_apply" value="'+revision+'"></form>').appendTo('body').submit();
117
  }
118
  }
119
  }
inc/cpcff_admin_int_list.inc.php CHANGED
@@ -16,29 +16,29 @@ $message = "";
16
 
17
  if (isset($_GET['a']) && $_GET['a'] == '1')
18
  {
19
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
20
  $cpcff_main->create_form((isset($_GET["name"])) ? stripcslashes($_GET["name"]) : '');
21
  $message = __( "Item added", 'calculated-fields-form' );
22
  }
23
  else if (isset($_GET['u']) && $_GET['u'] != '')
24
  {
25
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
26
  $cpcff_main->get_form($_GET['u'])->update_name((isset($_GET["name"])) ? stripcslashes($_GET["name"]) : '');
27
  $message = __( "Item updated", 'calculated-fields-form' );
28
  }
29
  else if (isset($_GET['d']) && $_GET['d'] != '')
30
  {
31
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
32
  $cpcff_main->delete_form($_GET['d']);
33
  $message = __( "Item deleted", 'calculated-fields-form' );
34
  } else if (isset($_GET['c']) && $_GET['c'] != '')
35
  {
36
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
37
  if($cpcff_main->clone_form(@intval($_GET['c'])) !== false) $message = __( "Item duplicated/cloned", 'calculated-fields-form' );
38
  else $message = __( "Duplicate/Clone Error, the form cannot be cloned", 'calculated-fields-form' );
39
  } else if (isset($_GET['ac']) && $_GET['ac'] == 'st')
40
  {
41
- check_admin_referer( 'session_id_'.CP_SESSION::session_id(), '_cpcff_nonce' );
42
  update_option( 'CP_CFF_LOAD_SCRIPTS', (isset($_GET["scr"]) && $_GET["scr"]=="1"? "0":"1") );
43
  update_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', (isset($_GET["jsc"]) && $_GET["jsc"]=="1" ? 1 : 0) );
44
  update_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', (isset($_GET["ecr"]) && $_GET["ecr"]=="1" ? 1 : 0) );
@@ -95,7 +95,7 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
95
  function cp_addItem()
96
  {
97
  var calname = document.getElementById("cp_itemname").value;
98
- document.location = 'admin.php?page=cp_calculated_fields_form&a=1&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
99
  }
100
 
101
  function cp_addItem_keyup( e )
@@ -103,24 +103,24 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
103
  e.which = e.which || e.keyCode;
104
  if(e.which == 13) {
105
  var calname = document.getElementById("cp_itemname").value;
106
- document.location = 'admin.php?page=cp_calculated_fields_form&a=1&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
107
  }
108
  }
109
 
110
  function cp_updateItem(id)
111
  {
112
  var calname = document.getElementById("calname_"+id).value;
113
- document.location = 'admin.php?page=cp_calculated_fields_form&u='+id+'&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
114
  }
115
 
116
  function cp_cloneItem(id)
117
  {
118
- document.location = 'admin.php?page=cp_calculated_fields_form&c='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
119
  }
120
 
121
  function cp_manageSettings(id)
122
  {
123
- document.location = 'admin.php?page=cp_calculated_fields_form&cal='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
124
  }
125
 
126
  function cp_viewMessages(id)
@@ -137,7 +137,7 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
137
  {
138
  if (confirm('<?php _e( 'Are you sure that you want to delete this item?', 'calculated-fields-form' ); ?>'))
139
  {
140
- document.location = 'admin.php?page=cp_calculated_fields_form&d='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
141
  }
142
  }
143
 
@@ -150,7 +150,7 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
150
  jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
151
  ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
152
 
153
- document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&jsc='+jsc+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'session_id_'.CP_SESSION::session_id() ); ?>';
154
  }
155
  }
156
  </script>
16
 
17
  if (isset($_GET['a']) && $_GET['a'] == '1')
18
  {
19
+ check_admin_referer( 'cff-add-form', '_cpcff_nonce' );
20
  $cpcff_main->create_form((isset($_GET["name"])) ? stripcslashes($_GET["name"]) : '');
21
  $message = __( "Item added", 'calculated-fields-form' );
22
  }
23
  else if (isset($_GET['u']) && $_GET['u'] != '')
24
  {
25
+ check_admin_referer( 'cff-update-form', '_cpcff_nonce' );
26
  $cpcff_main->get_form($_GET['u'])->update_name((isset($_GET["name"])) ? stripcslashes($_GET["name"]) : '');
27
  $message = __( "Item updated", 'calculated-fields-form' );
28
  }
29
  else if (isset($_GET['d']) && $_GET['d'] != '')
30
  {
31
+ check_admin_referer( 'cff-delete-form', '_cpcff_nonce' );
32
  $cpcff_main->delete_form($_GET['d']);
33
  $message = __( "Item deleted", 'calculated-fields-form' );
34
  } else if (isset($_GET['c']) && $_GET['c'] != '')
35
  {
36
+ check_admin_referer( 'cff-clone-form', '_cpcff_nonce' );
37
  if($cpcff_main->clone_form(@intval($_GET['c'])) !== false) $message = __( "Item duplicated/cloned", 'calculated-fields-form' );
38
  else $message = __( "Duplicate/Clone Error, the form cannot be cloned", 'calculated-fields-form' );
39
  } else if (isset($_GET['ac']) && $_GET['ac'] == 'st')
40
  {
41
+ check_admin_referer( 'cff-update-general-settings', '_cpcff_nonce' );
42
  update_option( 'CP_CFF_LOAD_SCRIPTS', (isset($_GET["scr"]) && $_GET["scr"]=="1"? "0":"1") );
43
  update_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', (isset($_GET["jsc"]) && $_GET["jsc"]=="1" ? 1 : 0) );
44
  update_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', (isset($_GET["ecr"]) && $_GET["ecr"]=="1" ? 1 : 0) );
95
  function cp_addItem()
96
  {
97
  var calname = document.getElementById("cp_itemname").value;
98
+ document.location = 'admin.php?page=cp_calculated_fields_form&a=1&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-add-form' ); ?>';
99
  }
100
 
101
  function cp_addItem_keyup( e )
103
  e.which = e.which || e.keyCode;
104
  if(e.which == 13) {
105
  var calname = document.getElementById("cp_itemname").value;
106
+ document.location = 'admin.php?page=cp_calculated_fields_form&a=1&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-add-form' ); ?>';
107
  }
108
  }
109
 
110
  function cp_updateItem(id)
111
  {
112
  var calname = document.getElementById("calname_"+id).value;
113
+ document.location = 'admin.php?page=cp_calculated_fields_form&u='+id+'&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-update-form' ); ?>';
114
  }
115
 
116
  function cp_cloneItem(id)
117
  {
118
+ document.location = 'admin.php?page=cp_calculated_fields_form&c='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-clone-form' ); ?>';
119
  }
120
 
121
  function cp_manageSettings(id)
122
  {
123
+ document.location = 'admin.php?page=cp_calculated_fields_form&cal='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-form-settings' ); ?>';
124
  }
125
 
126
  function cp_viewMessages(id)
137
  {
138
  if (confirm('<?php _e( 'Are you sure that you want to delete this item?', 'calculated-fields-form' ); ?>'))
139
  {
140
+ document.location = 'admin.php?page=cp_calculated_fields_form&d='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-delete-form' ); ?>';
141
  }
142
  }
143
 
150
  jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
151
  ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
152
 
153
+ document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&jsc='+jsc+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-update-general-settings' ); ?>';
154
  }
155
  }
156
  </script>
inc/cpcff_amp.inc.php CHANGED
@@ -62,12 +62,17 @@ if(!class_exists('CPCFF_AMP'))
62
  '<head>'.
63
  '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.
64
  '<meta name="viewport" content="width=device-width">'.
65
- '<title>'.esc_html($page_title).'</title>'.
66
- '<style>'.
67
- 'body{background:#FFF;overflow:hidden;margin:0;}'.
68
- 'html, body {height:100%;position:relative;min-height:100%;display:block;}'.
69
- '#fbuilder{overflow-x:hidden;overflow-y:auto;height:'.$this->_get_height().'px;padding:5px 32px 5px 5px;box-sizing:border-box!important;}'.
70
- '</style>';
 
 
 
 
 
71
 
72
  // The AMP page has not been redirected
73
  // and redirects it with javascript
@@ -83,26 +88,31 @@ if(!class_exists('CPCFF_AMP'))
83
  }
84
  else
85
  {
 
 
86
  $message = $this->_main_obj->public_form($atts);
87
- $message = preg_replace('/<form\s+/i', '<form target="_parent" ', $message, 1);
88
- ob_start();
89
-
90
- if(
91
- function_exists('wp_print_styles') &&
92
- function_exists('wp_print_scripts')
93
- )
94
- {
95
- wp_print_styles();
96
- wp_print_scripts();
97
- do_action('cpcff_footer');
98
- }
99
- else
100
  {
101
- wp_footer();
102
  }
103
-
 
 
 
104
  $message .= ob_get_contents();
105
  ob_end_clean();
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
 
108
  print '</head>'.
62
  '<head>'.
63
  '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.
64
  '<meta name="viewport" content="width=device-width">'.
65
+ '<title>'.esc_html($page_title).'</title>';
66
+
67
+ // Patch for editor preview
68
+ if(empty($_GET['cff-editor-preview']))
69
+ {
70
+ print '<style>'.
71
+ 'body{background:#FFF;overflow:hidden;margin:0;}'.
72
+ 'html, body {height:100%;position:relative;min-height:100%;display:block;}'.
73
+ '#fbuilder{overflow-x:hidden;overflow-y:auto;height:'.$this->_get_height().'px;padding:5px 32px 5px 5px;box-sizing:border-box!important;}'.
74
+ '</style>';
75
+ }
76
 
77
  // The AMP page has not been redirected
78
  // and redirects it with javascript
88
  }
89
  else
90
  {
91
+ global $wp_styles, $wp_scripts;
92
+ if(!empty($wp_scripts)) $wp_scripts->reset();
93
  $message = $this->_main_obj->public_form($atts);
94
+ // Patch for editor preview
95
+ if(empty($_GET['cff-editor-preview']))
 
 
 
 
 
 
 
 
 
 
 
96
  {
97
+ $message = preg_replace('/<form\s+/i', '<form target="_parent" ', $message, 1);
98
  }
99
+ ob_start();
100
+ if(!empty($wp_styles)) $wp_styles->do_items();
101
+ if(!empty($wp_scripts)) $wp_scripts->do_items();
102
+ wp_footer();
103
  $message .= ob_get_contents();
104
  ob_end_clean();
105
+
106
+ // Patch for editor preview
107
+ if(!empty($_GET['cff-editor-preview']))
108
+ {
109
+ $message .= '<script type="text/javascript">
110
+ fbuilderjQuery(window).on( "load", function(){
111
+ var frameEl = window.frameElement;
112
+ if(frameEl) frameEl.height = fbuilderjQuery("form").outerHeight(true) + 25;
113
+ });
114
+ </script>';
115
+ }
116
  }
117
 
118
  print '</head>'.
inc/cpcff_banner.inc.php CHANGED
@@ -14,13 +14,12 @@ if(!function_exists( 'codepeople_add_promote_banner' ))
14
  if(
15
  empty($codepeople_promote_banner_plugins) ||
16
  !is_admin() ||
17
- !current_user_can( 'manage_options' ) ||
18
- (
19
- function_exists( 'is_gutenberg_page' ) &&
20
- is_gutenberg_page()
21
- )
22
  ) return;
23
 
 
 
 
24
  // Take action over the banner
25
  if(
26
  !empty($_POST['codepeople_promote_banner_plugin']) &&
@@ -50,7 +49,7 @@ if(!function_exists( 'codepeople_add_promote_banner' ))
50
  set_transient( 'codepeople_promote_banner_'.$plugin_slug, $value, 0 );
51
  }
52
 
53
- if($minimum_days <= abs($now-$value) && 0<$value)
54
  {
55
  ?>
56
  <style>
14
  if(
15
  empty($codepeople_promote_banner_plugins) ||
16
  !is_admin() ||
17
+ !current_user_can( 'manage_options' )
 
 
 
 
18
  ) return;
19
 
20
+ $screen = get_current_screen();
21
+ if ( $screen->post_type == 'post' || $screen->post_type == 'page' ) return;
22
+
23
  // Take action over the banner
24
  if(
25
  !empty($_POST['codepeople_promote_banner_plugin']) &&
49
  set_transient( 'codepeople_promote_banner_'.$plugin_slug, $value, 0 );
50
  }
51
 
52
+ if($minimum_days <= abs($now-$value) && 0<$value*1)
53
  {
54
  ?>
55
  <style>
inc/cpcff_main.inc.php CHANGED
@@ -176,12 +176,15 @@ if(!class_exists('CPCFF_MAIN'))
176
 
177
  // Loads the admin resources
178
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_resources' ), 1 );
179
- add_action('enqueue_block_editor_assets', array($this,'gutenberg_editor'));
180
  }
181
  else // Initializes the public modules.
182
  {
183
  $this->_define_shortcodes();
184
  }
 
 
 
 
185
  } // End init
186
 
187
  /**
@@ -292,16 +295,6 @@ if(!class_exists('CPCFF_MAIN'))
292
  }
293
  } // End admin_pages
294
 
295
- /**
296
- * Loads the javascript resources to integrate the plugin with the Gutenberg editor
297
- *
298
- * @since 1.0.200
299
- */
300
- public function gutenberg_editor()
301
- {
302
- wp_enqueue_script( 'cp_calculatedfieldsf_gutenberg_editor', plugins_url('/js/cp_calculatedfieldsf_gutenberg.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
303
- } // End gutenberg_editor
304
-
305
  /**
306
  * Loads the javascript and style files.
307
  *
@@ -383,32 +376,13 @@ if(!class_exists('CPCFF_MAIN'))
383
  {
384
  if(isset($atts['shortcode_atts']))
385
  {
386
- global $wp_scripts;
387
- try
388
- {
389
- foreach($wp_scripts->registered as $registered)
390
- {
391
- wp_dequeue_script($registered->handle);
392
- }
393
-
394
- } catch(Exception $err){}
395
  $message = $this->public_form($atts['shortcode_atts']);
396
  ob_start();
397
-
398
- if(
399
- function_exists('wp_print_styles') &&
400
- function_exists('wp_print_scripts')
401
- )
402
- {
403
- wp_print_styles();
404
- wp_print_scripts();
405
- do_action('cpcff_footer');
406
- }
407
- else
408
- {
409
- wp_footer();
410
- }
411
-
412
  $message .= ob_get_contents();
413
  ob_end_clean();
414
  $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
176
 
177
  // Loads the admin resources
178
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_resources' ), 1 );
 
179
  }
180
  else // Initializes the public modules.
181
  {
182
  $this->_define_shortcodes();
183
  }
184
+
185
+ // Integration with Page Builders
186
+ require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_page_builders.inc.php';
187
+ CPCFF_PAGE_BUILDERS::init();
188
  } // End init
189
 
190
  /**
295
  }
296
  } // End admin_pages
297
 
 
 
 
 
 
 
 
 
 
 
298
  /**
299
  * Loads the javascript and style files.
300
  *
376
  {
377
  if(isset($atts['shortcode_atts']))
378
  {
379
+ global $wp_styles, $wp_scripts;
380
+ if(!empty($wp_scripts)) $wp_scripts->reset();
 
 
 
 
 
 
 
381
  $message = $this->public_form($atts['shortcode_atts']);
382
  ob_start();
383
+ if(!empty($wp_styles)) $wp_styles->do_items();
384
+ if(!empty($wp_scripts)) $wp_scripts->do_items();
385
+ wp_footer();
 
 
 
 
 
 
 
 
 
 
 
 
386
  $message .= ob_get_contents();
387
  ob_end_clean();
388
  $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
inc/cpcff_page_builders.inc.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Main class to interace with the different Content Editors: CPCFF_PAGE_BUILDERS class
4
+ *
5
+ */
6
+ if(!class_exists('CPCFF_PAGE_BUILDERS'))
7
+ {
8
+ class CPCFF_PAGE_BUILDERS
9
+ {
10
+ private function __construct(){}
11
+ public static function init()
12
+ {
13
+ $instance = new self();
14
+
15
+ add_action( 'enqueue_block_editor_assets', array($instance,'gutenberg_editor' ) );
16
+ add_action( 'elementor/widgets/widgets_registered', array($instance, 'elementor_editor') );
17
+ add_action( 'elementor/elements/categories_registered', array($instance, 'elementor_editor_category') );
18
+ }
19
+
20
+ /**************************** GUTENBERG ****************************/
21
+
22
+ /**
23
+ * Loads the javascript resources to integrate the plugin with the Gutenberg editor
24
+ */
25
+ public function gutenberg_editor()
26
+ {
27
+ global $wpdb;
28
+
29
+ wp_enqueue_style('cp_calculatedfieldsf_gutenberg_editor_css', plugins_url('/css/gutenberg.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
30
+ wp_enqueue_script('cp_calculatedfieldsf_gutenberg_editor', plugins_url('/js/cp_calculatedfieldsf_gutenberg.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
31
+
32
+ $url = CPCFF_AUXILIARY::site_url();
33
+ $url .= ((strpos($url, '?') === false) ? '?' : '&').'cff-editor-preview=1&cff-amp-redirected=1&cff-form=';
34
+ $config = array(
35
+ 'url' => $url,
36
+ 'forms' => array(),
37
+ 'labels' => array(
38
+ 'required_form' => __('Select a form', 'calculated-fields-form'),
39
+ 'forms' => __('Forms', 'calculated-fields-form'),
40
+ 'attributes' => __('Additional attributes', 'calculated-fields-form')
41
+ )
42
+ );
43
+
44
+ $forms = $wpdb->get_results( "SELECT id, form_name FROM ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_TABLE );
45
+
46
+ foreach ($forms as $form)
47
+ $config['forms'][$form->id] = esc_attr('('.$form->id.') '.$form->form_name);
48
+
49
+ wp_localize_script('cp_calculatedfieldsf_gutenberg_editor', 'cpcff_gutenberg_editor_config', $config);
50
+ } // End gutenberg_editor
51
+
52
+ /**************************** ELEMENTOR ****************************/
53
+
54
+ public function elementor_editor_category()
55
+ {
56
+ require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/pagebuilders/elementor_category.pb.php';
57
+ } // End elementor_editor
58
+
59
+ public function elementor_editor()
60
+ {
61
+ require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/pagebuilders/elementor.pb.php';
62
+ } // End elementor_editor
63
+
64
+ } // End CPCFF_PAGE_BUILDERS
65
+ }
inc/cpcff_session.inc.php CHANGED
@@ -22,6 +22,7 @@ if( !class_exists( 'CP_SESSION' ) )
22
  /************** INSTANCE PROPERTIES **************/
23
  private $session_id;
24
  private $expiration;
 
25
  private $expiration_interval = 86400; // 24 Hours
26
 
27
  /************** CONSTRUCT **************/
@@ -29,7 +30,7 @@ if( !class_exists( 'CP_SESSION' ) )
29
  private function __construct()
30
  {
31
  if(!is_admin()) return;
32
- if(session_id() == "") @session_start();
33
 
34
  if( isset( $_SESSION[CP_COOKIE_NAME] ) || isset( $_COOKIE[CP_COOKIE_NAME] ) )
35
  {
@@ -97,6 +98,9 @@ if( !class_exists( 'CP_SESSION' ) )
97
 
98
  private function _clean_expired_vars()
99
  {
 
 
 
100
  global $wpdb;
101
 
102
  $expiration = time()-$this->expiration_interval;
@@ -134,7 +138,7 @@ if( !class_exists( 'CP_SESSION' ) )
134
  if ( ! self::$instance ) {
135
  self::$instance = new self();
136
  }
137
-
138
  return self::$instance;
139
  }
140
 
@@ -144,7 +148,6 @@ if( !class_exists( 'CP_SESSION' ) )
144
  public static function session_start()
145
  {
146
  $instance = self::_get_instance();
147
- $instance->_clean_expired_vars();
148
  }
149
 
150
  public static function session_id()
22
  /************** INSTANCE PROPERTIES **************/
23
  private $session_id;
24
  private $expiration;
25
+ private $cleaned_expired_vars = false;
26
  private $expiration_interval = 86400; // 24 Hours
27
 
28
  /************** CONSTRUCT **************/
30
  private function __construct()
31
  {
32
  if(!is_admin()) return;
33
+ if(session_id() == "" ) @session_start();
34
 
35
  if( isset( $_SESSION[CP_COOKIE_NAME] ) || isset( $_COOKIE[CP_COOKIE_NAME] ) )
36
  {
98
 
99
  private function _clean_expired_vars()
100
  {
101
+ if($this->cleaned_expired_vars) return;
102
+ $this->cleaned_expired_vars = true;
103
+
104
  global $wpdb;
105
 
106
  $expiration = time()-$this->expiration_interval;
138
  if ( ! self::$instance ) {
139
  self::$instance = new self();
140
  }
141
+ self::$instance->_clean_expired_vars();
142
  return self::$instance;
143
  }
144
 
148
  public static function session_start()
149
  {
150
  $instance = self::_get_instance();
 
151
  }
152
 
153
  public static function session_id()
js/cp_calculatedfieldsf_gutenberg.js CHANGED
@@ -31,43 +31,182 @@ jQuery(function()
31
  },
32
 
33
  edit: function( props ) {
34
- var focus = props.isSelected;
35
- return [
36
- !!focus && el(
37
- InspectorControls,
38
- {
39
- key: 'cpcff_inspector'
40
- },
41
- [
42
- el(
43
- 'span',
44
- {
45
- key: 'cpcff_inspector_help',
46
- style:{fontStyle: 'italic'}
47
- },
48
- 'If you need help: '
49
- ),
50
- el(
51
- 'a',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  {
53
- key : 'cpcff_inspector_help_link',
54
- href : 'https://cff.dwbooster.com/documentation#insertion-page',
55
- target : '_blank'
56
- },
57
- 'CLICK HERE'
 
58
  )
59
- ]
60
- ),
61
- el('textarea',
62
- {
63
- key: 'cpcff_form_shortcode',
64
- value: props.attributes.shortcode,
65
- onChange: function(evt){
66
- props.setAttributes({shortcode: evt.target.value});
 
67
  },
68
- style: {width:"100%", resize: "vertical"}
69
- }
70
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  ];
72
  },
73
 
31
  },
32
 
33
  edit: function( props ) {
34
+
35
+ function generate_shortcode()
36
+ {
37
+ props.setAttributes({'shortcode' : '[CP_CALCULATED_FIELDS id="'+id+'" '+additional+']'});
38
+ };
39
+
40
+ function set_attributes(evt)
41
+ {
42
+ if(evt.target.tagName == 'SELECT') // Form id
43
+ {
44
+ id = evt.target.value;
45
+ }
46
+ else // Additional attributes
47
+ {
48
+ additional = evt.target.value;
49
+ }
50
+ generate_shortcode();
51
+ };
52
+
53
+ function get_id()
54
+ {
55
+ var output = '',
56
+ shortcode = props.attributes.shortcode,
57
+ m = shortcode.match(/\bid\s*=\s*['"]([^'"]*)['"]/i);
58
+ if(m) output = m[1];
59
+ return output;
60
+ };
61
+
62
+ function get_addtional_atts()
63
+ {
64
+ var output = props.attributes.shortcode;
65
+ output = output.replace(/^\s*\[\s*CP_CALCULATED_FIELDS\s+id\s*=\s*['"][^'"]*['"]\s*/i, '').replace(/\]\s*$/,'');
66
+ return output;
67
+ };
68
+
69
+ function generate_url_params()
70
+ {
71
+ var shortcode = wp.shortcode.next('CP_CALCULATED_FIELDS', props.attributes.shortcode),
72
+ attrs = shortcode.shortcode.attrs.named,
73
+ output = attrs['id'];
74
+ for (var i in attrs) {
75
+ if(i == 'id') continue;
76
+ output += '&'+encodeURIComponent(i)+'='+encodeURIComponent(attrs[i]);
77
+ }
78
+ return output;
79
+ };
80
+
81
+ // Main function code
82
+ var focus = props.isSelected,
83
+ options = [],
84
+ id = get_id(),
85
+ additional = get_addtional_atts(),
86
+ children = [];
87
+
88
+
89
+ // Creates the options for the forms list
90
+ for( var form_id in cpcff_gutenberg_editor_config['forms'])
91
+ {
92
+ var key = 'cpcff_inspector_option_'+form_id,
93
+ config = {key: key, value: form_id};
94
+
95
+ if( /^\s*$/.test(id)) id = form_id;
96
+ if(id == form_id) config['selected'] = 'selected';
97
+ options.push(el('option', config, cpcff_gutenberg_editor_config['forms'][form_id]));
98
+ }
99
+ generate_shortcode();
100
+
101
+ if(!/^\s*$/.test(id))
102
+ {
103
+ children.push(
104
+ el( 'div', {className: 'cff-iframe-container'},
105
+ el('div', {className: 'cff-iframe-overlay'}),
106
+ el('iframe',
107
  {
108
+ key: 'cpcff_form_iframe',
109
+ src: cpcff_gutenberg_editor_config['url']+generate_url_params(),
110
+ height: '0',
111
+ width: '500',
112
+ scrolling: 'no'
113
+ }
114
  )
115
+ )
116
+ );
117
+ }
118
+ else
119
+ {
120
+ children.push(
121
+ el('span',
122
+ {
123
+ key: 'cpcff_form_required'
124
  },
125
+ 'Select at least a form'
126
+ )
127
+ );
128
+ }
129
+
130
+ if(!!focus)
131
+ {
132
+ children.push(
133
+ el(
134
+ InspectorControls,
135
+ {
136
+ key: 'cpcff_inspector'
137
+ },
138
+ [
139
+ el(
140
+ 'span',
141
+ {
142
+ key: 'cpcff_inspector_help',
143
+ style:{fontStyle: 'italic'}
144
+ },
145
+ 'If you need help: '
146
+ ),
147
+ el(
148
+ 'a',
149
+ {
150
+ key : 'cpcff_inspector_help_link',
151
+ href : 'https://cff.dwbooster.com/documentation#insertion-page',
152
+ target : '_blank'
153
+ },
154
+ 'CLICK HERE'
155
+ ),
156
+ el(
157
+ 'hr',
158
+ {
159
+ key : 'cpcff_inspector_separator'
160
+ }
161
+ ),
162
+ el(
163
+ 'label',
164
+ {
165
+ key : 'cpcff_inspector_forms_label'
166
+ },
167
+ cpcff_gutenberg_editor_config['labels']['forms']
168
+ ),
169
+ el(
170
+ 'select',
171
+ {
172
+ key : 'cpcff_inspector_forms_list',
173
+ style : {width: '100%'},
174
+ onChange : set_attributes
175
+ },
176
+ options
177
+ ),
178
+ el(
179
+ 'label',
180
+ {
181
+ key : 'cpcff_inspector_attributes_label'
182
+ },
183
+ cpcff_gutenberg_editor_config['labels']['attributes']
184
+ ),
185
+ el(
186
+ 'input',
187
+ {
188
+ type : 'text',
189
+ key : 'cpcff_inspector_text',
190
+ value : get_addtional_atts(),
191
+ onChange : set_attributes,
192
+ style: {width:"100%"}
193
+ }
194
+ ),
195
+ el(
196
+ 'span',
197
+ {
198
+ key : 'cpcff_inspector_attributes_help',
199
+ style:{fontStyle: 'italic'}
200
+ },
201
+ 'variable_name="value"'
202
+ )
203
+ ]
204
+ )
205
+ );
206
+ }
207
+
208
+ return [
209
+ children
210
  ];
211
  },
212
 
js/fbuilder-pro-public.jquery.js CHANGED
@@ -53,7 +53,8 @@
53
  .replace( decimalSymbol, '.' )
54
  .replace( /\s/g, '' ),
55
  p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
56
- return ( p ) ? p[0]*1 : $.fbuilder[ 'parseValStr' ]( value );
 
57
  };
58
 
59
 
@@ -118,16 +119,16 @@
118
  }
119
  if (items[i].userhelpTooltip)
120
  {
121
- var uh_t,uh = $("#fieldlist"+opt.identifier+" .pb"+page).find("#"+items[i].name).closest(".dfield");
122
  if( uh.length == 0 )
123
  {
124
- uh = $("#fieldlist"+opt.identifier+" .pb"+page).find("#"+items[i].name).closest(".fields");
125
  }
126
  uh_t = uh.find(".uh");
127
- if(uh_t.length && uh_t.text()!="")
128
  {
129
- uh.attr("uh",uh_t.text());
130
- uh_t.text("");
131
  }
132
  }
133
  }
@@ -294,7 +295,7 @@
294
  hiddenByContainer : {},
295
  getItem: function( name )
296
  {
297
- var regExp = new RegExp('('+name+'_)|(fieldname'+name+'_)', i);
298
  for( var i in items )
299
  {
300
  if( items[ i ].name == name || regExp.test(items[ i ].name))
@@ -363,6 +364,7 @@
363
  userhelpTooltip:false,
364
  csslayout:"",
365
  init:function(){},
 
366
  show:function()
367
  {
368
  return 'Not available yet';
53
  .replace( decimalSymbol, '.' )
54
  .replace( /\s/g, '' ),
55
  p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
56
+
57
+ return ( p ) ? ((/^0\d/.test(p[0])) ? p[0].substr(1) : p[0])*1 : $.fbuilder[ 'parseValStr' ]( value );
58
  };
59
 
60
 
119
  }
120
  if (items[i].userhelpTooltip)
121
  {
122
+ var uh_t,uh = $("#fieldlist"+opt.identifier+" .pb"+page).find('[id*="'+items[i].name+'"]').closest(".dfield");
123
  if( uh.length == 0 )
124
  {
125
+ uh = $("#fieldlist"+opt.identifier+" .pb"+page).find('[id*="'+items[i].name+'"]').closest(".fields");
126
  }
127
  uh_t = uh.find(".uh");
128
+ if(uh_t.length && uh_t.html()!="")
129
  {
130
+ uh.attr("uh",uh_t.html());
131
+ uh_t.html("");
132
  }
133
  }
134
  }
295
  hiddenByContainer : {},
296
  getItem: function( name )
297
  {
298
+ var regExp = new RegExp((parseInt(name,10) == name) ? 'fieldname'+name+'_' : name+'_', i);
299
  for( var i in items )
300
  {
301
  if( items[ i ].name == name || regExp.test(items[ i ].name))
364
  userhelpTooltip:false,
365
  csslayout:"",
366
  init:function(){},
367
+ getField: function(f){return $.fbuilder['forms'][this.form_identifier].getItem(f);},
368
  show:function()
369
  {
370
  return 'Not available yet';
js/fields-admin/02_fbuilder.fslider.js CHANGED
@@ -7,7 +7,7 @@
7
  );
8
  $.fbuilder.controls[ 'fslider' ] = function(){};
9
  $.extend(
10
- $.fbuilder.controls[ 'fslider' ].prototype,
11
  $.fbuilder.controls[ 'ffields' ].prototype,
12
  {
13
  title:"Slider",
@@ -38,7 +38,7 @@
38
  {s:"#sMax",e:"change keyup", l:"max"},
39
  {s:"#sStep",e:"change keyup", l:"step"},
40
  {s:"#sRange",e:"change", l:"range", f:function(el){
41
- var v = el.is(':checked');
42
  $( 'div.range' )[ ( v ) ? 'show' : 'hide' ]();
43
  $( 'div.no-range' )[ ( v ) ? 'hide' : 'show' ]();
44
  return v;
@@ -54,13 +54,13 @@
54
  ];
55
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this, evt);
56
  },
57
- showRequired: function(){ return ''; },
58
- showPredefined: function()
59
  {
60
  return '<div class="no-range" style="display:'+( ( this.range ) ? 'none' : 'block')+';"><label>Predefined Value</label><input class="large" name="sPredefined" id="sPredefined" value="'+$.fbuilder.htmlEncode( this.predefined )+'"></div><div class="range" style="display:'+( ( this.range ) ? 'block' : 'none')+';"><div class="column"><label>Predefined Min</label><br /><input name="sPredefinedMin" id="sPredefinedMin" value="'+$.fbuilder.htmlEncode( this.predefinedMin )+'" style="width:95%;"></div><div class="column"><label>Predefined Max</label><br /><input name="sPredefinedMax" id="sPredefinedMax" value="'+$.fbuilder.htmlEncode( this.predefinedMax )+'" style="width:95%;"></div><div class="clearer"></div></div>';
61
  },
62
- showRangeIntance: function()
63
  {
64
- return '<div><div class="column" style="width:30%;"><label>Min</label><br /><input name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" placeholder="0 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Max</label><br /><input name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" placeholder="100 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Step</label><br /><input name="sStep" id="sStep" value="'+$.fbuilder.htmlEncode(this.step)+'" placeholder="1 by default" style="width:95%;"></div><div class="clearer"></div></div><div><input type="checkbox" name="sRange" id="sRange" '+( ( this.range ) ? 'CHECKED' : '' )+' /> Range slider </div><div><label>Field Caption</label><br /><input class="large" type="text" name="sCaption" id="sCaption" value="'+$.fbuilder.htmlEncode( this.caption )+'"></div><div><label>Min Corner Caption</label><br /><input class="large" type="text" name="sMinCaption" id="sMinCaption" value="'+$.fbuilder.htmlEncode( this.minCaption )+'"></div><div><label>Max Corner Caption</label><br /><input class="large" type="text" name="sMaxCaption" id="sMaxCaption" value="'+$.fbuilder.htmlEncode( this.maxCaption )+'"></div><div><label>Symbol for grouping thousands in the field\'s caption(Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.thousandSeparator )+'" /></div><div><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sCentSeparator" id="sCentSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.centSeparator )+'" /></div>';
65
  }
66
  });
7
  );
8
  $.fbuilder.controls[ 'fslider' ] = function(){};
9
  $.extend(
10
+ $.fbuilder.controls[ 'fslider' ].prototype,
11
  $.fbuilder.controls[ 'ffields' ].prototype,
12
  {
13
  title:"Slider",
38
  {s:"#sMax",e:"change keyup", l:"max"},
39
  {s:"#sStep",e:"change keyup", l:"step"},
40
  {s:"#sRange",e:"change", l:"range", f:function(el){
41
+ var v = el.is(':checked');
42
  $( 'div.range' )[ ( v ) ? 'show' : 'hide' ]();
43
  $( 'div.no-range' )[ ( v ) ? 'hide' : 'show' ]();
44
  return v;
54
  ];
55
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this, evt);
56
  },
57
+ showRequired: function(){ return ''; },
58
+ showPredefined: function()
59
  {
60
  return '<div class="no-range" style="display:'+( ( this.range ) ? 'none' : 'block')+';"><label>Predefined Value</label><input class="large" name="sPredefined" id="sPredefined" value="'+$.fbuilder.htmlEncode( this.predefined )+'"></div><div class="range" style="display:'+( ( this.range ) ? 'block' : 'none')+';"><div class="column"><label>Predefined Min</label><br /><input name="sPredefinedMin" id="sPredefinedMin" value="'+$.fbuilder.htmlEncode( this.predefinedMin )+'" style="width:95%;"></div><div class="column"><label>Predefined Max</label><br /><input name="sPredefinedMax" id="sPredefinedMax" value="'+$.fbuilder.htmlEncode( this.predefinedMax )+'" style="width:95%;"></div><div class="clearer"></div></div>';
61
  },
62
+ showRangeIntance: function()
63
  {
64
+ return '<div><div class="column" style="width:30%;"><label>Min</label><br /><input name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" placeholder="0 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Max</label><br /><input name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" placeholder="100 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Step</label><br /><input name="sStep" id="sStep" value="'+$.fbuilder.htmlEncode(this.step)+'" placeholder="1 by default" style="width:95%;"></div><div class="clearer"></div></div><div style="margin-bottom:10px;"><i>It is possible to associate other fields in the form with the attributes "min", "max" and "step". Ex: fieldname1</i></div><div><input type="checkbox" name="sRange" id="sRange" '+( ( this.range ) ? 'CHECKED' : '' )+' /> Range slider </div><div><label>Field Caption</label><br /><input class="large" type="text" name="sCaption" id="sCaption" value="'+$.fbuilder.htmlEncode( this.caption )+'"></div><div><label>Min Corner Caption</label><br /><input class="large" type="text" name="sMinCaption" id="sMinCaption" value="'+$.fbuilder.htmlEncode( this.minCaption )+'"></div><div><label>Max Corner Caption</label><br /><input class="large" type="text" name="sMaxCaption" id="sMaxCaption" value="'+$.fbuilder.htmlEncode( this.maxCaption )+'"></div><div><label>Symbol for grouping thousands in the field\'s caption(Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.thousandSeparator )+'" /></div><div><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sCentSeparator" id="sCentSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.centSeparator )+'" /></div>';
65
  }
66
  });
js/fields-public/02_fbuilder.fnumber.js CHANGED
@@ -106,7 +106,8 @@
106
  if( e.length )
107
  {
108
  var v = $.trim( e.val() );
109
- return ($.isNumeric(v)) ? v : ((raw) ? $.fbuilder.parseValStr( v, raw) : $.fbuilder.parseVal(v, this.thousandSeparator, this.decimalSymbol));
 
110
  }
111
  return 0;
112
  }
106
  if( e.length )
107
  {
108
  var v = $.trim( e.val() );
109
+ if(raw) return ($.isNumeric(v) && this.thousandSeparator != '.') ? v : $.fbuilder.parseValStr(v, raw);
110
+ return $.fbuilder.parseVal(v, this.thousandSeparator, this.decimalSymbol);
111
  }
112
  return 0;
113
  }
js/fields-public/02_fbuilder.fslider.js CHANGED
@@ -19,69 +19,65 @@
19
  minCaption:"",
20
  maxCaption:"",
21
  caption:"{0}",
22
- init:function()
23
  {
24
- this.min = ( /^\s*$/.test( this.min ) ) ? 0 : parseFloat( $.trim( this.min ) );
25
- this.max = ( /^\s*$/.test( this.max ) ) ? 100 : parseFloat( $.trim( this.max ) );
26
- this.step = ( /^\s*$/.test( this.step )) ? 1 : parseFloat( $.trim( this.step ) );
27
- this.centSeparator = ( /^\s*$/.test( this.centSeparator )) ? '.' : $.trim( this.centSeparator );
28
- this.thousandSeparator = $.trim( this.thousandSeparator );
29
-
30
- this.predefinedMin = ( /^\s*$/.test( this.predefinedMin ) )? this.min : Math.min( Math.max( parseFloat( $.trim( this.predefinedMin ) ), this.min ), this.max );
31
-
32
- this.predefinedMax = ( /^\s*$/.test( this.predefinedMax ) )? this.max : Math.min( Math.max( parseFloat( $.trim( this.predefinedMax ) ), this.min ), this.max );
33
-
34
- this.predefined = ( /^\s*$/.test( this.predefined ) ) ? this.min : parseFloat( $.trim( this.predefined ) );
35
  },
36
- show:function()
37
  {
38
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-slider-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+'</label><div class="dfield slider-container"><input id="'+this.name+'" name="'+this.name+'" class="field" type="hidden" value="'+$.fbuilder.htmlEncode( $.trim( this.predefined ) )+'"/><div id="'+this.name+'_slider" class="slider '+this.size+'"></div><div class="corner-captions '+this.size+'"><span class="left-corner">'+this.minCaption+'</span><span class="right-corner" style="float:right;">'+this.maxCaption+'</span></div><div id="'+this.name+'_caption" class="slider-caption"></div><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
 
 
 
 
39
  },
40
- set_values:function()
41
  {
42
- var me = this;
43
- function setThousandsSeparator( v )
44
  {
45
- v = $.fbuilder.parseVal( v, me.thousandSeparator, me.centSeparator );
46
- if( !isNaN( v ) )
47
- {
48
- v = v.toString();
49
- var parts = v.toString().split("."),
50
- counter = 0,
51
- str = '';
52
 
53
- if( !/^\s*$/.test( me.thousandSeparator ) )
 
 
54
  {
55
- for( var i = parts[0].length-1; i >= 0; i--)
56
- {
57
- counter++;
58
- str = parts[0][i] + str;
59
- if( counter%3 == 0 && i != 0 ) str = me.thousandSeparator + str;
60
 
61
- }
62
- parts[0] = str;
63
- }
64
- if( typeof parts[ 1 ] != 'undefined' && parts[ 1 ].length == 1 )
65
- {
66
- parts[ 1 ] += '0';
67
  }
68
-
69
- return parts.join( me.centSeparator );
70
  }
71
- else
72
  {
73
- return v;
74
  }
75
- };
76
 
 
 
 
 
 
 
 
 
 
 
77
  if( me.range )
78
  {
79
  var values = $( '#'+me.name+'_slider' ).slider( 'values' );
80
  $( '#'+me.name ).val( '[' + values[ 0 ] + ',' + values[ 1 ] + ']' );
81
  $( '#'+me.name+'_caption' ).html(
82
  me.caption
83
- .replace( /\{\s*0\s*\}/, setThousandsSeparator( values[ 0 ] ) )
84
- .replace( /\{\s*0\s*\}/, setThousandsSeparator( values[ 1 ] ) )
85
  );
86
  }
87
  else
@@ -90,58 +86,94 @@
90
  $( '#'+me.name ).val( value );
91
  $( '#'+me.name+'_caption' ).html(
92
  me.caption
93
- .replace( /\{\s*0\s*\}/, setThousandsSeparator( value ) )
94
  );
95
  }
96
  $( '#'+me.name ).change();
97
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  after_show:function()
99
  {
100
  var me = this,
101
  opt = {
102
  range: (me.range != false) ? me.range : "min",
103
- min : me.min,
104
- max : me.max,
105
- step : me.step
106
  };
107
 
108
- if( me.range ) opt[ 'values' ] = [ me.predefinedMin, me.predefinedMax ];
109
- else opt[ 'value' ] = me.predefined;
 
 
 
 
 
 
110
  opt[ 'slide' ] = opt[ 'stop' ] = ( function( e ){
111
  return function( event, ui )
112
  {
113
  if( typeof ui.value != 'undefined' ) $(this).slider('value', ui.value);
114
  if( typeof ui.values != 'undefined' ) $(this).slider('values', ui.values);
115
- e.set_values();
116
  }
117
  } )( me );
118
  $( '#'+this.name+'_slider' ).slider( opt );
119
- me.set_values();
120
- $( '#cp_calculatedfieldsf_pform'+me.form_identifier ).bind( 'reset', function(){ $( '#'+me.name+'_slider' ).slider( opt ); me.set_values(); } );
121
  },
122
- val:function()
123
  {
 
124
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
125
- return ( e.length ) ? e.val() : 0;
126
  },
127
  setVal:function( v )
128
  {
129
- try{
130
- v = JSON.parse(v);
131
- }
132
- catch(err){}
133
  try{
134
  $( '[name="'+this.name+'"]' ).val( v );
135
- if( $.isArray( v ) )
136
- {
137
- this.predefinedMin = v[ 0 ];
138
- this.predefinedMax = v[ 1 ];
139
- }
140
- else
141
- {
142
- this.predefined = v;
143
- }
144
- this.after_show();
145
  }catch( err ){}
146
  }
147
  });
19
  minCaption:"",
20
  maxCaption:"",
21
  caption:"{0}",
22
+ _getAttr:function(attr)
23
  {
24
+ if($.isNumeric(this[attr])) return parseFloat(this[attr]);
25
+ var f = this.getField(this[attr]);
26
+ if(f) return parseFloat(f.val());
27
+ return 0;
 
 
 
 
 
 
 
28
  },
29
+ _setHndl:function(attr, one)
30
  {
31
+ if($.isNumeric(this[attr])) return;
32
+ let s = (/^fieldname\d+$/i) ? '[id*="'+this[attr]+this.form_identifier+'"]' : this[attr],
33
+ i = (one) ? 'one' : 'on';
34
+ var me = this;
35
+ $(document)[i]('change', s, function(){ if(me['set_'+attr]) me['set_'+attr](me._getAttr(attr));});
36
  },
37
+ _setThousandsSeparator : function(v)
38
  {
39
+ v = $.fbuilder.parseVal( v, this.thousandSeparator, this.centSeparator );
40
+ if( !isNaN( v ) )
41
  {
42
+ v = v.toString();
43
+ var parts = v.toString().split("."),
44
+ counter = 0,
45
+ str = '';
 
 
 
46
 
47
+ if( !/^\s*$/.test( this.thousandSeparator ) )
48
+ {
49
+ for( var i = parts[0].length-1; i >= 0; i--)
50
  {
51
+ counter++;
52
+ str = parts[0][i] + str;
53
+ if( counter%3 == 0 && i != 0 ) str = this.thousandSeparator + str;
 
 
54
 
 
 
 
 
 
 
55
  }
56
+ parts[0] = str;
 
57
  }
58
+ if( typeof parts[ 1 ] != 'undefined' && parts[ 1 ].length == 1 )
59
  {
60
+ parts[ 1 ] += '0';
61
  }
 
62
 
63
+ return parts.join( this.centSeparator );
64
+ }
65
+ else
66
+ {
67
+ return v;
68
+ }
69
+ },
70
+ _setFieldValue:function()
71
+ {
72
+ var me = this;
73
  if( me.range )
74
  {
75
  var values = $( '#'+me.name+'_slider' ).slider( 'values' );
76
  $( '#'+me.name ).val( '[' + values[ 0 ] + ',' + values[ 1 ] + ']' );
77
  $( '#'+me.name+'_caption' ).html(
78
  me.caption
79
+ .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 0 ] ) )
80
+ .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 1 ] ) )
81
  );
82
  }
83
  else
86
  $( '#'+me.name ).val( value );
87
  $( '#'+me.name+'_caption' ).html(
88
  me.caption
89
+ .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( value ) )
90
  );
91
  }
92
  $( '#'+me.name ).change();
93
  },
94
+ init:function()
95
+ {
96
+ this.min = (/^\s*$/.test(this.min)) ? 0 : $.trim(this.min);
97
+ this.max = (/^\s*$/.test(this.max)) ? 100 : $.trim(this.max);
98
+ this.step = (/^\s*$/.test(this.step)) ? 1 : $.trim(this.step);
99
+ this.predefined = (/^\s*$/.test(this.predefined)) ? this.min : $.trim(this.predefined);
100
+ this.predefinedMin = (/^\s*$/.test(this.predefinedMin))? this.min : $.trim(this.predefinedMin);
101
+ this.predefinedMax = (/^\s*$/.test(this.predefinedMax))? this.max : $.trim(this.predefinedMax);
102
+
103
+ this._setHndl('min');
104
+ this._setHndl('max');
105
+ this._setHndl('step');
106
+
107
+ this.centSeparator = ( /^\s*$/.test( this.centSeparator )) ? '.' : $.trim( this.centSeparator );
108
+ this.thousandSeparator = $.trim( this.thousandSeparator );
109
+ },
110
+ show:function()
111
+ {
112
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-slider-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+'</label><div class="dfield slider-container"><input id="'+this.name+'" name="'+this.name+'" class="field" type="hidden" value=""/><div id="'+this.name+'_slider" class="slider '+this.size+'"></div><div class="corner-captions '+this.size+'"><span class="left-corner">'+this.minCaption+'</span><span class="right-corner" style="float:right;">'+this.maxCaption+'</span></div><div id="'+this.name+'_caption" class="slider-caption"></div><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
113
+ },
114
+ set_min : function(v)
115
+ {
116
+ var e = $('[id="'+this.name+'_slider"]'), c = this.val(), r = false;
117
+ e.slider( 'option', 'min', v );
118
+ if($.isArray(c)){if(c[0] < v){c[0] = v; r = true;}}
119
+ else if(c < v){c = v; r = true;}
120
+ if(r) this.setVal(c);
121
+ },
122
+ set_max : function(v)
123
+ {
124
+ var e = $('[id="'+this.name+'_slider"]'), c = this.val(), r = false;
125
+ e.slider( 'option', 'max', v );
126
+ if($.isArray(c)){if(v < c[1]){c[1] = v; r = true;}}
127
+ else if(v < c){c = v; r = true;}
128
+ if(r) this.setVal(c);
129
+ },
130
+ set_step : function(v)
131
+ {
132
+ $('[id="'+this.name+'_slider"]').slider( "option", "step", v );
133
+ },
134
  after_show:function()
135
  {
136
  var me = this,
137
  opt = {
138
  range: (me.range != false) ? me.range : "min",
139
+ min : me._getAttr('min'),
140
+ max : me._getAttr('max'),
141
+ step : me._getAttr('step')
142
  };
143
 
144
+ if( me.range )
145
+ {
146
+ var _min = Math.min( Math.max( me._getAttr('predefinedMin'), opt.min ), opt.max ),
147
+ _max = Math.min( Math.max( me._getAttr('predefinedMax'), opt.min ), opt.max );
148
+ opt[ 'values' ] = [ _min, _max ];
149
+ }
150
+ else opt[ 'value' ] = Math.min( Math.max( me._getAttr('predefined'), opt.min ), opt.max );
151
+
152
  opt[ 'slide' ] = opt[ 'stop' ] = ( function( e ){
153
  return function( event, ui )
154
  {
155
  if( typeof ui.value != 'undefined' ) $(this).slider('value', ui.value);
156
  if( typeof ui.values != 'undefined' ) $(this).slider('values', ui.values);
157
+ e._setFieldValue();
158
  }
159
  } )( me );
160
  $( '#'+this.name+'_slider' ).slider( opt );
161
+ me._setFieldValue();
162
+ $( '#cp_calculatedfieldsf_pform'+me.form_identifier ).bind( 'reset', function(){ $( '#'+me.name+'_slider' ).slider( opt ); me._setFieldValue(); } );
163
  },
164
+ val:function(raw)
165
  {
166
+ raw = raw || false;
167
  var e = $( '[id="' + this.name + '"]:not(.ignore)' );
168
+ return ( e.length ) ? ((raw) ? e.val() : JSON.parse(e.val())) : 0;
169
  },
170
  setVal:function( v )
171
  {
172
+ try{ v = JSON.parse(v); }catch(err){}
 
 
 
173
  try{
174
  $( '[name="'+this.name+'"]' ).val( v );
175
+ $(this.name+'_slider').slider((($.isArray(v)) ? 'values' : 'value'), v);
176
+ this._setFieldValue();
 
 
 
 
 
 
 
 
177
  }catch( err ){}
178
  }
179
  });
js/modules/01_mathematical_logical/admin/module_admin.js CHANGED
@@ -27,7 +27,17 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
27
  { "value" : "SQRT", "code" : "SQRT(", "tip" : "Returns the square root of the number passed as parameter. <strong>SQRT(number1, number2)</strong>" },
28
  { "value" : "MAX", "code" : "MAX(", "tip" : "Returns the greater value of the two parameters. <strong>MAX(number1, number2)</strong>" },
29
  { "value" : "MIN", "code" : "MIN(", "tip" : "Returns the lesser value of the two parameters. <strong>MIN(number1, number2)</strong>" },
30
- { "value" : "GCD", "code" : "GCD(", "tip" : "Returns greatest common divisor between the two parameters. <strong>GCD(number1, number2)</strong>" }
 
 
 
 
 
 
 
 
 
 
31
  ]
32
  },
33
 
27
  { "value" : "SQRT", "code" : "SQRT(", "tip" : "Returns the square root of the number passed as parameter. <strong>SQRT(number1, number2)</strong>" },
28
  { "value" : "MAX", "code" : "MAX(", "tip" : "Returns the greater value of the two parameters. <strong>MAX(number1, number2)</strong>" },
29
  { "value" : "MIN", "code" : "MIN(", "tip" : "Returns the lesser value of the two parameters. <strong>MIN(number1, number2)</strong>" },
30
+ { "value" : "GCD", "code" : "GCD(", "tip" : "Returns greatest common divisor between the two parameters. <strong>GCD(number1, number2)</strong>" },
31
+ { "value" : "SIN", "code" : "SIN(", "tip" : "SIN(x) returns the sine of x (x in radians).<br> <strong>SIN(3) = 0.1411200080598672</strong>" },
32
+ { "value" : "COS", "code" : "COS(", "tip" : "COS(x) returns the cosine of x (x in radians).<br> <strong>COS(3) = -0.9899924966004454</strong>" },
33
+ { "value" : "TAN", "code" : "TAN(", "tip" : "TAN(x) returns the tangent of x (x in radians).<br> <strong>TAN(3) = -0.1425465430742778</strong>" },
34
+ { "value" : "ASIN", "code" : "ASIN(", "tip" : "ASIN(x) returns the arcsine of x (x in radians).<br> <strong>ASIN(0.5) = 0.5235987755982989</strong>" },
35
+ { "value" : "ACOS", "code" : "ACOS(", "tip" : "ACOS(x) returns the arccosine of x (x in radians).<br> <strong>ACOS(0.5) = 1.0471975511965979</strong>" },
36
+ { "value" : "ATAN", "code" : "ATAN(", "tip" : "ATAN(x) returns the arctangent of x (x as a numeric value between -PI/2 and PI/2 radians).<br> <strong>ATAN(2) = 1.1071487177940904</strong>" },
37
+ { "value" : "ATAN2", "code" : "ATAN2(", "tip" : "ATAN2(y,x) returns the angle in radians between the plane and the point (x,y).<br> <strong>ATAN2(90,15) = 1.4056476493802699</strong>" },
38
+ { "value" : "ATANH", "code" : "ATANH(", "tip" : "ATANH(x) returns the hyperbolic arctangent of the number x.<br> <strong>ATANH(0.5) = 0.549306144334055</strong>" },
39
+ { "value" : "DEGREES", "code" : "DEGREES(", "tip" : "DEGREES(x) converts the x in radians to degrees.<br> <strong>DEGREES(1.5707963267948966) = 90</strong>" },
40
+ { "value" : "RADIANS", "code" : "RADIANS(", "tip" : "RADIANS(x) converts the x in degrees to radians.<br> <strong>RADIANS(90) = 1.5707963267948966</strong>" }
41
  ]
42
  },
43
 
js/modules/01_mathematical_logical/public/module_public.js CHANGED
@@ -10,7 +10,9 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
10
  {
11
  if(y && y != 0)
12
  {
13
- return operation(num/y)*y;
 
 
14
  }
15
  else
16
  {
@@ -49,10 +51,12 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
49
  {
50
  window.PREC = window.prec = function (num, pr)
51
  {
52
- if(/^\d+$/.test(pr) && /^[+-]?\d+(\.\d+)?$/.test(num))
 
53
  {
54
- result = num.toFixed( pr );
55
- return result;
 
56
  }
57
  return num;
58
  };
@@ -119,7 +123,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
119
  };
120
  } // End if window.LOGAB
121
 
122
- var math_prop = ["LN10", "PI", "E", "LOG10E", "SQRT2", "LOG2E", "SQRT1_2", "LN2", "cos", "pow", "log", "tan", "sqrt", "asin", "abs", "max", "exp", "atan2", "random", "acos", "atan", "min", "sin"];
123
 
124
  for(var i = 0, h = math_prop.length; i < h; i++)
125
  {
@@ -129,6 +133,16 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
129
  }
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
132
  fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ]( fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ][ 'prefix' ], CF_LOGICAL );
133
  },
134
 
10
  {
11
  if(y && y != 0)
12
  {
13
+ var r = operation(num/y)*y, p = (new String(y)).split('.');
14
+ if(p.length == 2) r = PREC(r,p[1].length);
15
+ return r;
16
  }
17
  else
18
  {
51
  {
52
  window.PREC = window.prec = function (num, pr)
53
  {
54
+ if('undefined' == typeof pr) pr = 0;
55
+ if(/^\d+$/.test(pr) && $.isNumeric(num))
56
  {
57
+ var f = POW(10,pr);
58
+ num = ROUND(num*f)/f;
59
+ return num.toFixed(pr);
60
  }
61
  return num;
62
  };
123
  };
124
  } // End if window.LOGAB
125
 
126
+ var math_prop = ["LN10", "PI", "E", "LOG10E", "SQRT2", "LOG2E", "SQRT1_2", "LN2", "cos", "pow", "log", "tan", "sqrt", "asin", "abs", "max", "exp", "atan2", "atanh", "random", "acos", "atan", "min", "sin"];
127
 
128
  for(var i = 0, h = math_prop.length; i < h; i++)
129
  {
133
  }
134
  }
135
 
136
+ if(window.RADIANS == undefined)
137
+ {
138
+ window.RADIANS = window.radians = function(a){ return a*PI/180;};
139
+ }
140
+
141
+ if(window.DEGREES == undefined)
142
+ {
143
+ window.DEGREES = window.degrees = function(a){ return a*180/PI;};
144
+ }
145
+
146
  fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ]( fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ][ 'prefix' ], CF_LOGICAL );
147
  },
148
 
js/modules/05_managing_fields/admin/module_admin.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
2
+ fbuilderjQuery[ 'fbuilder' ] = fbuilderjQuery[ 'fbuilder' ] || {};
3
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modules' ] || {};
4
+
5
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
6
+ 'tutorial' : 'https://cff.dwbooster.com/documentation#managing-fields-module',
7
+ 'toolbars' : {
8
+ 'processing' : {
9
+ 'label' : 'Managing fields',
10
+ 'buttons' : [
11
+ {
12
+ "value" : "getField",
13
+ "code" : "getField(",
14
+ "tip" : "<p>Get the field object. <strong>getField( # or fieldname# )</strong></p><p>Returns the internal representation of a field object. For example, if there is the slider field: fieldname1, to assing it a value, for example:50, enter as part of the equation associated to the calculated field the piece of code: getField(1).setVal(50);</p><p>The getField operation can be used only in the context of the equations.</p>"
15
+ }
16
+ ]
17
+ }
18
+ }
19
+ };
pagebuilders/elementor.pb.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Elementor;
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit; // Exit if accessed directly.
6
+ }
7
+
8
+ class Elementor_CFF_Widget extends Widget_Base
9
+ {
10
+ public function get_name()
11
+ {
12
+ return 'calculated-fields-form';
13
+ } // End get_name
14
+
15
+ public function get_title()
16
+ {
17
+ return 'Calculated Fields Form';
18
+ } // End get_title
19
+
20
+ public function get_icon()
21
+ {
22
+ return 'fa fa-plus';
23
+ } // End get_icon
24
+
25
+ public function get_categories()
26
+ {
27
+ return array( 'calculated-fields-form-cat' );
28
+ } // End get_categories
29
+
30
+ public function is_reload_preview_required()
31
+ {
32
+ return true;
33
+ } // End is_reload_preview_required
34
+
35
+ protected function _register_controls()
36
+ {
37
+ global $wpdb;
38
+
39
+ $this->start_controls_section(
40
+ 'cff_section',
41
+ array(
42
+ 'label' => __( 'Calculated Fields Form', 'calculated-fields-form' )
43
+ )
44
+ );
45
+
46
+ $options = array();
47
+ $default = '';
48
+
49
+ $rows = $wpdb->get_results( "SELECT id, form_name FROM ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_TABLE );
50
+ foreach ($rows as $item)
51
+ {
52
+ $options[$item->id] = $item->form_name;
53
+ if(empty($default)) $default = $item->id;
54
+ }
55
+
56
+ $this->add_control(
57
+ 'form',
58
+ array(
59
+ 'label' => __('Select a form', 'calculated-fields-form'),
60
+ 'type' => Controls_Manager::SELECT,
61
+ 'options' => $options,
62
+ 'default' => $default
63
+ )
64
+ );
65
+
66
+ $this->add_control(
67
+ 'attrs',
68
+ array(
69
+ 'label' => __('Additional attributes', 'calculated-fields-form'),
70
+ 'type' => Controls_Manager::TEXT,
71
+ 'input_type' => 'text',
72
+ 'placeholder' => 'attr="value"'
73
+ )
74
+ );
75
+
76
+ $this->end_controls_section();
77
+ } // End _register_controls
78
+
79
+ private function _get_shortcode()
80
+ {
81
+ $settings = $this->get_settings_for_display();
82
+ $attrs = trim($settings['attrs']);
83
+ if(!empty($attrs)) $attrs = ' '.$attrs;
84
+ return '[CP_CALCULATED_FIELDS id="'.$settings['form'].'"'.$attrs.']';
85
+ } // End _get_shortcode
86
+
87
+ protected function render()
88
+ {
89
+ $shortcode = $this->_get_shortcode();
90
+ if(
91
+ isset($_REQUEST['action']) &&
92
+ (
93
+ $_REQUEST['action'] == 'elementor' ||
94
+ $_REQUEST['action'] == 'elementor_ajax'
95
+ )
96
+ )
97
+ {
98
+ $atts = preg_replace(array('/\[\s*cp_calculated_fields\s*/i', '/\s*\]$/'),'', $shortcode);
99
+ $atts = shortcode_parse_atts($atts);
100
+ $url = \CPCFF_AUXILIARY::site_url();
101
+ $url .= ((strpos($url, '?') === false) ? '?' : '&').'cff-editor-preview=1&cff-amp-redirected=1';
102
+ foreach($atts as $i => $v)
103
+ {
104
+ if(is_numeric($i)) continue;
105
+ if($i == 'id') $url .= '&cff-form';
106
+ else $url .= '&'.urlencode($i);
107
+ $url .= '='.urlencode($v);
108
+ }
109
+
110
+ ?>
111
+ <div class="cff-iframe-container" style="position:relative;">
112
+ <div class="cff-iframe-overlay" style="position:absolute;top:0;right:0;bottom:0;left:0;"></div>
113
+ <iframe height="0" width="100%" src="<?php print $url; ?>">
114
+ </div>
115
+ <?php
116
+ }
117
+ else
118
+ {
119
+ print do_shortcode(shortcode_unautop($shortcode));
120
+ }
121
+
122
+ } // End render
123
+
124
+ public function render_plain_content()
125
+ {
126
+ echo $this->_get_shortcode();
127
+ } // End render_plain_content
128
+
129
+ protected function _content_template() {} // End _content_template
130
+ } // End ClassElementor_CFF_Widget
131
+
132
+ class Elementor_CFFV_Widget extends Widget_Shortcode
133
+ {
134
+ public function get_name()
135
+ {
136
+ return 'calculated-fields-form-variable';
137
+ } // End get_name
138
+
139
+ public function get_title()
140
+ {
141
+ return 'Define Variable';
142
+ } // End get_title
143
+
144
+ public function get_icon()
145
+ {
146
+ return 'fa fa-asterisk';
147
+ } // End get_icon
148
+
149
+ public function get_categories()
150
+ {
151
+ return array( 'calculated-fields-form-cat' );
152
+ } // End get_categories
153
+
154
+ public function is_reload_preview_required()
155
+ {
156
+ return true;
157
+ } // End is_reload_preview_required
158
+
159
+ protected function _register_controls()
160
+ {
161
+ $this->start_controls_section(
162
+ 'section_shortcode',
163
+ array(
164
+ 'label' => __( 'Variable Shortcode', 'calculated-fields-form' ),
165
+ )
166
+ );
167
+
168
+ $this->add_control(
169
+ 'shortcode',
170
+ array(
171
+ 'label' => __( 'Variable shortcode', 'calculated-fields-form' ),
172
+ 'type' => Controls_Manager::TEXT,
173
+ 'input_type' => 'text',
174
+ 'default' => '[CP_CALCULATED_FIELDS_VAR name="varname"]',
175
+ 'description' => '<a href="https://cff.dwbooster.com/documentation#javascript-variables" target="_blank">'.__( 'I need help [+]', 'calculated-fields-form' ).'</a>'
176
+ )
177
+ );
178
+
179
+ $this->end_controls_section();
180
+ } // End _register_controls
181
+
182
+ protected function render()
183
+ {
184
+ $cff_main = \CPCFF_MAIN::instance();
185
+ add_shortcode( 'CP_CALCULATED_FIELDS_VAR', array($cff_main,'create_variable_shortcode') );
186
+ parent::render();
187
+ } // End render
188
+
189
+ } // End ClassElementor_CFFV_Widget
190
+
191
+ // Register the widgets
192
+ Plugin::instance()->widgets_manager->register_widget_type( new Elementor_CFF_Widget );
193
+ Plugin::instance()->widgets_manager->register_widget_type( new Elementor_CFFV_Widget );
pagebuilders/elementor_category.pb.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Elementor;
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit; // Exit if accessed directly.
6
+ }
7
+
8
+ // Register the categories
9
+ Plugin::$instance->elements_manager->add_category(
10
+ 'calculated-fields-form-cat',
11
+ array(
12
+ 'title'=>'Calculated Fields Form',
13
+ 'icon' => 'fa fa-plug'
14
+ ),
15
+ 2 // position
16
+ );
templates/01/style.css CHANGED
@@ -17,36 +17,16 @@
17
  .cp_cff_letter #fbuilder input[type="number"],
18
  .cp_cff_letter #fbuilder input[type="file"]{border-bottom:1px solid #bbb;border-top:1px solid #999;border-left:1px solid #bbb;border-right:1px solid #bbb;padding-top:5px;padding-bottom:5px;font-size:14px;-webkit-box-shadow:#fdfdfd 0px 1px 1px;color:#888;padding-left:5px; padding-right:5px;}
19
 
20
- .cp_cff_letter #fbuilder .large{
21
- width: calc( 100% - 12px ) !important;
22
- width: -moz-calc( 100% - 12px ) !important;
23
- width: -webkit-calc( 100% - 12px ) !important;
24
- width: -o-calc( 100% - 12px ) !important;
25
- }
26
 
27
  @media screen and (min-width: 740px),print{
28
- .cp_cff_letter #fbuilder .medium {
29
- width: calc( 50% - 12px ) !important;
30
- width: -moz-calc( 50% - 12px ) !important;
31
- width: -webkit-calc( 50% - 12px ) !important;
32
- width: -o-calc( 50% - 12px ) !important;
33
- }
34
- .cp_cff_letter #fbuilder .small {
35
- width: calc( 25% - 12px ) !important;
36
- width: -moz-calc( 25% - 12px ) !important;
37
- width: -webkit-calc( 25% - 12px ) !important;
38
- width: -o-calc( 25% - 12px ) !important;
39
- }
40
  }
41
 
42
  @media screen and (max-width: 640px){
43
  .cp_cff_letter #fbuilder .medium,
44
- .cp_cff_letter #fbuilder .small {
45
- width: calc( 100% - 12px ) !important;
46
- width: -moz-calc( 100% - 12px ) !important;
47
- width: -webkit-calc( 100% - 12px ) !important;
48
- width: -o-calc( 100% - 12px ) !important;
49
- }
50
  }
51
 
52
  .cp_cff_letter #fbuilder{text-shadow:0px 1px 0px #fff;}
17
  .cp_cff_letter #fbuilder input[type="number"],
18
  .cp_cff_letter #fbuilder input[type="file"]{border-bottom:1px solid #bbb;border-top:1px solid #999;border-left:1px solid #bbb;border-right:1px solid #bbb;padding-top:5px;padding-bottom:5px;font-size:14px;-webkit-box-shadow:#fdfdfd 0px 1px 1px;color:#888;padding-left:5px; padding-right:5px;}
19
 
20
+ .cp_cff_letter #fbuilder .large{width: 100%;}
 
 
 
 
 
21
 
22
  @media screen and (min-width: 740px),print{
23
+ .cp_cff_letter #fbuilder .medium {width: 50%;}
24
+ .cp_cff_letter #fbuilder .small {width:25%;}
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  @media screen and (max-width: 640px){
28
  .cp_cff_letter #fbuilder .medium,
29
+ .cp_cff_letter #fbuilder .small {width: 100%;}
 
 
 
 
 
30
  }
31
 
32
  .cp_cff_letter #fbuilder{text-shadow:0px 1px 0px #fff;}
templates/02/style.css CHANGED
@@ -47,36 +47,16 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#322c20', end
47
  padding-left:10px; padding-right:10px;
48
  }
49
 
50
- .cp_cff_professional #fbuilder .large{
51
- width: calc( 100% - 22px ) !important;
52
- width: -webkit-calc( 100% - 22px ) !important;
53
- width: -moz-calc( 100% - 22px ) !important;
54
- width: -o-calc( 100% - 22px ) !important;
55
- }
56
 
57
  @media screen and (min-width: 740px),print{
58
- .cp_cff_professional #fbuilder .medium {
59
- width: calc( 50% - 22px ) !important;
60
- width: -moz-calc( 50% - 22px ) !important;
61
- width: -webkit-calc( 50% - 22px ) !important;
62
- width: -o-calc( 50% - 22px ) !important;
63
- }
64
- .cp_cff_professional #fbuilder .small {
65
- width: calc( 25% - 22px ) !important;
66
- width: -moz-calc( 25% - 22px ) !important;
67
- width: -webkit-calc( 25% - 22px ) !important;
68
- width: -o-calc( 25% - 22px ) !important;
69
- }
70
  }
71
 
72
  @media screen and (max-width: 640px){
73
  .cp_cff_professional #fbuilder .medium,
74
- .cp_cff_professional #fbuilder .small {
75
- width: calc( 100% - 22px ) !important;
76
- width: -moz-calc( 100% - 22px ) !important;
77
- width: -webkit-calc( 100% - 22px ) !important;
78
- width: -o-calc( 100% - 22px ) !important;
79
- }
80
  }
81
 
82
  .cp_cff_professional #fbuilder fieldset{border:0;}
47
  padding-left:10px; padding-right:10px;
48
  }
49
 
50
+ .cp_cff_professional #fbuilder .large{width: 100%;}
 
 
 
 
 
51
 
52
  @media screen and (min-width: 740px),print{
53
+ .cp_cff_professional #fbuilder .medium {width: 50%;}
54
+ .cp_cff_professional #fbuilder .small {width: 25%;}
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
  @media screen and (max-width: 640px){
58
  .cp_cff_professional #fbuilder .medium,
59
+ .cp_cff_professional #fbuilder .small {width: 100%;}
 
 
 
 
 
60
  }
61
 
62
  .cp_cff_professional #fbuilder fieldset{border:0;}
templates/03/style.css CHANGED
@@ -19,36 +19,15 @@
19
  border:1px solid rgb(150, 150, 150);padding:5px;font-size:14px;background:#FFF;color:#000;
20
  }
21
 
22
- .cp_cff_natural #fbuilder .large{
23
- width: calc( 100% - 12px ) !important;
24
- width: -moz-calc( 100% - 12px ) !important;
25
- width: -o-calc( 100% - 12px ) !important;
26
- width: -webkit-calc( 100% - 12px ) !important;
27
- }
28
 
29
  @media screen and (min-width: 740px),print{
30
- .cp_cff_natural #fbuilder .medium{
31
- width: calc( 50% - 12px ) !important;
32
- width: -moz-calc( 50% - 12px ) !important;
33
- width: -o-calc( 50% - 12px ) !important;
34
- width: -webkit-calc( 50% - 12px ) !important;
35
- }
36
-
37
- .cp_cff_natural #fbuilder .small{
38
- width: calc( 25% - 12px ) !important;
39
- width: -moz-calc( 25% - 12px ) !important;
40
- width: -o-calc( 25% - 12px ) !important;
41
- width: -webkit-calc( 25% - 12px ) !important;
42
- }
43
  }
44
  @media screen and (max-width: 640px){
45
  .cp_cff_natural #fbuilder .medium,
46
- .cp_cff_natural #fbuilder .small{
47
- width: calc( 100% - 12px ) !important;
48
- width: -moz-calc( 100% - 12px ) !important;
49
- width: -o-calc( 100% - 12px ) !important;
50
- width: -webkit-calc( 100% - 12px ) !important;
51
- }
52
  }
53
 
54
  .cp_cff_natural #fbuilder{color:rgb(64, 63, 61);}
19
  border:1px solid rgb(150, 150, 150);padding:5px;font-size:14px;background:#FFF;color:#000;
20
  }
21
 
22
+ .cp_cff_natural #fbuilder .large{width: 100%;}
 
 
 
 
 
23
 
24
  @media screen and (min-width: 740px),print{
25
+ .cp_cff_natural #fbuilder .medium{width: 50%;}
26
+ .cp_cff_natural #fbuilder .small{width: 25%;}
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
  @media screen and (max-width: 640px){
29
  .cp_cff_natural #fbuilder .medium,
30
+ .cp_cff_natural #fbuilder .small{width: 100%;}
 
 
 
 
 
31
  }
32
 
33
  .cp_cff_natural #fbuilder{color:rgb(64, 63, 61);}
templates/06/style.css CHANGED
@@ -35,24 +35,20 @@ padding:5px;
35
  .cp_cff_clean #fbuilder textarea.large,
36
  .cp_cff_clean #fbuilder input[type=text].large,
37
  .cp_cff_clean #fbuilder input[type=number].large,
38
- .cp_cff_clean #fbuilder input[type=file].large{
39
- width: calc( 100% - 10px ) !important;
40
- width: -moz-calc( 100% - 10px ) !important;
41
- width: -o-calc( 100% - 10px ) !important;
42
- width: -webkit-calc( 100% - 10px ) !important;
43
- }
44
 
45
  .cp_cff_clean #fbuilder .captcha{margin-bottom:10px;}
46
  .cp_cff_clean #fbuilder .fields:not(.section_breaks){padding: 10px;margin-bottom:10px;background:#EBECEC;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}
47
  .cp_cff_clean #fbuilder .fields.cff-container-field{padding:0px;margin-bottom:0px;}
 
48
  .cp_cff_clean #fbuilder fieldset,
49
  .cp_cff_clean #fbuilder legend{-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;border-color:#EBECEC;}
50
  .cp_cff_clean #fbuilder legend{background: #EBECEC;border:0;}
51
 
52
  @media screen and (min-width: 740px),print{
53
- .cp_cff_clean #fbuilder .fields.column2{float:left;width:calc( 49.9% - 20px );width:-webkit-calc( 49.9% - 20px );width:-moz-calc( 49.9% - 20px );}
54
- .cp_cff_clean #fbuilder .fields.column3{float:left;width:calc( 33.3% - 20px );width:-webkit-calc( 33.3% - 20px );width:-moz-calc( 33.3% - 20px );}
55
- .cp_cff_clean #fbuilder .fields.column4{float:left;width:calc( 24.9% - 20px );width:-webkit-calc( 24.9% - 20px );width:-moz-calc( 24.9% - 20px );}
56
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column2{float:right;}
57
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column3{float:right;}
58
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column4{float:right;}
@@ -70,12 +66,7 @@ width: -webkit-calc( 100% - 10px ) !important;
70
  .cp_cff_clean #fbuilder textarea,
71
  .cp_cff_clean #fbuilder input[type=text],
72
  .cp_cff_clean #fbuilder input[type=number],
73
- .cp_cff_clean #fbuilder input[type=file]{
74
- width: calc( 100% - 10px ) !important;
75
- width: -moz-calc( 100% - 10px ) !important;
76
- width: -o-calc( 100% - 10px ) !important;
77
- width: -webkit-calc( 100% - 10px ) !important;
78
- }
79
  }
80
 
81
  .cp_cff_clean #fbuilder input[type=button],
35
  .cp_cff_clean #fbuilder textarea.large,
36
  .cp_cff_clean #fbuilder input[type=text].large,
37
  .cp_cff_clean #fbuilder input[type=number].large,
38
+ .cp_cff_clean #fbuilder input[type=file].large{width: 100%;}
 
 
 
 
 
39
 
40
  .cp_cff_clean #fbuilder .captcha{margin-bottom:10px;}
41
  .cp_cff_clean #fbuilder .fields:not(.section_breaks){padding: 10px;margin-bottom:10px;background:#EBECEC;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}
42
  .cp_cff_clean #fbuilder .fields.cff-container-field{padding:0px;margin-bottom:0px;}
43
+ .cp_cff_clean #fbuilder .pbreak>.fields.cff-container-field{margin-bottom:10px;}
44
  .cp_cff_clean #fbuilder fieldset,
45
  .cp_cff_clean #fbuilder legend{-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;border-color:#EBECEC;}
46
  .cp_cff_clean #fbuilder legend{background: #EBECEC;border:0;}
47
 
48
  @media screen and (min-width: 740px),print{
49
+ .cp_cff_clean #fbuilder .fields.column2{float:left;width:49.9%;}
50
+ .cp_cff_clean #fbuilder .fields.column3{float:left;width:33.3%;}
51
+ .cp_cff_clean #fbuilder .fields.column4{float:left;width:24.9%;}
52
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column2{float:right;}
53
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column3{float:right;}
54
  *[dir="rtl"] .cp_cff_clean #fbuilder .fields.column4{float:right;}
66
  .cp_cff_clean #fbuilder textarea,
67
  .cp_cff_clean #fbuilder input[type=text],
68
  .cp_cff_clean #fbuilder input[type=number],
69
+ .cp_cff_clean #fbuilder input[type=file]{width: 100%;}
 
 
 
 
 
70
  }
71
 
72
  .cp_cff_clean #fbuilder input[type=button],
templates/09/style.css CHANGED
@@ -109,9 +109,9 @@
109
  }
110
  .cp_cff_box #fbuilder .fields.section_breaks .section_break{border:0;}
111
  @media screen and (min-width: 740px),print{
112
- .cp_cff_box #fbuilder .fields.column2{float:left;width:calc( 49.9% - 5px );width:-moz-calc( 49.9% - 5px );width:-webkit-calc( 49.9% - 5px );}
113
- .cp_cff_box #fbuilder .fields.column3{float:left;width:calc( 33.3% - 5px );width:-moz-calc( 33.3% - 5px );width:-webkit-calc( 33.3% - 5px );}
114
- .cp_cff_box #fbuilder .fields.column4{float:left;width:calc( 24.9% - 5px );width:-moz-calc( 24.9% - 5px );width:-webkit-calc( 24.9% - 5px );}
115
 
116
  *[dir="rtl"] .cp_cff_box #fbuilder .fields.column2{float:right;}
117
  *[dir="rtl"] .cp_cff_box #fbuilder .fields.column3{float:right;}
@@ -120,4 +120,5 @@
120
 
121
  .cp_cff_box #fbuilder .apply-coupon{background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMjQ3MUZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xMSAwLTIgLjktMiAydjE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMTEgMCAyLS45IDItMlY1YzAtMS4xLS44OS0yLTItMnptLTkgMTRsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=');}
122
 
123
- .cp_cff_box #fbuilder .discount-container{margin-top:10px;}
 
109
  }
110
  .cp_cff_box #fbuilder .fields.section_breaks .section_break{border:0;}
111
  @media screen and (min-width: 740px),print{
112
+ .cp_cff_box #fbuilder .fields.column2{float:left;width:49.9%;}
113
+ .cp_cff_box #fbuilder .fields.column3{float:left;width:33.3%;}
114
+ .cp_cff_box #fbuilder .fields.column4{float:left;width:24.9%;}
115
 
116
  *[dir="rtl"] .cp_cff_box #fbuilder .fields.column2{float:right;}
117
  *[dir="rtl"] .cp_cff_box #fbuilder .fields.column3{float:right;}
120
 
121
  .cp_cff_box #fbuilder .apply-coupon{background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMjQ3MUZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xMSAwLTIgLjktMiAydjE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMTEgMCAyLS45IDItMlY1YzAtMS4xLS44OS0yLTItMnptLTkgMTRsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=');}
122
 
123
+ .cp_cff_box #fbuilder .discount-container{margin-top:10px;}
124
+ .cp_cff_box .kbw-signature ~ div{margin: 15px 0 0 5px !important;}
templates/11/style.css CHANGED
@@ -42,36 +42,16 @@
42
  line-height: normal;
43
  }
44
 
45
- .cp_cff_11 #fbuilder .large {
46
- width: calc( 100% - 32px ) !important;
47
- width: -moz-calc( 100% - 32px ) !important;
48
- width: -webkit-calc( 100% - 32px ) !important;
49
- width: -o-calc( 100% - 32px ) !important;
50
- }
51
 
52
  @media screen and (min-width: 740px),print{
53
- .cp_cff_11 #fbuilder .medium {
54
- width: calc( 50% - 32px ) !important;
55
- width: -moz-calc( 50% - 32px ) !important;
56
- width: -webkit-calc( 50% - 32px ) !important;
57
- width: -o-calc( 50% - 32px ) !important;
58
- }
59
- .cp_cff_11 #fbuilder .small {
60
- width: calc( 25% - 32px ) !important;
61
- width: -moz-calc( 25% - 32px ) !important;
62
- width: -webkit-calc( 25% - 32px ) !important;
63
- width: -o-calc( 25% - 32px ) !important;
64
- }
65
  }
66
 
67
  @media screen and (max-width: 640px){
68
  .cp_cff_11 #fbuilder .medium,
69
- .cp_cff_11 #fbuilder .small {
70
- width: calc( 100% - 32px ) !important;
71
- width: -moz-calc( 100% - 32px ) !important;
72
- width: -webkit-calc( 100% - 32px ) !important;
73
- width: -o-calc( 100% - 32px ) !important;
74
- }
75
  }
76
 
77
  .cp_cff_11 #fbuilder input[type="date"]:focus,
42
  line-height: normal;
43
  }
44
 
45
+ .cp_cff_11 #fbuilder .large {width: 100%;}
 
 
 
 
 
46
 
47
  @media screen and (min-width: 740px),print{
48
+ .cp_cff_11 #fbuilder .medium {width: 50%;}
49
+ .cp_cff_11 #fbuilder .small {width: 25%;}
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
  @media screen and (max-width: 640px){
53
  .cp_cff_11 #fbuilder .medium,
54
+ .cp_cff_11 #fbuilder .small {width: 100%;}
 
 
 
 
 
55
  }
56
 
57
  .cp_cff_11 #fbuilder input[type="date"]:focus,
templates/12/style.css CHANGED
@@ -41,37 +41,19 @@
41
  margin: 1px 0;
42
  padding: 5px;
43
  }
44
-
45
- .cp_cff_12 #fbuilder .large {
46
- width: calc( 100% - 32px ) !important;
47
- width: -moz-calc( 100% - 32px ) !important;
48
- width: -webkit-calc( 100% - 32px ) !important;
49
- width: -o-calc( 100% - 32px ) !important;
50
  }
 
51
 
52
  @media screen and (min-width: 740px),print{
53
- .cp_cff_12 #fbuilder .medium {
54
- width: calc( 50% - 32px ) !important;
55
- width: -moz-calc( 50% - 32px ) !important;
56
- width: -webkit-calc( 50% - 32px ) !important;
57
- width: -o-calc( 50% - 32px ) !important;
58
- }
59
- .cp_cff_12 #fbuilder .small {
60
- width: calc( 25% - 32px ) !important;
61
- width: -moz-calc( 25% - 32px ) !important;
62
- width: -webkit-calc( 25% - 32px ) !important;
63
- width: -o-calc( 25% - 32px ) !important;
64
- }
65
  }
66
 
67
  @media screen and (max-width: 640px){
68
  .cp_cff_12 #fbuilder .medium,
69
- .cp_cff_12 #fbuilder .small {
70
- width: calc( 100% - 32px ) !important;
71
- width: -moz-calc( 100% - 32px ) !important;
72
- width: -webkit-calc( 100% - 32px ) !important;
73
- width: -o-calc( 100% - 32px ) !important;
74
- }
75
  }
76
 
77
  .cp_cff_12 #fbuilder .cff-text-field input,
41
  margin: 1px 0;
42
  padding: 5px;
43
  }
44
+ .cp_cff_12 #fbuilder select {
45
+ background: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSIjZGNkY2RjIj48cGF0aCBkPSJNNy40MSA4LjU5TDEyIDEzLjE3bDQuNTktNC41OEwxOCAxMGwtNiA2LTYtNiAxLjQxLTEuNDF6Ii8+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PC9zdmc+") no-repeat center right #FFF;
 
 
 
 
46
  }
47
+ .cp_cff_12 #fbuilder .large {width: 100%;}
48
 
49
  @media screen and (min-width: 740px),print{
50
+ .cp_cff_12 #fbuilder .medium {width: 50%;}
51
+ .cp_cff_12 #fbuilder .small {width: 25%;}
 
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
  @media screen and (max-width: 640px){
55
  .cp_cff_12 #fbuilder .medium,
56
+ .cp_cff_12 #fbuilder .small {width: 100%;}
 
 
 
 
 
57
  }
58
 
59
  .cp_cff_12 #fbuilder .cff-text-field input,