Calculated Fields Form - Version 1.0.383

Version Description

  • Includes additional validations rules to identify possible conflicts with Hummingbird.
Download this release

Release Info

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

Code changes from version 1.0.336 to 1.0.383

Files changed (73) hide show
  1. README.txt +75 -39
  2. captcha/captcha.php +0 -1
  3. changelog.txt +240 -2
  4. config/cpcff_config.cfg.php +31 -14
  5. cp_calculatedfieldsf_free.php +22 -3
  6. css/style.css +20 -1
  7. css/stylepublic.css +5 -4
  8. inc/cpcff_admin_int.inc.php +13 -15
  9. inc/cpcff_admin_int_list.inc.php +20 -5
  10. inc/cpcff_amp.inc.php +11 -6
  11. inc/cpcff_auxiliary.inc.php +22 -0
  12. inc/cpcff_banner.inc.php +1 -1
  13. inc/cpcff_compatibility.inc.php +98 -0
  14. inc/cpcff_form.inc.php +12 -3
  15. inc/cpcff_install_uninstall.inc.php +5 -1
  16. inc/cpcff_main.inc.php +20 -4
  17. inc/cpcff_page_builders.inc.php +5 -1
  18. js/fbuilder-pro-admin.jquery.js +5 -3
  19. js/fbuilder-pro-public.jquery.js +36 -33
  20. js/fields-admin/01_fbuilder.ftext.js +1 -1
  21. js/fields-admin/02_fbuilder.fcurrency.js +1 -1
  22. js/fields-admin/02_fbuilder.fnumber.js +1 -1
  23. js/fields-admin/02_fbuilder.fslider.js +2 -2
  24. js/fields-admin/04_fbuilder.fdate.js +14 -14
  25. js/fields-admin/05_fbuilder.ftextarea.js +1 -1
  26. js/fields-admin/06_fbuilder.fcheck.js +3 -7
  27. js/fields-admin/07_fbuilder.fradio.js +3 -7
  28. js/fields-admin/08_fbuilder.fdropdown.js +3 -9
  29. js/fields-admin/09_fbuilder.ffile.js +1 -1
  30. js/fields-admin/10_fbuilder.fpassword.js +1 -1
  31. js/fields-admin/16_fbuilder.fsummary.js +9 -9
  32. js/fields-admin/28_fbuilder.fcontainer.js +7 -2
  33. js/fields-admin/29_fbuilder.ffieldset.fc.js +1 -0
  34. js/fields-admin/30_fbuilder.fdiv.fc.js +1 -0
  35. js/fields-admin/31_fbuilder.fmedia.js +30 -26
  36. js/fields-admin/32_fbuilder.fbutton.js +19 -4
  37. js/fields-admin/34_fbuilder.fhtml.js +26 -1
  38. js/fields-admin/fbuilder.fcalculated.js +7 -7
  39. js/fields-public/02_fbuilder.fcurrency.js +9 -5
  40. js/fields-public/02_fbuilder.fnumber.js +8 -6
  41. js/fields-public/05_fbuilder.ftextarea.js +4 -1
  42. js/fields-public/10_fbuilder.fpassword.js +5 -1
  43. js/fields-public/28_fbuilder.fcontainer.js +2 -1
  44. js/fields-public/29_fbuilder.ffieldset.fc.js +1 -0
  45. js/fields-public/30_fbuilder.fdiv.fc.js +1 -0
  46. js/fields-public/31_fbuilder.fmedia.js +5 -2
  47. js/fields-public/32_fbuilder.fbutton.js +20 -10
  48. js/fields-public/fbuilder.fcalculated.js +18 -0
  49. js/modules/01_mathematical_logical/admin/module_admin.js +3 -0
  50. js/modules/01_mathematical_logical/public/module_public.js +37 -0
  51. js/modules/05_managing_fields/admin/module_admin.js +11 -1
  52. js/modules/05_managing_fields/public/05_managing_fields.js +58 -0
  53. js/modules/05_managing_fields/public/module_public.js +11 -0
  54. js/modules/06_connector/admin/module_admin.js +1 -1
  55. js/modules/06_connector/public/01_connector.js +4 -2
  56. js/modules/08_url/admin/module_admin.js +55 -0
  57. js/modules/08_url/public/01_url.js +120 -0
  58. js/modules/08_url/public/module_public.js +11 -0
  59. languages/calculated-fields-form-en_US.mo +0 -0
  60. languages/calculated-fields-form-en_US.po +456 -196
  61. pagebuilders/divi/cff.js +1 -0
  62. pagebuilders/divi/cff.pb.php +8 -8
  63. pagebuilders/elementor/elementor.pb.php +1 -1
  64. pagebuilders/gutenberg/assets/js/gutenberg.js +1 -1
  65. templates/07/thumbnail.jpg +0 -0
  66. templates/08/thumbnail.jpg +0 -0
  67. templates/09/thumbnail.jpg +0 -0
  68. templates/10/thumbnail.jpg +0 -0
  69. templates/11/thumbnail.jpg +0 -0
  70. templates/12/thumbnail.jpg +0 -0
  71. templates/13/config.ini +5 -0
  72. templates/13/style.css +287 -0
  73. templates/13/thumbnail.jpg +0 -0
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: codepeople
3
  Donate link: http://cff.dwbooster.com
4
  Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
5
  Requires at least: 3.0.5
6
- Tested up to: 5.2
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -55,7 +55,7 @@ The "Calculated Fields Form" plugin allows the specific integration with the fol
55
  * Elementor.
56
  * Page Builder by SiteOrigin.
57
  * Beaver Builder.
58
- * Visual Composer.
59
  * DIVI Builder.
60
  * For other editors, the shortcodes should be inserted using other controls of general purpose, like the controls for inserting HTML or shortcodes.
61
 
@@ -121,6 +121,7 @@ The plugin has two additional (commercial) versions: **Premium** and **Developer
121
  = Features in Platinum version: =
122
 
123
  * All features of free, premium, and developer versions of the plugin.
 
124
  * Includes the Google Analytics add-on to generate reports about the usage of forms, to identify the users actions and behaviors.
125
  * Includes the PayPal Pro add-on to ask for the credit card details of payers and charge it directly into your website without any redirection through the PayPal website.
126
  * Includes the Upload Files add-on to integrate the uploaded files in the website library, and add new mime types to WordPress.
@@ -131,13 +132,15 @@ The plugin has two additional (commercial) versions: **Premium** and **Developer
131
  * Includes the "Signature" add-on to convert some form fields in "Signature" fields, allowing the users to sign with the mouse or directly in the touchscreens.
132
  * Includes the "iCal" add-on for sending the users an iCal file as part of the confirmation email after the form submission to be imported into most popular calendars like Outlook and Google Calendar.
133
  * Includes the "CSV Generator" add-on that allows to export dynamically the information collected by the form to a CSV file, and send it as attachment in the notification emails.
134
- * Includes the "WebMerge" add-on to integrate the forms with the WebMerge Service, and generate PDF and Office documents at runtime with the information collected by the forms.
 
135
  * Includes the "PrintFriendly" add-on to integrate the forms with the PrintFriendly API for generating PDF files after forms submissions, and attach the resulting files to the notification emails.
136
  * Includes the "MailChimp" add-on to add new members to the MailChimp Service using the data collected by the form.
137
  * Includes the "Mautic" add-on to add new contacts (or update the existent ones) into the Mautic Service, using the information collected by the form.
 
138
  * Includes the "Emma" add-on to add new members to the Emma Service using the data collected by the form.
139
  * Includes the "Twilio" add-on for sending notification messages (SMS) when the forms are submitted.
140
- * Includes the "MailPoet" add-on to add new subscribers to the MailPoet's Mailing Lists.
141
  * Includes the "AffiliateWP" add-on to integrate the forms with the AffiliateWP plugin.
142
  * Authorize.Net add-on integrate the forms with the Authorize.Net payment gateway.
143
  * Stripe add-on integrate the forms with the Stripe payment gateway.
@@ -234,12 +237,10 @@ Here are some sample formulas that can be used as base:
234
 
235
  * There is a huge number of equations that can't be recreated with simple mathematical operators, or the operations listed above, requiring "IF" conditions, here is a sample of the formula that can be used in that case:
236
 
237
- ```
238
- (function(){
239
- if(fieldname3 > 100) return fieldname1+fieldname2;
240
- if(fieldname3 <= 100) return fieldname1*fieldname2;
241
- })();
242
- ```
243
 
244
 
245
  * For complex equations where is required to define blocks of JavaScript code, you should use the following format:
@@ -287,9 +288,11 @@ To get the complete list of available fields, please visit the following link: [
287
 
288
  The icon with the "X" symbol, that appears when editing the contents of pages or posts, inserts a shortcode in the content with the structure:
289
 
290
- [CP_CALCULATED_FIELDS_VAR name="..."]
 
 
291
 
292
- The ... symbol should be replaced by the parameter or variable name, and will be the same name of the javascript variable. For example: [CP_CALCULATED_FIELDS_VAR name="varname"]
293
 
294
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#javascript-variables "Create JavaScript Variables")
295
 
@@ -315,6 +318,12 @@ The developer and platinum versions of the plugin include the WooCommerce add-on
315
 
316
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#woocommerce-addon "WooCommerce add-on")
317
 
 
 
 
 
 
 
318
  = SalesForce add-on - Only available in the Developer and Platinum versions of the plugin =
319
 
320
  The add-on allows create new leads in the SalesForce account with the data submitted by the forms.
@@ -407,9 +416,15 @@ The "CSV Generator" add-on allows to export dynamically the information collecte
407
 
408
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#csv-generator-addon "CSV Generator add-on")
409
 
 
 
 
 
 
 
410
  = WebMerge add-on - Only available in the Platinum version of the plugin =
411
 
412
- The "WebMerge" add-on integrates the forms with the WebMerge Service, and generate PDF and Office documents at runtime with the information collected by the forms.
413
 
414
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#webmerge-addon "WebMerge add-on")
415
 
@@ -433,6 +448,12 @@ Includes the "Mautic" add-on to integrate the forms with the Mautic Service. Thi
433
 
434
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#mautic-addon "Mautic add-on")
435
 
 
 
 
 
 
 
436
  = Emma add-on - Only available in the Platinum version of the plugin =
437
 
438
  Includes the "Emma" add-on to integrate the forms with the Emma Service to add new members to the Emma groups.
@@ -447,7 +468,7 @@ Includes the "Twilio" add-on to integrate the forms with the Twilio Service for
447
 
448
  = MailPoet add-on - Only available in the Platinum version of the plugin =
449
 
450
- Includes the "MailPoet" add-on to add new subscribers to the MailPoet's Mailing Lists.
451
 
452
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#mailpoet-addon "MailPoet add-on")
453
 
@@ -914,7 +935,7 @@ This way the special characters should show correctly.
914
  4. Inserting the form using Elementor
915
  5. Inserting the form using Page Builder by SiteOrigin
916
  6. Inserting the form using Beaver Builder
917
- 7. Inserting the form using Visual Composer
918
  8. Sample calculated form
919
  9. Calculated field settings
920
  10. Advanced equations editor
@@ -928,51 +949,66 @@ This way the special characters should show correctly.
928
 
929
  == Changelog ==
930
 
931
- = 1.0.336 =
932
 
933
- * Modifies the code of the plugin for allowing the compatibility with outdated versions of PHP.
934
 
935
- = 1.0.335 =
936
 
937
- * Fixes an issue in forms when the calculated fields are evaluated the first time.
938
 
939
- = 1.0.334 =
940
 
941
- * Modifies the dependencies in the calculated fields to allow the use of value and value|r (for raw values) in the manual definition of dependency rules.
 
 
 
942
 
943
- = 1.0.333 =
944
 
945
- * Includes specific buttons in the Logical Operations module to for the operators: equal, not equal, less than, less than or equal to, greater than, greater than or equal.
946
 
947
- = 1.0.332 =
948
 
949
- * Includes a specific DIVI module to allow the insertion of the form's shortcode from the DIVI Builder.
 
 
 
950
 
951
- = 1.0.331 =
952
 
953
- * Modifies the module that evaluate all equations, and the dependencies, improving the forms performance.
954
 
955
- = 1.0.330 =
956
 
957
- * Modifies the 'Equal To' attribute in the controls: Single Line Text, Email and Password for all versions of the plugin, and the controls: Line Text DS, Email DS in the Developer and Platinum versions.
 
 
 
 
958
 
959
- = 1.0.329 =
960
 
961
- * Modifies the CSS editor.
962
- * Includes the new filter: cpcff_price that allows modify the calculated price. This filter receives two parameters: the calcualted price, and an array with the list of fields and their values (Professional, Developer and Platinum versions of the plugin).
963
- * Modifies the SERVER-SIDE EQUATIONS add-on. The new version includes a new section in the forms' settings to allow calculate the final price through a server side equation after the form be submitted (Developer and Platinum versions of the plugin).
 
 
964
 
965
- = 1.0.328 =
966
 
967
- * Replaces the 'Customize Form Design' attribute in the 'Form Settings' tab by a real CSS editor, with auto-completing, syntax highlighting, and error checking.
 
968
 
969
- = 1.0.327 =
970
 
971
- * Improves the definition of the dependencies in the Radio Buttons, Checkbox and DropDown fields.
972
- * Modifies the script blocks to prevent that some optimization plugins affect the forms.
 
 
973
 
974
  == Upgrade Notice ==
975
 
976
- = 1.0.336 =
977
 
978
  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
3
  Donate link: http://cff.dwbooster.com
4
  Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
5
  Requires at least: 3.0.5
6
+ Tested up to: 5.4
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
55
  * Elementor.
56
  * Page Builder by SiteOrigin.
57
  * Beaver Builder.
58
+ * WPBakery Page Builder.
59
  * DIVI Builder.
60
  * For other editors, the shortcodes should be inserted using other controls of general purpose, like the controls for inserting HTML or shortcodes.
61
 
121
  = Features in Platinum version: =
122
 
123
  * All features of free, premium, and developer versions of the plugin.
124
+ * Includes an add-on to integrate the forms with the Easy Digital Downloads products
125
  * Includes the Google Analytics add-on to generate reports about the usage of forms, to identify the users actions and behaviors.
126
  * Includes the PayPal Pro add-on to ask for the credit card details of payers and charge it directly into your website without any redirection through the PayPal website.
127
  * Includes the Upload Files add-on to integrate the uploaded files in the website library, and add new mime types to WordPress.
132
  * Includes the "Signature" add-on to convert some form fields in "Signature" fields, allowing the users to sign with the mouse or directly in the touchscreens.
133
  * Includes the "iCal" add-on for sending the users an iCal file as part of the confirmation email after the form submission to be imported into most popular calendars like Outlook and Google Calendar.
134
  * Includes the "CSV Generator" add-on that allows to export dynamically the information collected by the form to a CSV file, and send it as attachment in the notification emails.
135
+ * Includes the "PDF Generator" add-on that allows to generate PDF files with the information collected by the forms, and send them as attachment of notification emails.
136
+ * Includes the "WebMerge" add-on to integrate the forms with the WebMerge Service (FormStack documents), and generate PDF and Office documents at runtime with the information collected by the forms.
137
  * Includes the "PrintFriendly" add-on to integrate the forms with the PrintFriendly API for generating PDF files after forms submissions, and attach the resulting files to the notification emails.
138
  * Includes the "MailChimp" add-on to add new members to the MailChimp Service using the data collected by the form.
139
  * Includes the "Mautic" add-on to add new contacts (or update the existent ones) into the Mautic Service, using the information collected by the form.
140
+ * Includes the "HubSpot" add-on to creates/updatess contacts in HubSpot, using the information collected by the form.
141
  * Includes the "Emma" add-on to add new members to the Emma Service using the data collected by the form.
142
  * Includes the "Twilio" add-on for sending notification messages (SMS) when the forms are submitted.
143
+ * Includes the "MailPoet" add-on to add new subscribers to the MailPoet's Mailing Lists (Both versions, MailPoet 2 and MailPoet 3).
144
  * Includes the "AffiliateWP" add-on to integrate the forms with the AffiliateWP plugin.
145
  * Authorize.Net add-on integrate the forms with the Authorize.Net payment gateway.
146
  * Stripe add-on integrate the forms with the Stripe payment gateway.
237
 
238
  * There is a huge number of equations that can't be recreated with simple mathematical operators, or the operations listed above, requiring "IF" conditions, here is a sample of the formula that can be used in that case:
239
 
240
+ `(function(){`
241
+ ` if(fieldname3 > 100) return fieldname1+fieldname2;`
242
+ ` if(fieldname3 <= 100) return fieldname1*fieldname2;`
243
+ `})();`
 
 
244
 
245
 
246
  * For complex equations where is required to define blocks of JavaScript code, you should use the following format:
288
 
289
  The icon with the "X" symbol, that appears when editing the contents of pages or posts, inserts a shortcode in the content with the structure:
290
 
291
+ `[CP_CALCULATED_FIELDS_VAR name="..."]`
292
+
293
+ The ... symbol should be replaced by the parameter or variable name, and will be the same name of the javascript variable. For example:
294
 
295
+ `[CP_CALCULATED_FIELDS_VAR name="varname"]`
296
 
297
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#javascript-variables "Create JavaScript Variables")
298
 
318
 
319
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#woocommerce-addon "WooCommerce add-on")
320
 
321
+ = Easy Digital Downloads add-on - Only available in the Platinum version of the plugin =
322
+
323
+ The Platinum version of the plugin includes the Easy Digital Downloads add-on, to integrate the forms created by the "Calculated Fields Form" with the EDD products.
324
+
325
+ [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#edd-addon "Easy Digital Downloads add-on")
326
+
327
  = SalesForce add-on - Only available in the Developer and Platinum versions of the plugin =
328
 
329
  The add-on allows create new leads in the SalesForce account with the data submitted by the forms.
416
 
417
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#csv-generator-addon "CSV Generator add-on")
418
 
419
+ = PDF Generator add-on - Only available in the Platinum version of the plugin =
420
+
421
+ The "PDF Generator" is an experimental add-on that allows to generate PDF files with the information collected by the forms, and send them as attachment of notification emails.
422
+
423
+ [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#pdf-generator-addon "PDF Generator add-on")
424
+
425
  = WebMerge add-on - Only available in the Platinum version of the plugin =
426
 
427
+ The "WebMerge" add-on integrates the forms with the WebMerge Service (FormStack documents), and generate PDF and Office documents at runtime with the information collected by the forms.
428
 
429
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#webmerge-addon "WebMerge add-on")
430
 
448
 
449
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#mautic-addon "Mautic add-on")
450
 
451
+ = HubSpot add-on - Only available in the Platinum version of the plugin =
452
+
453
+ Includes the "HubSpot" add-on to integrate the forms with HubSpot. This add-on creates/updates HubSpot contacts with the information collected by the website's forms.
454
+
455
+ [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#hubspot-addon "HubSpot add-on")
456
+
457
  = Emma add-on - Only available in the Platinum version of the plugin =
458
 
459
  Includes the "Emma" add-on to integrate the forms with the Emma Service to add new members to the Emma groups.
468
 
469
  = MailPoet add-on - Only available in the Platinum version of the plugin =
470
 
471
+ Includes the "MailPoet" add-on to add new subscribers to the MailPoet's Mailing Lists (Both versions, MailPoet 2 and MailPoet 3).
472
 
473
  [CLICK HERE for additional information ](http://cff.dwbooster.com/documentation#mailpoet-addon "MailPoet add-on")
474
 
935
  4. Inserting the form using Elementor
936
  5. Inserting the form using Page Builder by SiteOrigin
937
  6. Inserting the form using Beaver Builder
938
+ 7. Inserting the form using WPBakery Page Builder
939
  8. Sample calculated form
940
  9. Calculated field settings
941
  10. Advanced equations editor
949
 
950
  == Changelog ==
951
 
952
+ = 1.0.383 =
953
 
954
+ * Includes additional validations rules to identify possible conflicts with Hummingbird.
955
 
956
+ = 1.0.382 =
957
 
958
+ * Modifies the HTML Content field to integrate a HTML editor into the Content attribute.
959
 
960
+ = 1.0.381 =
961
 
962
+ * Modifies the container fields (DIV and Fieldsets) allowing rearrange the fields in columns.
963
+ * Fixes an issue with the fields' focus in the multi-pages forms.
964
+ * Allows to get the length of numbers.
965
+ * Includes the LATLNG operation in the DISTANCE operations module to get the latitude and longitude corresponding to an address, or the text FAIL (Developer and Platinum versions of the plugin).
966
 
967
+ = 1.0.380 =
968
 
969
+ * Fixes an issue displaying the captcha preview.
970
 
971
+ = 1.0.379 =
972
 
973
+ * Modifies some texts in the plugin's interface.
974
+ * Modifies some CSS rules.
975
+ * Improves the plugin's registration process (Professional, Developer, and Platinum versions)
976
+ * Modifies the PayTM add-on (Platinum version)
977
 
978
+ = 1.0.378 =
979
 
980
+ * Fixes an issue extracting the website's domain when the code is running as CLI.
981
 
982
+ = 1.0.377 =
983
 
984
+ * Improves the plugin's performance.
985
+ * Removes unnecessary attributes from the form's settings.
986
+ * Modifies some styles.
987
+ * Allows identify easier the errors with the notification emails, generating an entry in the Error Logs (Professional, Developer, and Platinum versions of the plugin).
988
+ * Modifies the PrintFriendly add-on, allowing configure the emails where attach the pdf files.
989
 
990
+ = 1.0.376 =
991
 
992
+ * Modifies the module that loads the plugin's resources.
993
+ * Modifies the module to export the forms. Now the forms list includes the form's id in front of forms' names, and the name of generated file, has the structure: export_id_yyyy-mm-dd_hhiiss.cpfm (Professional, Developer and Platinum versions of the plugin)
994
+ * Modifies the Users Permissions add-on to support the new attributes in the submissions shortcode: from, to, limit, order (Developer and Platinum versions of the plugin)
995
+ * Includes the DMSTODD operation in the Distance operations module to convert degrees, minutes and seconds values into decimal degrees (Developer and Platinum versions of the plugin).
996
+ * Modifies the SagePay add-on (Platinum version of the plugin)
997
 
998
+ = 1.0.375 =
999
 
1000
+ * Includes additional validations rules to identify possible conflicts with other optimization plugins.
1001
+ * Fixes an encoding issue with some ampersand symbols in generated URLs.
1002
 
1003
+ = 1.0.374 =
1004
 
1005
+ * It makes easier debugging the errors in the equations.
1006
+ * Includes the new CSS class hide-strong, it applies the display:none with the !important modifier.
1007
+ * Includes two new operations in the Managing Fields module, ACTIVATEFIELD and IGNOREFIELD for activating and ignoring the fields programmatically.
1008
+ * Reduces the space between fields after the forms' submissions.
1009
 
1010
  == Upgrade Notice ==
1011
 
1012
+ = 1.0.383 =
1013
 
1014
  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
@@ -3,7 +3,6 @@
3
  PHP Captcha by Codepeople.net
4
  http://www.codepeople.net
5
  */
6
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
7
  if(!defined('WP_DEBUG') || true != WP_DEBUG)
8
  {
9
  error_reporting(E_ERROR|E_PARSE);
3
  PHP Captcha by Codepeople.net
4
  http://www.codepeople.net
5
  */
 
6
  if(!defined('WP_DEBUG') || true != WP_DEBUG)
7
  {
8
  error_reporting(E_ERROR|E_PARSE);
changelog.txt CHANGED
@@ -1,5 +1,243 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.336 =
4
 
5
  * Modifies the code of the plugin for allowing the compatibility with outdated versions of PHP.
@@ -76,7 +314,7 @@
76
 
77
  = 1.0.319 =
78
 
79
- * Fixes an issue in the integration with Visual Composer.
80
 
81
  = 1.0.318 =
82
 
@@ -103,7 +341,7 @@
103
  = 1.0.315 =
104
 
105
  * Fixes some minor issues.
106
- * Implements a specific element to insert the forms using Visual Composer.
107
 
108
  = 1.0.314 =
109
 
1
  == Changelog ==
2
 
3
+ = 1.0.383 =
4
+
5
+ * Includes additional validations rules to identify possible conflicts with Hummingbird.
6
+
7
+ = 1.0.382 =
8
+
9
+ * Modifies the HTML Content field to integrate a HTML editor into the Content attribute.
10
+
11
+ = 1.0.381 =
12
+
13
+ * Modifies the container fields (DIV and Fieldsets) allowing rearrange the fields in columns.
14
+ * Fixes an issue with the fields' focus in the multi-pages forms.
15
+ * Allows to get the length of numbers.
16
+ * Includes the LATLNG operation in the DISTANCE operations module to get the latitude and longitude corresponding to an address, or the text FAIL (Developer and Platinum versions of the plugin).
17
+
18
+ = 1.0.380 =
19
+
20
+ * Fixes an issue displaying the captcha preview.
21
+
22
+ = 1.0.379 =
23
+
24
+ * Modifies some texts in the plugin's interface.
25
+ * Modifies some CSS rules.
26
+ * Improves the plugin's registration process (Professional, Developer, and Platinum versions)
27
+ * Modifies the PayTM add-on (Platinum version)
28
+
29
+ = 1.0.378 =
30
+
31
+ * Fixes an issue extracting the website's domain when the code is running as CLI.
32
+
33
+ = 1.0.377 =
34
+
35
+ * Improves the plugin's performance.
36
+ * Removes unnecessary attributes from the form's settings.
37
+ * Modifies some styles.
38
+ * Allows identify easier the errors with the notification emails, generating an entry in the Error Logs (Professional, Developer, and Platinum versions of the plugin).
39
+ * Modifies the PrintFriendly add-on, allowing configure the emails where attach the pdf files.
40
+
41
+ = 1.0.377 =
42
+
43
+ * Improves the plugin's performance.
44
+ * Removes unnecessary attributes from the form's settings.
45
+ * Modifies some styles.
46
+ * Allows identify easier the errors with the notification emails, generating an entry in the Error Logs (Professional, Developer, and Platinum versions of the plugin).
47
+ * Modifies the PrintFriendly add-on, allowing configure the emails where attach the pdf files.
48
+
49
+ = 1.0.376 =
50
+
51
+ * Modifies the module that loads the plugin's resources.
52
+ * Modifies the module to export the forms. Now the forms list includes the form's id in front of forms' names, and the name of generated file, has the structure: export_id_yyyy-mm-dd_hhiiss.cpfm (Professional, Developer and Platinum versions of the plugin)
53
+ * Modifies the Users Permissions add-on to support the new attributes in the submissions shortcode: from, to, limit, order (Developer and Platinum versions of the plugin)
54
+ * Includes the DMSTODD operation in the Distance operations module to convert degrees, minutes and seconds values into decimal degrees (Developer and Platinum versions of the plugin).
55
+ * Modifies the SagePay add-on (Platinum version of the plugin)
56
+
57
+ = 1.0.375 =
58
+
59
+ * Includes additional validations rules to identify possible conflicts with other optimization plugins.
60
+ * Fixes an encoding issue with some ampersand symbols in generated URLs.
61
+
62
+ = 1.0.374 =
63
+
64
+ * It makes easier debugging the errors in the equations.
65
+ * Includes the new CSS class hide-strong, it applies the display:none with the !important modifier.
66
+ * Includes two new operations in the Managing Fields module, ACTIVATEFIELD and IGNOREFIELD for activating and ignoring the fields programmatically.
67
+ * Reduces the space between fields after the forms' submissions.
68
+
69
+ = 1.0.373 =
70
+
71
+ * Includes additional validations rules to identify possible conflicts with other optimization plugins.
72
+
73
+ = 1.0.372 =
74
+
75
+ * Includes additional validations rules to identify possible conflicts with other optimization plugins.
76
+ * Includes the role attribute in the [CP_CALCULATED_FIELDS_RESULT_LIST] shortcode to display the submissions list for specific users roles.
77
+
78
+ = 1.0.371 =
79
+
80
+ * This update modifies the plugin's code to prevent poorly implemented optimization plugins affect the forms. Some optimization plugins do not distinguish between a javascript comment and a regular expression, breaking the plugins code in the optimization process.
81
+
82
+ = 1.0.370 =
83
+
84
+ * Includes two new operations: SUM and CONCATENATE. In javascript the plus operator is overloaded, it is used to sum numbers and concatenate texts, these operations solve the ambiguity.
85
+ * Includes a new section in the settings page of the plugin to identify possible causes of conflicts with third party plugins.
86
+
87
+ = 1.0.369 =
88
+
89
+ * Fixes a compatibility issue with the new version of Gutenberg editor.
90
+
91
+ = 1.0.368 =
92
+
93
+ * Includes the generateURL operation in the URL Operations Module to generate a valid URL, given a base URL, a plain object for parameters, and hash.
94
+ * Fixes the documentation of operations modules.
95
+ * Fixes an issue in the advanced equations editor that was ignoring some operations modules.
96
+
97
+ = 1.0.367 =
98
+
99
+ * Includes two new operations in the URL Operations Module: getURLHash and getURLPath
100
+ * Includes a new attribute in the troubleshoot area to fix the wrong encoding of notification emails (Professional, Developer and Platinum versions of the plugin).
101
+
102
+ = 1.0.366 =
103
+
104
+ * Some few changes in the interface.
105
+ * Allows to use the raw values of fields for filtering in the datasource fields: <%fieldname1|r%> (Developer and Platinum versions of the plugin).
106
+
107
+ = 1.0.365 =
108
+
109
+ * Includes new options into the settings page of the plugin for controlling the direct access to the forms and their APM versions.
110
+
111
+ = 1.0.364 =
112
+
113
+ * Implements the new operation LCM: least common multiple between two numbers.
114
+
115
+ = 1.0.363 =
116
+
117
+ * Modifies the next/previous page behavior, in multi-pages forms, for jumping pages without active fields.
118
+
119
+ = 1.0.362 =
120
+
121
+ * Fixes a conflict with third party plugins like MailChimp for WooCommerce.
122
+
123
+ = 1.0.361 =
124
+
125
+ * Improves the accessibility, duplicating the Preview button over the forms builder.
126
+ * Fixes an issue cloning the fields in the forms builder.
127
+ * Fixes an issue in the DATEDIFF operation (Developer and Platinum versions of the plugin)
128
+ * Modifies the server side code of datasource fields (Developer and Platinum versions of the plugin)
129
+
130
+ = 1.0.360 =
131
+
132
+ * Fixes an issue in the cffProxy operation.
133
+
134
+ = 1.0.359 =
135
+
136
+ * Modifies the styles to improve the forms appearance on small screens, when they are configure as left or right aligned.
137
+
138
+ = 1.0.358 =
139
+
140
+ * Modifies the database structure to allow the implementation of very long forms, with hundreds of fields.
141
+
142
+ = 1.0.357 =
143
+
144
+ * Fixes an issue in the expanded CSS editor, where the latest rows were being hidden or unaccessible.
145
+
146
+ = 1.0.356 =
147
+
148
+ * Includes a new icon over the CSS editor in the Form Settings tab, to expand (and collapse) the CSS editor to the viewport size, doing the CSS edition easier.
149
+
150
+ = 1.0.355 =
151
+
152
+ * Includes the URL Operations Module. The operations in this module allow to obtain the URLs of pages and their parameters, or the redirection to other pages.
153
+
154
+ = 1.0.354 =
155
+
156
+ * Fixes a possible vulnerability (fortunately only accessible by the website's administator). Many thanks to Ben Armstrong from https://Spider-security.co.uk for the detection of the vulnerability.
157
+ * Includes a new method for accessing to the jQuery representation of a field from the equations. Ex: to get the jQuery representation of the fieldname123 field: getField(123).jQueryRef();
158
+ * Includes new logs in the dependencies to detect possible issues easier.
159
+ * Includes new filters in the notification and confirmation emails, for accessing to the subjects and messages: cpcff_notification_email_subject, cpcff_notification_email_message, cpcff_confirmation_email_subject and cpcff_confirmation_email_message (Professional, Developer, and Platinum versions of the plugin)
160
+
161
+ = 1.0.353 =
162
+
163
+ * Fixes an issue in the CFFPROXY operation of the Third-party Connection module.
164
+
165
+ = 1.0.352 =
166
+
167
+ * Modifies the settings of some controls to adjust them to the latest version of WordPress.
168
+
169
+ = 1.0.351 =
170
+
171
+ * Modifies the module that generates the froms revisions.
172
+ * Modifies the MailChimp and EDD modules (Platinum version of the plugin).
173
+
174
+ = 1.0.350 =
175
+
176
+ * Improves the appearance of the dependencies.
177
+ * Modifies the access to the plugin's resources.
178
+
179
+ = 1.0.349 =
180
+
181
+ * Modifies the calculation's module for triggering the equationsQueueEmpty event when the queue of equations be emptied.
182
+ * Modifies the calculate buttons to allow display a calculation in progress indicator until all equations be evaluated.
183
+ * Prevents the form be submitted if there are equations pending to be evaluated, even if they dependen on external apis or services (Professional, Developer and Platinum versions of the plugin)
184
+ * Modifies the DISTANCE operations module, to tell the plugin the Google Maps APIs are being instantiated, and the evaluation of the equations is pending (Developer and Platinum versions of the plugin)
185
+
186
+ = 1.0.348 =
187
+
188
+ * Improves the appearance of the forms list in the medium-size screens.
189
+
190
+ = 1.0.347 =
191
+
192
+ * Modifies the validation on Currency and Number fields.
193
+
194
+ = 1.0.346 =
195
+
196
+ * Fixes some warnings.
197
+
198
+ = 1.0.345 =
199
+
200
+ * Fixes an issue in the number fields when the percent option is selected as their formats.
201
+ * Modifies the forms list to be ordered by their IDs in ascending way.
202
+ * Fixes an issue in the new forms, selecting the calculated field through the Request Cost attribute by default.
203
+ * Includes new class names into the Dashboard widget and the messages section (Professional, Developer and Platinum versions of the plugin)
204
+
205
+ = 1.0.344 =
206
+
207
+ * Improves the goToPage operation to allow jumping to a sepecific page in multi-pages forms, from button fields. Ex: for jumping to the third page in the form (the pages indexes start in 0), insert a button in the form and enter as its onclick event the piece of code: fbuilderjQuery.fbuilder.goToPage({form:this.form, to:2});
208
+
209
+ = 1.0.343 =
210
+
211
+ * Fixes an issue in the dependencies definition in the Radio Buttons, Checkbox, and DropDown fields.
212
+
213
+ = 1.0.342 =
214
+
215
+ * Modifies the CSS rules to improve the user experience in the forms builder when it is accessed from small screens like smartphones.
216
+
217
+ = 1.0.341 =
218
+
219
+ * Modifies the textarea and password controls.
220
+
221
+ = 1.0.340 =
222
+
223
+ * Fixes a warning in the cff_config file.
224
+ * Fixes a conflict between the DIVI integration module and the Classic WordPress Editor.
225
+ * Removes unnecessary code from the calculated fields.
226
+
227
+ = 1.0.339 =
228
+
229
+ * Modifies the integration with DIVI Page Builder.
230
+ * Allows leading with zeros the itemnumber passing as tag parameter the length attribute (length={{6}}) (Professional, Developer and Platinum versions)
231
+
232
+ = 1.0.338 =
233
+
234
+ * Modifies the Media fields. Includes a new attribute allowing to disable the download control from the players in the public forms.
235
+ * Modifies the cp_calculatedfieldsf_insert_in_database.php file to allow debugging easier the customized insertion queries (Developer and Platinum versions of the plugin)
236
+
237
+ = 1.0.337 =
238
+
239
+ * Includes a new form template, based on the styles of the new WP53.
240
+
241
  = 1.0.336 =
242
 
243
  * Modifies the code of the plugin for allowing the compatibility with outdated versions of PHP.
314
 
315
  = 1.0.319 =
316
 
317
+ * Fixes an issue in the integration with WPBakery Page Builder.
318
 
319
  = 1.0.318 =
320
 
341
  = 1.0.315 =
342
 
343
  * Fixes some minor issues.
344
+ * Implements a specific element to insert the forms using WPBakery Page Builder.
345
 
346
  = 1.0.314 =
347
 
config/cpcff_config.cfg.php CHANGED
@@ -10,6 +10,10 @@ define('CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING', (get_option('CP_CFF
10
  define('CP_CALCULATEDFIELDSF_USE_CACHE', 1 );
11
  define('CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation', 'true');
12
 
 
 
 
 
13
  // Admin pages
14
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE', 'cp_calculated_fields_form');
15
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE2', 'cp_calculated_fields_form_sub2');
@@ -129,22 +133,35 @@ if(!function_exists('cpcff_init_constants'))
129
  {
130
  function cpcff_init_constants()
131
  {
132
- // User emails
133
- if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email'))
 
 
 
 
134
  {
135
- $user_email = get_the_author_meta('user_email', get_current_user_id());
136
- $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
137
- $domain = preg_match("/[^\.\/]+(\.[^\.\/]+)?$/", $host, $matches) ? $matches[0] : $user_email;
138
- $pos = strpos($user_email, $domain);
139
- if ($pos === false) define('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email', 'admin@'.$domain );
140
- else define('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email', $user_email );
141
- }
 
142
 
143
- if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails'))
 
 
 
 
 
 
144
  {
145
- if(!isset($user_email)) $user_email = get_the_author_meta('user_email', get_current_user_id());
146
- define('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails', (!empty($user_email)) ? $user_email : CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email);
 
 
 
147
  }
148
  } // End cpcff_init_constants
149
- }
150
- ?>
10
  define('CP_CALCULATEDFIELDSF_USE_CACHE', 1 );
11
  define('CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation', 'true');
12
 
13
+ // Forms access:
14
+ define('CP_CALCULATEDFIELDSF_AMP', 1 );
15
+ define('CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', 1 );
16
+
17
  // Admin pages
18
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE', 'cp_calculated_fields_form');
19
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE2', 'cp_calculated_fields_form_sub2');
133
  {
134
  function cpcff_init_constants()
135
  {
136
+ $current_user_id = get_current_user_id();
137
+ $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
138
+ preg_match("/[^\.\/]+(\.[^\.\/]+)?$/", $host, $matches);
139
+ $domain = (!empty($matches)) ? $matches[0] : '';
140
+
141
+ if(!empty($current_user_id))
142
  {
143
+ // User emails
144
+ if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email'))
145
+ {
146
+ $user_email = get_the_author_meta('user_email', $current_user_id);
147
+ if(empty($user_email) || ($pos = strpos($user_email, $domain)) === false)
148
+ define('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email', 'admin@'.$domain );
149
+ else define('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email', $user_email );
150
+ }
151
 
152
+ if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails'))
153
+ {
154
+ if(!isset($user_email)) $user_email = get_the_author_meta('user_email', $current_user_id);
155
+ define('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails', (!empty($user_email)) ? $user_email : CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email);
156
+ }
157
+ }
158
+ else
159
  {
160
+ if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email'))
161
+ define('CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email', 'admin@'.$domain );
162
+
163
+ if(!defined('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails'))
164
+ define('CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails', CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email);
165
  }
166
  } // End cpcff_init_constants
167
+ }
 
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.336
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
@@ -16,7 +16,7 @@ if(!defined('WP_DEBUG') || true != WP_DEBUG)
16
  }
17
 
18
  // Defining main constants
19
- define('CP_CALCULATEDFIELDSF_VERSION', '1.0.336' );
20
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
21
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
22
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
@@ -31,9 +31,27 @@ require_once 'inc/cpcff_main.inc.php';
31
  CPCFF_MAIN::instance(); // Main plugin's object
32
 
33
  add_action( 'init', 'cp_calculated_fields_form_check_posted_data', 11 );
 
34
 
35
  // functions
36
  //------------------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  function cp_calculated_fields_form_check_posted_data() {
39
 
@@ -52,7 +70,8 @@ function cp_calculated_fields_form_check_posted_data() {
52
  $cpcff_main->form_preview(
53
  array(
54
  'shortcode_atts' => array('id' => @intval($_POST['cp_calculatedfieldsf_id'])),
55
- 'page_title' => __('Form Preview', 'calculated-fields-form')
 
56
  )
57
  );
58
  }
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.383
7
  Text Domain: calculated-fields-form
8
  Author: CodePeople
9
  Author URI: https://cff.dwbooster.com
16
  }
17
 
18
  // Defining main constants
19
+ define('CP_CALCULATEDFIELDSF_VERSION', '1.0.383' );
20
  define('CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
21
  define('CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
22
  define('CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
31
  CPCFF_MAIN::instance(); // Main plugin's object
32
 
33
  add_action( 'init', 'cp_calculated_fields_form_check_posted_data', 11 );
34
+ add_action( 'init', 'cp_calculated_fields_form_direct_form_access', 1 );
35
 
36
  // functions
37
  //------------------------------------------
38
+ function cp_calculated_fields_form_direct_form_access()
39
+ {
40
+ if(
41
+ get_option('CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS) &&
42
+ !empty($_GET['cff-form']) &&
43
+ @intval($_GET['cff-form'])
44
+ )
45
+ {
46
+ $cpcff_main = CPCFF_MAIN::instance();
47
+ $cpcff_main->form_preview(
48
+ array(
49
+ 'shortcode_atts' => array('id' => @intval($_GET['cff-form'])),
50
+ 'page_title' => 'CFF'
51
+ )
52
+ );
53
+ }
54
+ } // End cp_calculated_fields_form_direct_form_access
55
 
56
  function cp_calculated_fields_form_check_posted_data() {
57
 
70
  $cpcff_main->form_preview(
71
  array(
72
  'shortcode_atts' => array('id' => @intval($_POST['cp_calculatedfieldsf_id'])),
73
+ 'page_title' => __('Form Preview', 'calculated-fields-form'),
74
+ 'wp_die' => 1
75
  )
76
  );
77
  }
css/style.css CHANGED
@@ -141,6 +141,10 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
141
  .cff-revisions-container{float:right;padding:10px;}
142
  .cff-form-name-shortcode{font-size:0.8em;}
143
 
 
 
 
 
144
  @media only screen and (max-width: 640px){
145
  .cff-custom-table,
146
  .cff-custom-table thead,
@@ -176,6 +180,10 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
176
  .cff-form-name-shortcode{display:none;}
177
  .cff-revisions-container{float:none; width:100%;padding:10px 5%;}
178
  .cff_form_builder .postbox .cff-revisions-container select{width:90% !important;}
 
 
 
 
179
  }
180
  @media only screen and (max-width: 480px){
181
  .cff-custom-table input[type="button"]{margin:0 !important; width:100% !important;display:block !important;}
@@ -202,4 +210,15 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
202
  .cff-light-modal-close-icon{text-decoration: none; color: #fff; padding: 0; font-size: 18px; line-height: 24px; position: absolute; top: 5px; right: 5px; cursor: pointer;}
203
  .cff-light-modal:target{background: rgba(0, 0, 0, 0.5); display: -ms-flexbox; display: flex; visibility: visible;}
204
  @keyframes cff-basic{0%{opacity: 0;}100%{opacity: 1;}}
205
- .cff-light-modal iframe{width:100%;height:100%;border-radius: .2em; overflow:hidden;}
 
 
 
 
 
 
 
 
 
 
 
141
  .cff-revisions-container{float:right;padding:10px;}
142
  .cff-form-name-shortcode{font-size:0.8em;}
143
 
144
+ .cff-dependency-rule:not(:first-child){margin-top:10px;border-top:1px dashed #888;padding-top:10px;}
145
+ .choicesEditDep,.choicesEdit,
146
+ .cff-dependency-item{padding:5px 0;}
147
+
148
  @media only screen and (max-width: 640px){
149
  .cff-custom-table,
150
  .cff-custom-table thead,
180
  .cff-form-name-shortcode{display:none;}
181
  .cff-revisions-container{float:none; width:100%;padding:10px 5%;}
182
  .cff_form_builder .postbox .cff-revisions-container select{width:90% !important;}
183
+ .form-builder #tabs-2 div,
184
+ .form-builder #tabs-3 div{margin-bottom:10px;}
185
+ .form-builder #tabs-3 .groupBox label{display:block;margin-bottom:5px;}
186
+ table.form-table tbody{display:block;width:100% !important;}
187
  }
188
  @media only screen and (max-width: 480px){
189
  .cff-custom-table input[type="button"]{margin:0 !important; width:100% !important;display:block !important;}
210
  .cff-light-modal-close-icon{text-decoration: none; color: #fff; padding: 0; font-size: 18px; line-height: 24px; position: absolute; top: 5px; right: 5px; cursor: pointer;}
211
  .cff-light-modal:target{background: rgba(0, 0, 0, 0.5); display: -ms-flexbox; display: flex; visibility: visible;}
212
  @keyframes cff-basic{0%{opacity: 0;}100%{opacity: 1;}}
213
+ .cff-light-modal iframe{width:100%;height:100%;border-radius: .2em; overflow:hidden;}
214
+
215
+ /* WP EDITOR */
216
+ .cff_form_builder .CodeMirror{height:300px;}
217
+ .cff_form_builder #tabs-3 .CodeMirror{height:195px;}
218
+ .cff-editor-container.fullscreen{position:fixed !important;position:absolute;top:0;right:0;bottom:0;left:0;z-index:99999;background:#f2f5f7;}
219
+ .cff-editor-container.fullscreen .CodeMirror{height: 95% !important;}
220
+ .cff-editor-container .cff-editor-extend-shrink{float:left;width:24px;height:24px;cursor:pointer;display:inline-block;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M0 0h24v24H0z' fill='none'/><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/></svg>");}
221
+ .cff-editor-container.fullscreen .cff-editor-extend-shrink{-webkit-transform:rotate(180deg);-moz-transform: rotate(180deg);-ms-transform: rotate(180deg);-o-transform: rotate(180deg);transform: rotate(180deg);}
222
+
223
+ .cp-blink-me {animation: cp_blinker 2s linear infinite;text-transform: uppercase;}
224
+ @keyframes cp_blinker{50% {opacity: 0;}}
css/stylepublic.css CHANGED
@@ -327,7 +327,7 @@
327
  #fbuilder .top_aligned .fields label{}
328
  #fbuilder .top_aligned .fields .dfield{}
329
 
330
- @media print, screen and (min-width: 24em) {
331
  #fbuilder .left_aligned .fields:not(.section_breaks) label:not(:empty){float:left;width:35%;padding-right:10px;}
332
  #fbuilder .left_aligned .fields label:not(:empty) + .dfield{float:left;width:65%;}
333
  #fbuilder .right_aligned .fields:not(.section_breaks) label:not(:empty){float:left;width:35%;text-align:right;padding-right:10px;}
@@ -388,9 +388,9 @@
388
  *[dir="rtl"] #fbuilder .pbreak .pbNext,
389
  *[dir="rtl"] #fbuilder .pbSubmit{float:right;margin:10px 0 0 10px;}
390
 
391
- #fbuilder .pbreak.pb0 .pbPrevious{display:none;}
392
- #fbuilder .pbreak.pbEnd .pbNext{display:none;}
393
- #fbuilder .ignore{border:5px solid black;}
394
  #fbuilder fieldset{border:1px solid #ccc;padding:10px;}
395
  #fbuilder legend{border:1px solid #ccc;padding:5px 10px;}
396
  #fbuilder .cpcaptchalayer,.cp_subbtn{display:none;}
@@ -409,6 +409,7 @@
409
  #fbuilder .cff-summary-title:after{ content: ': '; }
410
 
411
  #fbuilder .hide{ display:none; }
 
412
  #fbuilder .clear{ clear:both; }
413
 
414
  #fbuilder .apply-coupon{display:inline-block;width:24px;height:24px;background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xMSAwLTIgLjktMiAydjE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMTEgMCAyLS45IDItMlY1YzAtMS4xLS44OS0yLTItMnptLTkgMTRsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=');cursor:pointer; vertical-align:middle;}
327
  #fbuilder .top_aligned .fields label{}
328
  #fbuilder .top_aligned .fields .dfield{}
329
 
330
+ @media print, screen and (min-width: 640px) {
331
  #fbuilder .left_aligned .fields:not(.section_breaks) label:not(:empty){float:left;width:35%;padding-right:10px;}
332
  #fbuilder .left_aligned .fields label:not(:empty) + .dfield{float:left;width:65%;}
333
  #fbuilder .right_aligned .fields:not(.section_breaks) label:not(:empty){float:left;width:35%;text-align:right;padding-right:10px;}
388
  *[dir="rtl"] #fbuilder .pbreak .pbNext,
389
  *[dir="rtl"] #fbuilder .pbSubmit{float:right;margin:10px 0 0 10px;}
390
 
391
+ #fbuilder .pbreak.pb0 .pbPrevious,
392
+ #fbuilder .pbreak.pbEnd .pbNext{display:none !important;}
393
+ #fbuilder .ignore{display:none;}
394
  #fbuilder fieldset{border:1px solid #ccc;padding:10px;}
395
  #fbuilder legend{border:1px solid #ccc;padding:5px 10px;}
396
  #fbuilder .cpcaptchalayer,.cp_subbtn{display:none;}
409
  #fbuilder .cff-summary-title:after{ content: ': '; }
410
 
411
  #fbuilder .hide{ display:none; }
412
+ #fbuilder .hide-strong{ display:none !important; }
413
  #fbuilder .clear{ clear:both; }
414
 
415
  #fbuilder .apply-coupon{display:inline-block;width:24px;height:24px;background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xMSAwLTIgLjktMiAydjE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMTEgMCAyLS45IDItMlY1YzAtMS4xLS44OS0yLTItMnptLTkgMTRsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=');cursor:pointer; vertical-align:middle;}
inc/cpcff_admin_int.inc.php CHANGED
@@ -44,8 +44,15 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
44
  <div class="wrap">
45
  <h1><?php
46
  print __( 'Calculated Fields Form', 'calculated-fields-form' ).' <span class="cff-form-name-shortcode">(<b>'.__('Form', 'calculated-fields-form').' '.CP_CALCULATEDFIELDSF_ID.' - '.$form_obj->get_option( 'form_name', '').'</b>) Shortcode: [CP_CALCULATED_FIELDS id="'.CP_CALCULATEDFIELDSF_ID.'"]</span>';
47
- ?></h1>
48
 
 
 
 
 
 
 
 
 
49
  <input type="button" name="backbtn" value="<?php esc_attr_e( 'Back to items list...', 'calculated-fields-form' ); ?>" onclick="document.location='admin.php?page=cp_calculated_fields_form';">
50
  <br /><br />
51
 
@@ -76,7 +83,8 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
76
  }
77
  ?>
78
  </select>
79
- <input type="button" name="cff_apply_revision" value="<?php print esc_attr('Load Revision', 'calculated-fields-form'); ?>" />
 
80
  </div>
81
  </div>
82
  <div class="inside">
@@ -231,7 +239,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
231
  <p class="submit">
232
  <input type="submit" name="save" id="save" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'calculated-fields-form' ); ?>" title="Saves the form's structure and settings and creates a revision" />
233
  <input type="button" name="previewbtn" id="previewbtn" class="button-primary" value="<?php esc_attr_e( 'Preview', 'calculated-fields-form' ); ?>" onclick="jQuery.fbuilder.preview( this );" title="Saves the form's structure only, and opens a preview windows" />
234
- | <input type="checkbox" name="cff-revisions-in-preview" CHECKED /><?php _e('Generate revisions in the form preview as well', 'calculated-fields-form'); ?>
235
  </p>
236
 
237
  <div id="metabox_basic_settings" class="postbox" >
@@ -274,16 +282,6 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
274
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Validation Settings', 'calculated-fields-form' ); ?></span></h3>
275
  <div class="inside">
276
  <table class="form-table">
277
- <tr valign="top">
278
- <th scope="row"><?php _e( 'Use Validation?', 'calculated-fields-form' ); ?></th>
279
- <td>
280
- <?php $option = $form_obj->get_option('vs_use_validation', CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation); ?>
281
- <select name="vs_use_validation">
282
- <option value="true"<?php if ($option == 'true') echo ' selected'; ?>><?php _e( 'Yes', 'calculated-fields-form' ); ?></option>
283
- <!--<option value="false"<?php if ($option == 'false') echo ' selected'; ?>>No</option>-->
284
- </select>
285
- </td>
286
- </tr>
287
  <tr valign="top">
288
  <th scope="row"><?php _e( '"is required" text', 'calculated-fields-form' ); ?>:</th>
289
  <td><input type="text" name="vs_text_is_required" size="40" value="<?php echo esc_attr($form_obj->get_option('vs_text_is_required', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required)); ?>" /></td>
@@ -493,7 +491,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
493
  <table class="form-table">
494
  <tr valign="top">
495
  <th scope="row"><?php _e( '"From" email', 'calculated-fields-form' ); ?></th>
496
- <td><input type="text" name="fp_from_email" size="40" value="<?php echo esc_attr($form_obj->get_option('fp_from_email', CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email)); ?>" /><br><i>Ex: admin@<?php echo str_replace('www.','',$_SERVER["HTTP_HOST"]); ?></i></td>
497
  </tr>
498
  <tr valign="top">
499
  <th scope="row"><?php _e( 'Destination emails (comma separated)', 'calculated-fields-form' ); ?></th>
@@ -510,7 +508,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
510
  <select name="fp_inc_additional_info">
511
  <option value="true"<?php if ($option == 'true') echo ' selected'; ?>><?php _e( 'Yes', 'calculated-fields-form' ); ?></option>
512
  <option value="false"<?php if ($option == 'false') echo ' selected'; ?>><?php _e( 'No', 'calculated-fields-form' ); ?></option>
513
- </select>&nbsp;<span><?php _e('If the "No" option is selected the plugin won\'t capture the IP address of users.','calculated-fields-form'); ?></span>
514
  </td>
515
  </tr>
516
  <tr valign="top">
44
  <div class="wrap">
45
  <h1><?php
46
  print __( 'Calculated Fields Form', 'calculated-fields-form' ).' <span class="cff-form-name-shortcode">(<b>'.__('Form', 'calculated-fields-form').' '.CP_CALCULATEDFIELDSF_ID.' - '.$form_obj->get_option( 'form_name', '').'</b>) Shortcode: [CP_CALCULATED_FIELDS id="'.CP_CALCULATEDFIELDSF_ID.'"]</span>';
 
47
 
48
+ if(get_option('CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS))
49
+ {
50
+ $url = CPCFF_AUXILIARY::site_url();
51
+ $url .= (strpos($url, '?') === false) ? '?' : '&';
52
+ $url .= 'cff-form='.CP_CALCULATEDFIELDSF_ID;
53
+ print '<br><span style="font-size:14px;font-style:italic;">'.__('Direct form URL', 'calculated-fields-form').': <a href="'.esc_attr($url).'" target="_blank">'.$url.'</a></span>';
54
+ }
55
+ ?></h1>
56
  <input type="button" name="backbtn" value="<?php esc_attr_e( 'Back to items list...', 'calculated-fields-form' ); ?>" onclick="document.location='admin.php?page=cp_calculated_fields_form';">
57
  <br /><br />
58
 
83
  }
84
  ?>
85
  </select>
86
+ <input type="button" name="cff_apply_revision" value="<?php print esc_attr('Load Revision', 'calculated-fields-form'); ?>" class="button" style="float:none;" />
87
+ <input type="button" name="previewbtn" id="previewbtn2" class="button-primary" value="<?php esc_attr_e( 'Preview', 'calculated-fields-form' ); ?>" onclick="jQuery.fbuilder.preview( this );" title="Saves the form's structure only, and opens a preview windows" />
88
  </div>
89
  </div>
90
  <div class="inside">
239
  <p class="submit">
240
  <input type="submit" name="save" id="save" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'calculated-fields-form' ); ?>" title="Saves the form's structure and settings and creates a revision" />
241
  <input type="button" name="previewbtn" id="previewbtn" class="button-primary" value="<?php esc_attr_e( 'Preview', 'calculated-fields-form' ); ?>" onclick="jQuery.fbuilder.preview( this );" title="Saves the form's structure only, and opens a preview windows" />
242
+ | <input type="checkbox" name="cff-revisions-in-preview" <?php if(get_option('CP_CALCULATEDFIELDSF_REVISIONS_IN_PREVIEW', true)) print 'CHECKED'; ?> /><?php _e('Generate revisions in the form preview as well', 'calculated-fields-form'); ?>
243
  </p>
244
 
245
  <div id="metabox_basic_settings" class="postbox" >
282
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Validation Settings', 'calculated-fields-form' ); ?></span></h3>
283
  <div class="inside">
284
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
285
  <tr valign="top">
286
  <th scope="row"><?php _e( '"is required" text', 'calculated-fields-form' ); ?>:</th>
287
  <td><input type="text" name="vs_text_is_required" size="40" value="<?php echo esc_attr($form_obj->get_option('vs_text_is_required', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required)); ?>" /></td>
491
  <table class="form-table">
492
  <tr valign="top">
493
  <th scope="row"><?php _e( '"From" email', 'calculated-fields-form' ); ?></th>
494
+ <td><input type="text" name="fp_from_email" size="40" value="<?php echo esc_attr($form_obj->get_option('fp_from_email', CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email)); ?>" /><br><b><em>Ex: admin@<?php echo str_replace('www.','',$_SERVER["HTTP_HOST"]); ?></em></b><br><em><?php _e( 'This email is required if the "From fixed email address" option is selected, or it is enabled the email copy to the user.', 'calculated-fields-form' ); ?></em></td>
495
  </tr>
496
  <tr valign="top">
497
  <th scope="row"><?php _e( 'Destination emails (comma separated)', 'calculated-fields-form' ); ?></th>
508
  <select name="fp_inc_additional_info">
509
  <option value="true"<?php if ($option == 'true') echo ' selected'; ?>><?php _e( 'Yes', 'calculated-fields-form' ); ?></option>
510
  <option value="false"<?php if ($option == 'false') echo ' selected'; ?>><?php _e( 'No', 'calculated-fields-form' ); ?></option>
511
+ </select>&nbsp;<em><?php _e('If the "No" option is selected the plugin won\'t capture the IP address of users.','calculated-fields-form'); ?></em>
512
  </td>
513
  </tr>
514
  <tr valign="top">
inc/cpcff_admin_int_list.inc.php CHANGED
@@ -17,13 +17,13 @@ $message = "";
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'] != '')
@@ -42,6 +42,8 @@ else if (isset($_GET['d']) && $_GET['d'] != '')
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) );
 
 
45
 
46
  $public_js_path = CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js';
47
  try{
@@ -148,16 +150,18 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
148
  var scr = document.getElementById("ccscriptload").value,
149
  chs = document.getElementById("cccharsets").value,
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>
157
  <div id="normal-sortables" class="meta-box-sortables">
158
  <div id="metabox_basic_settings" class="postbox" >
159
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Form List / Items List', 'calculated-fields-form' ); ?></span></h3>
160
- <div class="inside">
161
  <table cellspacing="10" class="cff-custom-table cff-forms-list">
162
  <thead>
163
  <tr>
@@ -166,7 +170,7 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
166
  </thead>
167
  <tbody>
168
  <?php
169
- $myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_TABLE );
170
  foreach ($myrows as $item)
171
  {
172
  ?>
@@ -206,6 +210,13 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
206
  <div id="metabox_basic_settings" class="postbox" >
207
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
208
  <div class="inside">
 
 
 
 
 
 
 
209
  <form name="updatesettings">
210
  <div style="border:1px solid #DADADA; padding:10px;">
211
  <p><?php _e( '<strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins, with the theme scripts or with the character encoding.', 'calculated-fields-form' ); ?></p>
@@ -228,6 +239,10 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
228
  <br />
229
  <?php _e( 'Activate Javascript Cache', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccjscache" id="ccjscache" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) ) ? 'CHECKED' : ''; ?> />
230
  <br /><br />
 
 
 
 
231
  <?php _e( 'Do not load the forms with crawlers', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccexcludecrawler" id="ccexcludecrawler" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', false ) ) ? 'CHECKED' : ''; ?> /><br /><i><?php _e( '* The forms are not loaded when website is being indexed by searchers.', 'calculated-fields-form' ); ?></i>
232
  <br /><br />
233
  <input type="button" onclick="cp_updateConfig();" name="gobtn" value="<?php esc_attr_e( 'UPDATE', 'calculated-fields-form' ); ?>" />
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"])) ? sanitize_text_field(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"])) ? sanitize_text_field(stripcslashes($_GET["name"])) : '');
27
  $message = __( "Item updated", 'calculated-fields-form' );
28
  }
29
  else if (isset($_GET['d']) && $_GET['d'] != '')
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) );
45
+ update_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS',(isset($_GET["df"]) && $_GET["df"]=="1" ? 1 : 0) );
46
+ update_option( 'CP_CALCULATEDFIELDSF_AMP', (isset($_GET["amp"]) && $_GET["amp"]=="1" ? 1 : 0) );
47
 
48
  $public_js_path = CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js';
49
  try{
150
  var scr = document.getElementById("ccscriptload").value,
151
  chs = document.getElementById("cccharsets").value,
152
  jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
153
+ df = (document.getElementById("ccdirectform").checked) ? 1 : 0,
154
+ amp = (document.getElementById("ccampform").checked) ? 1 : 0,
155
  ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
156
 
157
+ document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&jsc='+jsc+'&df='+df+'&amp='+amp+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-update-general-settings' ); ?>';
158
  }
159
  }
160
  </script>
161
  <div id="normal-sortables" class="meta-box-sortables">
162
  <div id="metabox_basic_settings" class="postbox" >
163
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Form List / Items List', 'calculated-fields-form' ); ?></span></h3>
164
+ <div class="inside" style="overflow-x:auto;">
165
  <table cellspacing="10" class="cff-custom-table cff-forms-list">
166
  <thead>
167
  <tr>
170
  </thead>
171
  <tbody>
172
  <?php
173
+ $myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_TABLE." ORDER BY id ASC" );
174
  foreach ($myrows as $item)
175
  {
176
  ?>
210
  <div id="metabox_basic_settings" class="postbox" >
211
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
212
  <div class="inside">
213
+ <?php
214
+ $compatibility_warnings = $cpcff_main->compatibility_warnings();
215
+ if(!empty($compatibility_warnings))
216
+ {
217
+ print '<div style="margin:10px 0; border:1px dashed #FF0000; padding:10px; color:red;">'.$compatibility_warnings.'</div>';
218
+ }
219
+ ?>
220
  <form name="updatesettings">
221
  <div style="border:1px solid #DADADA; padding:10px;">
222
  <p><?php _e( '<strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins, with the theme scripts or with the character encoding.', 'calculated-fields-form' ); ?></p>
239
  <br />
240
  <?php _e( 'Activate Javascript Cache', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccjscache" id="ccjscache" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) ) ? 'CHECKED' : ''; ?> />
241
  <br /><br />
242
+ <?php _e( 'Allows to access the forms directly', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccdirectform" id="ccdirectform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS ) ) ? 'CHECKED' : ''; ?> />
243
+ <br /><br />
244
+ <?php _e( 'Allows to access the forms from amp pages', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccampform" id="ccampform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_AMP', CP_CALCULATEDFIELDSF_AMP ) ) ? 'CHECKED' : ''; ?> />
245
+ <br /><br />
246
  <?php _e( 'Do not load the forms with crawlers', 'calculated-fields-form' ); ?>: <input type="checkbox" name="ccexcludecrawler" id="ccexcludecrawler" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', false ) ) ? 'CHECKED' : ''; ?> /><br /><i><?php _e( '* The forms are not loaded when website is being indexed by searchers.', 'calculated-fields-form' ); ?></i>
247
  <br /><br />
248
  <input type="button" onclick="cp_updateConfig();" name="gobtn" value="<?php esc_attr_e( 'UPDATE', 'calculated-fields-form' ); ?>" />
inc/cpcff_amp.inc.php CHANGED
@@ -33,7 +33,10 @@ if(!class_exists('CPCFF_AMP'))
33
  */
34
  public function amp_init()
35
  {
36
- if(!empty($_GET['cff-form']))
 
 
 
37
  {
38
  $atts = $this->_params_to_attrs();
39
  // The AMP page has not been redirected so it is redirected from the server side
@@ -51,6 +54,7 @@ if(!class_exists('CPCFF_AMP'))
51
  $request_uri .= 'cff-amp-redirected=1';
52
 
53
  wp_redirect( "https://$host$request_uri" );
 
54
  exit;
55
  }
56
  else
@@ -123,7 +127,7 @@ if(!class_exists('CPCFF_AMP'))
123
  $message.
124
  '</body>'.
125
  '</html>';
126
-
127
  exit;
128
  }
129
  }
@@ -139,6 +143,7 @@ if(!class_exists('CPCFF_AMP'))
139
  */
140
  public function is_amp()
141
  {
 
142
  if(!empty($_REQUEST['isamp'])) return true;
143
  if(empty($_GET['non-amp']))
144
  {
@@ -160,8 +165,8 @@ if(!class_exists('CPCFF_AMP'))
160
  {
161
  $url = CPCFF_AUXILIARY::site_url();
162
  $url = preg_replace('/^http\:/i', 'https:', $url);
163
- $url .= (strpos($url, '?') === false) ? '?' : ':';
164
- $url .= 'cff-form='.((!empty($atts['id']))?$atts['id'] : '');
165
  $height = '';
166
  foreach($atts as $attr_name => $attr_value)
167
  {
@@ -211,7 +216,7 @@ if(!class_exists('CPCFF_AMP'))
211
  /**
212
  * Converts the URL parameters related with the form in the redirection process required for load the forms into the amp-frames
213
  *
214
- * The parameter cff-form is converted in the id attribute,
215
  * and the parameteres with the name: cff-form-attr-<param>, are converted in the attributes <param>
216
  *
217
  * @return array $attrs.
@@ -223,7 +228,7 @@ if(!class_exists('CPCFF_AMP'))
223
  {
224
  foreach($_GET as $param => $value)
225
  {
226
- if( $param == 'cff-form')
227
  $attrs['id'] = @intval($value);
228
  elseif(preg_match('/^cff\-form\-attr\-/i', $param))
229
  {
33
  */
34
  public function amp_init()
35
  {
36
+ if(
37
+ !empty($_GET['cff-amp-form']) &&
38
+ get_option('CP_CALCULATEDFIELDSF_AMP', CP_CALCULATEDFIELDSF_AMP)
39
+ )
40
  {
41
  $atts = $this->_params_to_attrs();
42
  // The AMP page has not been redirected so it is redirected from the server side
54
  $request_uri .= 'cff-amp-redirected=1';
55
 
56
  wp_redirect( "https://$host$request_uri" );
57
+ remove_all_actions('shutdown');
58
  exit;
59
  }
60
  else
127
  $message.
128
  '</body>'.
129
  '</html>';
130
+ remove_all_actions('shutdown');
131
  exit;
132
  }
133
  }
143
  */
144
  public function is_amp()
145
  {
146
+ if(!get_option('CP_CALCULATEDFIELDSF_AMP', CP_CALCULATEDFIELDSF_AMP)) return false;
147
  if(!empty($_REQUEST['isamp'])) return true;
148
  if(empty($_GET['non-amp']))
149
  {
165
  {
166
  $url = CPCFF_AUXILIARY::site_url();
167
  $url = preg_replace('/^http\:/i', 'https:', $url);
168
+ $url .= (strpos($url, '?') === false) ? '?' : '&';
169
+ $url .= 'cff-amp-form='.((!empty($atts['id']))?$atts['id'] : '');
170
  $height = '';
171
  foreach($atts as $attr_name => $attr_value)
172
  {
216
  /**
217
  * Converts the URL parameters related with the form in the redirection process required for load the forms into the amp-frames
218
  *
219
+ * The parameter cff-amp-form is converted in the id attribute,
220
  * and the parameteres with the name: cff-form-attr-<param>, are converted in the attributes <param>
221
  *
222
  * @return array $attrs.
228
  {
229
  foreach($_GET as $param => $value)
230
  {
231
+ if( $param == 'cff-amp-form')
232
  $attrs['id'] = @intval($value);
233
  elseif(preg_match('/^cff\-form\-attr\-/i', $param))
234
  {
inc/cpcff_auxiliary.inc.php CHANGED
@@ -35,6 +35,13 @@ if(!class_exists('CPCFF_AUXILIARY'))
35
  */
36
  private static $_wp_url;
37
 
 
 
 
 
 
 
 
38
  /**
39
  * ID of the current blog.
40
  *
@@ -93,6 +100,21 @@ if(!class_exists('CPCFF_AUXILIARY'))
93
  return rtrim(self::$_wp_url, '/');
94
  } // End wp_url
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  /**
97
  * Removes Bom characters.
98
  *
35
  */
36
  private static $_wp_url;
37
 
38
+ /**
39
+ * Current URL.
40
+ *
41
+ * @var string $_current_url
42
+ */
43
+ private static $_current_url;
44
+
45
  /**
46
  * ID of the current blog.
47
  *
100
  return rtrim(self::$_wp_url, '/');
101
  } // End wp_url
102
 
103
+ /**
104
+ * Returns the URL to the current post url.
105
+ *
106
+ * @return string.
107
+ */
108
+ public static function wp_current_url()
109
+ {
110
+ if(is_admin()) return self::site_url();
111
+ if(!empty(self::$_current_url)) return self::$_current_url;
112
+
113
+ global $wp;
114
+ self::$_current_url = home_url(add_query_arg(array(),$wp->request));
115
+ return self::$_current_url;
116
+ } // End wp_current_url
117
+
118
  /**
119
  * Removes Bom characters.
120
  *
inc/cpcff_banner.inc.php CHANGED
@@ -33,7 +33,7 @@ if(!function_exists( 'codepeople_add_promote_banner' ))
33
  !empty($codepeople_promote_banner_plugins[$_POST['codepeople_promote_banner_plugin']]['plugin_url'])
34
  )
35
  {
36
- print '<script>document.location.href="'.esc_js($codepeople_promote_banner_plugins[$_POST['codepeople_promote_banner_plugin']]['plugin_url']).'";</script>';
37
  }
38
  }
39
 
33
  !empty($codepeople_promote_banner_plugins[$_POST['codepeople_promote_banner_plugin']]['plugin_url'])
34
  )
35
  {
36
+ print '<script>document.location.href="'.str_replace('&amp;','&',esc_js($codepeople_promote_banner_plugins[$_POST['codepeople_promote_banner_plugin']]['plugin_url'])).'";</script>';
37
  }
38
  }
39
 
inc/cpcff_compatibility.inc.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Operations for checking the compatibility with other plugins: CPCFF_COMPATIBILITY class
4
+ *
5
+ * @package CFF.
6
+ * @since 1.0.370
7
+ */
8
+
9
+ if(!class_exists('CPCFF_COMPATIBILITY'))
10
+ {
11
+ class CPCFF_COMPATIBILITY
12
+ {
13
+ private static function init()
14
+ {
15
+ return array(
16
+ array(
17
+ 'plugin' => 'Fast Velocity Minify',
18
+ 'check' => 'fvm_compat_checker',
19
+ 'type' => 'function',
20
+ 'mssg' => __('There is active the <b>Fast Velocity Minify</b> plugin. If the forms are not visible, please try disabling the <i>"Disable minification on JS files"</i> or <i>"Disable JavaScript processing"</i> options in the <b>Fast Velocity Minify</b> settings.', 'calculated-fields-form')
21
+ ),
22
+ array(
23
+ 'plugin' => 'Autoptimize',
24
+ 'check' => 'autoptimize',
25
+ 'type' => 'function',
26
+ 'mssg' => __('There is active the <b>Autoptimize</b> plugin. If the forms are not visible, please try disabling the <i>"Force JavaScript in &lt;head&gt;"</i> option in the <b>Autoptimize</b> settings, or remove the jQuery file from the <i>"Exclude scripts from Autoptimize"</i> one.', 'calculated-fields-form')
27
+ ),
28
+ array(
29
+ 'plugin' => 'LiteSpeed Cache',
30
+ 'check' => 'run_litespeed_cache',
31
+ 'type' => 'function',
32
+ 'mssg' => __('There is active the <b>LiteSpeed Cache</b> plugin. If the forms are not visible, please try disabling the <i>"JS Combine"</i> option in the <b>Optimize</b> tab of <b>LiteSpeed Cache</b> settings.', 'calculated-fields-form')
33
+ ),
34
+ array(
35
+ 'plugin' => 'WP Rocket',
36
+ 'check' => 'WP_ROCKET_VERSION',
37
+ 'type' => 'constant',
38
+ 'mssg' => __('There is active the <b>WP Rocket</b> plugin. If the forms are not visible, please try disabling the <i>"Combine JavaScript files"</i> option in the <b>FILE OPTIMIZATION</b> tab of <b>WP Rocket</b> settings, and remember to clear the website cache.', 'calculated-fields-form')
39
+ ),
40
+ array(
41
+ 'plugin' => 'SG Optimizer',
42
+ 'check' => 'siteground_optimizer_helper',
43
+ 'type' => 'object',
44
+ 'mssg' => __('There is active the <b>SG Optimizer</b> plugin. If the forms are not visible, please try disabling the options: <i>"Minify the HTML Output"</i> and <i>"Minify JavaScript Files"</i> in the <b>SG Optimizer</b> settings, and remember to purge the website cache.', 'calculated-fields-form')
45
+ ),
46
+ array(
47
+ 'plugin' => 'Hummingbird',
48
+ 'check' => 'WPHB_VERSION',
49
+ 'type' => 'constant',
50
+ 'mssg' => __('There is active the <b>Hummingbird</b> plugin. If the forms are not visible, check the <i>"Hummingbird &gt; Asset Optimization"</i> options. Make sure that jQuery or other required scripts are not configured to load after the page loads. Remember to purge the website cache, after edit the plugin settings.', 'calculated-fields-form')
51
+ ),
52
+ );
53
+ } // End init
54
+
55
+ private static function format_warning_mssg($plugin)
56
+ {
57
+ return '<div class="cff-compatibility-warning">'.$plugin['mssg'].'</div>';
58
+ } // End format_warning_mssg
59
+
60
+ public static function warnings()
61
+ {
62
+ $plugins = self::init();
63
+ $warning_mssgs = '';
64
+ foreach($plugins as $plugin)
65
+ {
66
+ switch($plugin['type'])
67
+ {
68
+ case 'function':
69
+ if(function_exists($plugin['check']))
70
+ {
71
+ $warning_mssgs .= self::format_warning_mssg($plugin);
72
+ }
73
+ break;
74
+ case 'class':
75
+ if(class_exists($plugin['check']))
76
+ {
77
+ $warning_mssgs .= self::format_warning_mssg($plugin);
78
+ }
79
+ break;
80
+ case 'object':
81
+ if(isset($GLOBALS[$plugin['check']]))
82
+ {
83
+ $warning_mssgs .= self::format_warning_mssg($plugin);
84
+ }
85
+ break;
86
+ case 'constant':
87
+ if(defined($plugin['check']))
88
+ {
89
+ $warning_mssgs .= self::format_warning_mssg($plugin);
90
+ }
91
+ break;
92
+ }
93
+ }
94
+ return $warning_mssgs;
95
+ } // End blog_id
96
+
97
+ } // End CPCFF_COMPATIBILITY
98
+ }
inc/cpcff_form.inc.php CHANGED
@@ -110,7 +110,7 @@ if(!class_exists('CPCFF_FORM'))
110
  // Paypal settings
111
  'enable_paypal' => CP_CALCULATEDFIELDSF_DEFAULT_ENABLE_PAYPAL,
112
  'paypal_email' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_EMAIL,
113
- 'request_cost' => CP_CALCULATEDFIELDSF_DEFAULT_COST,
114
  'paypal_product_name' => CP_CALCULATEDFIELDSF_DEFAULT_PRODUCT_NAME,
115
  'currency' => CP_CALCULATEDFIELDSF_DEFAULT_CURRENCY,
116
  'paypal_language' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_LANGUAGE,
@@ -274,7 +274,7 @@ if(!class_exists('CPCFF_FORM'))
274
  'paypal_zero_payment' => (isset($params["paypal_zero_payment"])) ? $params["paypal_zero_payment"] : 0,
275
 
276
  // Texts
277
- 'vs_use_validation' => (isset($params['vs_use_validation'])) ? $params['vs_use_validation'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation,
278
  'vs_text_is_required' => (isset($params['vs_text_is_required'])) ? $params['vs_text_is_required'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required,
279
  'vs_text_is_email' => (isset($params['vs_text_is_email'])) ? $params['vs_text_is_email'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_email,
280
  'vs_text_datemmddyyyy' => (isset($params['vs_text_datemmddyyyy'])) ? $params['vs_text_datemmddyyyy'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_datemmddyyyy,
@@ -310,7 +310,16 @@ if(!class_exists('CPCFF_FORM'))
310
  array( '%d' )
311
  );
312
 
313
- if($updated_rows !== false && (!isset($params['preview']) || isset($params['cff-revisions-in-preview']))) $this->_revisions_obj->create_revision();
 
 
 
 
 
 
 
 
 
314
  return $updated_rows;
315
  } // End save_settings
316
 
110
  // Paypal settings
111
  'enable_paypal' => CP_CALCULATEDFIELDSF_DEFAULT_ENABLE_PAYPAL,
112
  'paypal_email' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_EMAIL,
113
+ 'request_cost' => 'fieldname1',
114
  'paypal_product_name' => CP_CALCULATEDFIELDSF_DEFAULT_PRODUCT_NAME,
115
  'currency' => CP_CALCULATEDFIELDSF_DEFAULT_CURRENCY,
116
  'paypal_language' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_LANGUAGE,
274
  'paypal_zero_payment' => (isset($params["paypal_zero_payment"])) ? $params["paypal_zero_payment"] : 0,
275
 
276
  // Texts
277
+ 'vs_use_validation' => CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation,
278
  'vs_text_is_required' => (isset($params['vs_text_is_required'])) ? $params['vs_text_is_required'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required,
279
  'vs_text_is_email' => (isset($params['vs_text_is_email'])) ? $params['vs_text_is_email'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_email,
280
  'vs_text_datemmddyyyy' => (isset($params['vs_text_datemmddyyyy'])) ? $params['vs_text_datemmddyyyy'] : CP_CALCULATEDFIELDSF_DEFAULT_vs_text_datemmddyyyy,
310
  array( '%d' )
311
  );
312
 
313
+ // Revisions
314
+ update_option('CP_CALCULATEDFIELDSF_REVISIONS_IN_PREVIEW', isset($params['cff-revisions-in-preview']) ? true : false);
315
+
316
+ if(
317
+ $updated_rows !== false &&
318
+ (
319
+ !isset($params['preview']) ||
320
+ get_option('CP_CALCULATEDFIELDSF_REVISIONS_IN_PREVIEW')
321
+ )
322
+ ) $this->_revisions_obj->create_revision();
323
  return $updated_rows;
324
  } // End save_settings
325
 
inc/cpcff_install_uninstall.inc.php CHANGED
@@ -166,6 +166,8 @@ if(!class_exists('CPCFF_INSTALLER'))
166
  paypal_recurrent varchar(20) DEFAULT '' NOT NULL ,
167
  paypal_recurrent_setup varchar(20) DEFAULT '' NOT NULL ,
168
  paypal_recurrent_setup_days varchar(20) DEFAULT '' NOT NULL ,
 
 
169
  paypal_identify_prices varchar(20) DEFAULT '' NOT NULL ,
170
  paypal_zero_payment varchar(10) DEFAULT '' NOT NULL ,
171
  paypal_base_amount VARCHAR(250),
@@ -182,7 +184,7 @@ if(!class_exists('CPCFF_INSTALLER'))
182
  cv_background VARCHAR(20) DEFAULT '' NOT NULL,
183
  cv_border VARCHAR(20) DEFAULT '' NOT NULL,
184
  cv_text_enter_valid_captcha VARCHAR(200) DEFAULT '' NOT NULL,
185
- cache text DEFAULT '' NOT NULL,
186
  UNIQUE KEY id (id)
187
  ) $charset_collate;";
188
 
@@ -252,6 +254,8 @@ if(!class_exists('CPCFF_INSTALLER'))
252
  'paypal_recurrent' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT,
253
  'paypal_recurrent_setup' => '',
254
  'paypal_recurrent_setup_days' => '15',
 
 
255
  'paypal_identify_prices' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_IDENTIFY_PRICES,
256
  'paypal_zero_payment' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT,
257
 
166
  paypal_recurrent varchar(20) DEFAULT '' NOT NULL ,
167
  paypal_recurrent_setup varchar(20) DEFAULT '' NOT NULL ,
168
  paypal_recurrent_setup_days varchar(20) DEFAULT '' NOT NULL ,
169
+ paypal_recurrent_times varchar(20) DEFAULT '' NOT NULL ,
170
+ paypal_recurrent_times_field varchar(20) DEFAULT '' NOT NULL ,
171
  paypal_identify_prices varchar(20) DEFAULT '' NOT NULL ,
172
  paypal_zero_payment varchar(10) DEFAULT '' NOT NULL ,
173
  paypal_base_amount VARCHAR(250),
184
  cv_background VARCHAR(20) DEFAULT '' NOT NULL,
185
  cv_border VARCHAR(20) DEFAULT '' NOT NULL,
186
  cv_text_enter_valid_captcha VARCHAR(200) DEFAULT '' NOT NULL,
187
+ cache longtext DEFAULT '' NOT NULL,
188
  UNIQUE KEY id (id)
189
  ) $charset_collate;";
190
 
254
  'paypal_recurrent' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT,
255
  'paypal_recurrent_setup' => '',
256
  'paypal_recurrent_setup_days' => '15',
257
+ 'paypal_recurrent_times' => '0',
258
+ 'paypal_recurrent_times_field' => '0',
259
  'paypal_identify_prices' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_IDENTIFY_PRICES,
260
  'paypal_zero_payment' => CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT,
261
 
inc/cpcff_main.inc.php CHANGED
@@ -393,7 +393,16 @@ if(!class_exists('CPCFF_MAIN'))
393
  $message .= ob_get_contents();
394
  ob_end_clean();
395
  $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
396
- wp_die($message, $page_title, 200);
 
 
 
 
 
 
 
 
 
397
  }
398
  } // End form_preview
399
 
@@ -670,6 +679,7 @@ if(!class_exists('CPCFF_MAIN'))
670
  {
671
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/js/fbuilder-loader-admin.php';
672
  }
 
673
  exit;
674
  }
675
  } // End _load_controls_scrips
@@ -757,7 +767,7 @@ if(!class_exists('CPCFF_MAIN'))
757
  get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) &&
758
  file_exists( CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js' )
759
  ) ? plugins_url('/js/cache/all.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH)
760
- : CPCFF_AUXILIARY::site_url().( ( strpos( CPCFF_AUXILIARY::site_url(),'?' ) === false ) ? '/?' : '&' ).'cp_cff_resources=public&min='.get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE );
761
 
762
  $config_json = $this->_get_form_configuration($formid);
763
 
@@ -773,10 +783,10 @@ if(!class_exists('CPCFF_MAIN'))
773
  wp_enqueue_script( "jquery-ui-slider" );
774
 
775
  wp_deregister_script('query-stringify');
776
- wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH), array(), 'pro');
777
 
778
  wp_deregister_script('cp_calculatedfieldsf_validate_script');
779
- wp_register_script('cp_calculatedfieldsf_validate_script', plugins_url('/js/jquery.validate.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
780
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script', $public_js_path, array("jquery","jquery-ui-core","jquery-ui-button","jquery-ui-widget","jquery-ui-position","jquery-ui-tooltip","query-stringify","cp_calculatedfieldsf_validate_script", "jquery-ui-datepicker", "jquery-ui-slider"), CP_CALCULATEDFIELDSF_VERSION, true );
781
 
782
  wp_localize_script('cp_calculatedfieldsf_builder_script', 'cp_calculatedfieldsf_fbuilder_config_'.self::$form_counter, array('obj' => $config_json));
@@ -832,6 +842,12 @@ if(!class_exists('CPCFF_MAIN'))
832
  } // End _public_resources
833
 
834
  /** TROUBLESHOOTS SECTION **/
 
 
 
 
 
 
835
  private function troubleshoots()
836
  {
837
  if(!$this->_is_admin)
393
  $message .= ob_get_contents();
394
  ob_end_clean();
395
  $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
396
+ remove_all_actions('shutdown');
397
+ if(!empty($atts['wp_die']))
398
+ {
399
+ wp_die($message, $page_title, 200);
400
+ }
401
+ else
402
+ {
403
+ print $message;
404
+ exit;
405
+ }
406
  }
407
  } // End form_preview
408
 
679
  {
680
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/js/fbuilder-loader-admin.php';
681
  }
682
+ remove_all_actions('shutdown');
683
  exit;
684
  }
685
  } // End _load_controls_scrips
767
  get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) &&
768
  file_exists( CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js' )
769
  ) ? plugins_url('/js/cache/all.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH)
770
+ : CPCFF_AUXILIARY::wp_current_url().( ( strpos( CPCFF_AUXILIARY::wp_current_url(),'?' ) === false ) ? '/?' : '&' ).'cp_cff_resources=public&min='.get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE );
771
 
772
  $config_json = $this->_get_form_configuration($formid);
773
 
783
  wp_enqueue_script( "jquery-ui-slider" );
784
 
785
  wp_deregister_script('query-stringify');
786
+ wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH), array('jquery'), 'pro');
787
 
788
  wp_deregister_script('cp_calculatedfieldsf_validate_script');
789
+ wp_register_script('cp_calculatedfieldsf_validate_script', plugins_url('/js/jquery.validate.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH), array('jquery'), 'pro');
790
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script', $public_js_path, array("jquery","jquery-ui-core","jquery-ui-button","jquery-ui-widget","jquery-ui-position","jquery-ui-tooltip","query-stringify","cp_calculatedfieldsf_validate_script", "jquery-ui-datepicker", "jquery-ui-slider"), CP_CALCULATEDFIELDSF_VERSION, true );
791
 
792
  wp_localize_script('cp_calculatedfieldsf_builder_script', 'cp_calculatedfieldsf_fbuilder_config_'.self::$form_counter, array('obj' => $config_json));
842
  } // End _public_resources
843
 
844
  /** TROUBLESHOOTS SECTION **/
845
+ public function compatibility_warnings()
846
+ {
847
+ require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_compatibility.inc.php';
848
+ return CPCFF_COMPATIBILITY::warnings();
849
+ } // End troubleshoots
850
+
851
  private function troubleshoots()
852
  {
853
  if(!$this->_is_admin)
inc/cpcff_page_builders.inc.php CHANGED
@@ -66,6 +66,10 @@ if(!class_exists('CPCFF_PAGE_BUILDERS'))
66
  {
67
  if(class_exists('ET_Builder_Module'))
68
  {
 
 
 
 
69
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/pagebuilders/divi/cff.pb.php';
70
  }
71
  } // End divi_editor
@@ -83,7 +87,7 @@ if(!class_exists('CPCFF_PAGE_BUILDERS'))
83
  wp_enqueue_script('cp_calculatedfieldsf_gutenberg_editor', plugins_url('/pagebuilders/gutenberg/assets/js/gutenberg.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
84
 
85
  $url = CPCFF_AUXILIARY::site_url();
86
- $url .= ((strpos($url, '?') === false) ? '?' : '&').'cff-editor-preview=1&cff-amp-redirected=1&cff-form=';
87
  $config = array(
88
  'url' => $url,
89
  'forms' => array(),
66
  {
67
  if(class_exists('ET_Builder_Module'))
68
  {
69
+ if(isset($_GET['et_fb']))
70
+ {
71
+ wp_enqueue_script('cp_calculatedfieldsf_divi_editor', plugins_url('/pagebuilders/divi/cff.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH), array('react'), null, true);
72
+ }
73
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/pagebuilders/divi/cff.pb.php';
74
  }
75
  } // End divi_editor
87
  wp_enqueue_script('cp_calculatedfieldsf_gutenberg_editor', plugins_url('/pagebuilders/gutenberg/assets/js/gutenberg.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
88
 
89
  $url = CPCFF_AUXILIARY::site_url();
90
+ $url .= ((strpos($url, '?') === false) ? '?' : '&').'cff-editor-preview=1&cff-amp-redirected=1&cff-amp-form=';
91
  $config = array(
92
  'url' => $url,
93
  'forms' => array(),
js/fbuilder-pro-admin.jquery.js CHANGED
@@ -285,6 +285,8 @@
285
  );
286
  editor = wp.codeEditor.initialize( $('#fCustomStyles'), cssEditorSettings );
287
  editor.codemirror.on('change', function(cm){ $('#fCustomStyles').val(cm.getValue()).change();});
 
 
288
  }
289
  };
290
 
@@ -582,7 +584,7 @@
582
  str += '<div class="groupBox"><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="1" '+( ( this.evalequationsevent == 1 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange events</label><br /><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="2" '+( ( 'undefined' == typeof this.evalequationsevent || this.evalequationsevent == 2 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange and keyup events</label></div>';
583
  }
584
 
585
- str += '<div><label>Form Template</label><br /><select name="fTemplate" id="fTemplate" class="large">'+template+'</select></div><br /><div style="text-align:center"><span id="fTemplateThumbnail">'+thumbnail+'</span><div></div><span id="fTemplateDescription">'+description+'</span></div><div><label>Customize Form Design <i>(Enter the CSS rules. <a href="http://cff.dwbooster.com/faq#q82" target="_blank">More information</a>)</i></label><br /><textarea id="fCustomStyles" style="width:100%;height:150px;">'+this.customstyles+'</textarea></div>' ;
586
 
587
  return str;
588
  }
@@ -825,7 +827,7 @@
825
  },
826
  showShortLabel: function( v )
827
  {
828
- return '<div><label>Short label (optional) [<a class="helpfbuilder" text="The short label is used at title for the column when exporting the form data to CSV files.\n\nIf the short label is empty then, the field label will be used for the CSV file.">help?</a>] :</label><input class="large" name="sShortlabel" id="sShortlabel" value="'+v+'" /></div>';
829
  },
830
  showName: function( v )
831
  {
@@ -872,7 +874,7 @@
872
  },
873
  showCsslayout: function(v)
874
  {
875
- return '<label>Add Css Layout Keywords</label><input class="large" name="sCsslayout" id="sCsslayout" value="'+v+'" />';
876
  }
877
  };
878
 
285
  );
286
  editor = wp.codeEditor.initialize( $('#fCustomStyles'), cssEditorSettings );
287
  editor.codemirror.on('change', function(cm){ $('#fCustomStyles').val(cm.getValue()).change();});
288
+
289
+ $('.cff-editor-extend-shrink').on('click', function(){$(this).closest('.cff-editor-container').toggleClass('fullscreen');});
290
  }
291
  };
292
 
584
  str += '<div class="groupBox"><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="1" '+( ( this.evalequationsevent == 1 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange events</label><br /><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="2" '+( ( 'undefined' == typeof this.evalequationsevent || this.evalequationsevent == 2 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange and keyup events</label></div>';
585
  }
586
 
587
+ str += '<div><label>Form Template</label><br /><select name="fTemplate" id="fTemplate" class="large">'+template+'</select></div><br /><div style="text-align:center"><span id="fTemplateThumbnail">'+thumbnail+'</span><div></div><span id="fTemplateDescription">'+description+'</span></div><div class="cff-editor-container"><label style="display:block;"><div class="cff-editor-extend-shrink"></div>Customize Form Design <i>(Enter the CSS rules. <a href="http://cff.dwbooster.com/faq#q82" target="_blank">More information</a>)</i></label><br /><textarea id="fCustomStyles" style="width:100%;height:150px;">'+this.customstyles+'</textarea></div>' ;
588
 
589
  return str;
590
  }
827
  },
828
  showShortLabel: function( v )
829
  {
830
+ return '<div><label>Short label (optional) [<a class="helpfbuilder" text="The short label is used at title for the column when exporting the form data to CSV files.\n\nIf the short label is empty then, the field label will be used for the CSV file.">help?</a>] :</label><input type="text" class="large" name="sShortlabel" id="sShortlabel" value="'+v+'" /></div>';
831
  },
832
  showName: function( v )
833
  {
874
  },
875
  showCsslayout: function(v)
876
  {
877
+ return '<div><label>Add Css Layout Keywords</label><input type="text" class="large" name="sCsslayout" id="sCsslayout" value="'+v+'" /></div>';
878
  }
879
  };
880
 
js/fbuilder-pro-public.jquery.js CHANGED
@@ -188,8 +188,10 @@
188
  $( '#fieldlist'+opt.identifier).find(".pbPrevious,.pbNext").bind("keyup", function(evt){
189
  if(evt.which == 13 || evt.which == 32) $(this).click();
190
  }).bind("click", {'identifier' : opt.identifier}, function(evt){
191
- var _from = $(this).closest('.pbreak').attr('page')*1,
192
- _to = _from+(($(this).hasClass("pbPrevious")) ? -1 : 1),
 
 
193
  _p;
194
 
195
  _p = $.fbuilder['goToPage'](
@@ -200,6 +202,9 @@
200
  }
201
  );
202
  if(_p == _to) $.fbuilder.setBrowserHistory();
 
 
 
203
  return false;
204
  });
205
  }
@@ -258,7 +263,7 @@
258
  $.fbuilder.showHideDep(
259
  {
260
  'formIdentifier' : evt.data.identifier,
261
- 'fieldItentifier': evt.target.id
262
  }
263
  );
264
  }
@@ -421,6 +426,7 @@
421
  }
422
  },
423
  getField: function(f){return $.fbuilder['forms'][this.form_identifier].getItem(f);},
 
424
  show:function()
425
  {
426
  return 'Not available yet';
@@ -502,70 +508,67 @@
502
  if(setHistoryEntry) $.fbuilder.setBrowserHistory(true);
503
  }; // End manageHistory
504
 
505
- $.fbuilder[ 'goToPage' ] = function( configObj )
506
  {
507
  if(
508
- 'formIdentifier' in configObj &&
509
- 'from' in configObj &&
510
- 'to' in configObj
511
  )
512
  {
513
- var identifier = configObj['formIdentifier'],
514
- _from = configObj['from']*1,
515
- _to = configObj['to']*1,
 
516
  direction = (_from < _to) ? 1 : -1,
517
- formObj = $('[id="'+$.fbuilder.forms[identifier].formId+'"]'),
518
- pageObj, i = _from;
519
 
520
  while(i != _to)
521
  {
522
- $(".pbreak:not(.pb"+i+")",formObj).find(".field").addClass("ignorepb");
523
- $(".pb"+i,formObj).find(".field").removeClass("ignorepb");
524
- if(direction == 1 && !formObj.valid()) break;
525
  i += direction;
526
  }
527
- $.fbuilder.forms[identifier]['currentPage'] = i;
528
- $(".pbreak:not(.pb"+i+")",formObj).hide().find(".field").addClass("ignorepb");
529
- pageObj = $(".pbreak.pb"+i,formObj);
530
- pageObj.show().find(".field").removeClass("ignorepb");
531
 
532
  if(i == _to)
533
  {
534
- if ($(".fields",pageObj).length>0)
535
  {
536
  try
537
  {
538
- var ffocusable = pageObj.find(":focusable"),
539
  _wScrollTop = $(window).scrollTop(),
540
  _viewportHeight = $(window).height(),
541
- _scrollTop = formObj.offset().top;
542
 
543
  if(
544
  ffocusable.length &&
545
  !ffocusable.first().hasClass('hasDatepicker') &&
 
 
546
  ffocusable.first().closest('[uh]').length == 0 /* FIXES AUTO-OPEN TOOLTIPS */
547
- )
548
- {
549
- ffocusable[0].focus();
550
- }
551
 
552
  if(_scrollTop < _wScrollTop || (_wScrollTop+_viewportHeight)<_scrollTop )
553
- {
554
  $( 'html, body' ).animate({scrollTop: _scrollTop}, 50);
555
- }
556
  }
557
  catch(e){}
558
  }
559
  }
560
  else
561
  {
562
- formObj.validate().focusInvalid();
563
  }
564
  return i;
565
  }
566
  }; // End goToPage
567
 
568
- $.fbuilder[ 'showHideDep' ] = function( configObj )
569
  {
570
  /**
571
  * If isNotFirstTime is defined, the equations associated to the fields should be inserted in the queue of equations
@@ -589,16 +592,16 @@
589
  }
590
  };
591
 
592
- if( typeof configObj[ 'formIdentifier' ] !== 'undefined' )
593
  {
594
- var identifier = configObj[ 'formIdentifier' ];
595
 
596
  if( typeof $.fbuilder[ 'forms' ][ identifier ] != 'undefined' )
597
  {
598
  var toShow = $.fbuilder[ 'forms' ][ identifier ][ 'toShow' ],
599
  toHide = $.fbuilder[ 'forms' ][ identifier ][ 'toHide' ],
600
  hiddenByContainer = $.fbuilder[ 'forms' ][ identifier ][ 'hiddenByContainer' ],
601
- items = (typeof configObj[ 'fieldItentifier' ] != 'undefined' ) ? [ $.fbuilder[ 'forms' ][ identifier ].getItem(configObj[ 'fieldItentifier' ].replace(/_[cr]b\d+$/i, '')) ] : $.fbuilder[ 'forms' ][ identifier ].getItems();
602
 
603
  process_items( items );
604
  $( document ).trigger( 'showHideDepEvent', $.fbuilder[ 'forms' ][ identifier ][ 'formId' ] );
188
  $( '#fieldlist'+opt.identifier).find(".pbPrevious,.pbNext").bind("keyup", function(evt){
189
  if(evt.which == 13 || evt.which == 32) $(this).click();
190
  }).bind("click", {'identifier' : opt.identifier}, function(evt){
191
+ var _pg = $(this).closest('.pbreak'),
192
+ _from = _pg.attr('page')*1,
193
+ _inc = ($(this).hasClass("pbPrevious")) ? -1 : 1,
194
+ _to = _from+_inc,
195
  _p;
196
 
197
  _p = $.fbuilder['goToPage'](
202
  }
203
  );
204
  if(_p == _to) $.fbuilder.setBrowserHistory();
205
+ if($('.pb'+_p).find('.fields:visible').length == 0)
206
+ if(_inc == -1 && 0 < _p) $('.pb'+_p).find('.pbPrevious').click();
207
+ else if(_p < _pg.siblings('.pbreak').length) $('.pb'+_p).find('.pbNext').click();
208
  return false;
209
  });
210
  }
263
  $.fbuilder.showHideDep(
264
  {
265
  'formIdentifier' : evt.data.identifier,
266
+ 'fieldIdentifier': evt.target.id
267
  }
268
  );
269
  }
426
  }
427
  },
428
  getField: function(f){return $.fbuilder['forms'][this.form_identifier].getItem(f);},
429
+ jQueryRef: function(){return $('.'+this.name);},
430
  show:function()
431
  {
432
  return 'Not available yet';
508
  if(setHistoryEntry) $.fbuilder.setBrowserHistory(true);
509
  }; // End manageHistory
510
 
511
+ $.fbuilder[ 'goToPage' ] = function( config )
512
  {
513
  if(
514
+ ('formIdentifier' in config || 'form' in config) &&
515
+ 'to' in config
 
516
  )
517
  {
518
+ var identifier = (config['form']) ? $('[name="cp_calculatedfieldsf_pform_psequence"]', config['form']).val() : config['formIdentifier'],
519
+ formObj = $.fbuilder.forms[identifier],
520
+ _from = (('from' in config) ? config['from'] : (('currentPage' in formObj) ? formObj['currentPage'] : 0))*1,
521
+ _to = config['to']*1,
522
  direction = (_from < _to) ? 1 : -1,
523
+ formDom = $('[id="'+formObj.formId+'"]'),
524
+ pageDom, i = _from;
525
 
526
  while(i != _to)
527
  {
528
+ $(".pbreak:not(.pb"+i+")",formDom).find(".field").addClass("ignorepb");
529
+ $(".pb"+i,formDom).find(".field").removeClass("ignorepb");
530
+ if(direction == 1 && !formDom.valid()) break;
531
  i += direction;
532
  }
533
+ formObj['currentPage'] = i;
534
+ $(".pbreak:not(.pb"+i+")",formDom).hide().find(".field").addClass("ignorepb");
535
+ pageDom = $(".pbreak.pb"+i,formDom);
536
+ pageDom.show().find(".field").removeClass("ignorepb");
537
 
538
  if(i == _to)
539
  {
540
+ if ($(".fields",pageDom).length>0)
541
  {
542
  try
543
  {
544
+ var ffocusable = pageDom.find(":focusable"),
545
  _wScrollTop = $(window).scrollTop(),
546
  _viewportHeight = $(window).height(),
547
+ _scrollTop = formDom.offset().top;
548
 
549
  if(
550
  ffocusable.length &&
551
  !ffocusable.first().hasClass('hasDatepicker') &&
552
+ ffocusable.first().attr('type') != 'radio' &&
553
+ ffocusable.first().attr('type') != 'checkbox' &&
554
  ffocusable.first().closest('[uh]').length == 0 /* FIXES AUTO-OPEN TOOLTIPS */
555
+ ) ffocusable[0].focus();
 
 
 
556
 
557
  if(_scrollTop < _wScrollTop || (_wScrollTop+_viewportHeight)<_scrollTop )
 
558
  $( 'html, body' ).animate({scrollTop: _scrollTop}, 50);
 
559
  }
560
  catch(e){}
561
  }
562
  }
563
  else
564
  {
565
+ formDom.validate().focusInvalid();
566
  }
567
  return i;
568
  }
569
  }; // End goToPage
570
 
571
+ $.fbuilder[ 'showHideDep' ] = function( config )
572
  {
573
  /**
574
  * If isNotFirstTime is defined, the equations associated to the fields should be inserted in the queue of equations
592
  }
593
  };
594
 
595
+ if('formIdentifier' in config)
596
  {
597
+ var identifier = config[ 'formIdentifier' ];
598
 
599
  if( typeof $.fbuilder[ 'forms' ][ identifier ] != 'undefined' )
600
  {
601
  var toShow = $.fbuilder[ 'forms' ][ identifier ][ 'toShow' ],
602
  toHide = $.fbuilder[ 'forms' ][ identifier ][ 'toHide' ],
603
  hiddenByContainer = $.fbuilder[ 'forms' ][ identifier ][ 'hiddenByContainer' ],
604
+ items = ('fieldIdentifier' in config) ? [ $.fbuilder[ 'forms' ][ identifier ].getItem(config[ 'fieldIdentifier' ].replace(/_[cr]b\d+$/i, '')) ] : $.fbuilder[ 'forms' ][ identifier ].getItems();
605
 
606
  process_items( items );
607
  $( document ).trigger( 'showHideDepEvent', $.fbuilder[ 'forms' ][ identifier ][ 'formId' ] );
js/fields-admin/01_fbuilder.ftext.js CHANGED
@@ -55,6 +55,6 @@
55
  },
56
  showSpecialDataInstance: function()
57
  {
58
- return '<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /></div><div><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" /></div>';
59
  }
60
  });
55
  },
56
  showSpecialDataInstance: function()
57
  {
58
+ return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /></div><div><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" /></div>';
59
  }
60
  });
js/fields-admin/02_fbuilder.fcurrency.js CHANGED
@@ -102,6 +102,6 @@
102
  },
103
  showRangeIntance: function()
104
  {
105
- return '<div class="clearer"></div><div class="column"><label>Min</label><br /><input name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div class="clearer" style="margin-bottom:10px;">Enter the min/max values as numbers, and not as currencies.<br /><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
106
  }
107
  });
102
  },
103
  showRangeIntance: function()
104
  {
105
+ return '<div class="clearer"></div><div class="column"><label>Min</label><br /><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div class="clearer" style="margin-bottom:10px;">Enter the min/max values as numbers, and not as currencies.<br /><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
106
  }
107
  });
js/fields-admin/02_fbuilder.fnumber.js CHANGED
@@ -58,6 +58,6 @@
58
  },
59
  showRangeIntance: function()
60
  {
61
- return '<div class="column"><label>Min</label><br /><input name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div style="margin-bottom:10px;" class="clearer"><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
62
  }
63
  });
58
  },
59
  showRangeIntance: function()
60
  {
61
+ return '<div class="column"><label>Min</label><br /><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div style="margin-bottom:10px;" class="clearer"><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
62
  }
63
  });
js/fields-admin/02_fbuilder.fslider.js CHANGED
@@ -57,10 +57,10 @@
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
  });
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 type="text" 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 type="text" name="sPredefinedMin" id="sPredefinedMin" value="'+$.fbuilder.htmlEncode( this.predefinedMin )+'" style="width:95%;"></div><div class="column"><label>Predefined Max</label><br /><input type="text" 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 type="text" 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 type="text" 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 type="text" 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-admin/04_fbuilder.fdate.js CHANGED
@@ -112,10 +112,10 @@
112
  showSpecialDataInstance: function()
113
  {
114
  var str = "";
115
- str += '<div><label>Default date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: Leave empty for current date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input class="large" name="sDefaultDate" id="sDefaultDate" value="'+$.fbuilder.htmlEncode(this.defaultDate)+'" /></div>';
116
- str += '<div><label>Min date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No min Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input class="large" name="sMinDate" id="sMinDate" value="'+$.fbuilder.htmlEncode(this.minDate)+'" /></div>';
117
- str += '<div><label>Max date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No max Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input class="large" name="sMaxDate" id="sMaxDate" value="'+$.fbuilder.htmlEncode(this.maxDate)+'" /></div>';
118
- str += '<div><label>Invalid Dates [<a class="helpfbuilder" text="To define some dates as invalid, enter the dates with the format: mm/dd/yyyy separated by comma; for example: 12/31/2014,02/20/2014 or by hyphen for intervals; for example: 12/20/2014-12/28/2014 ">help?</a>]</label><br /><input class="large" name="sInvalidDates" id="sInvalidDates" value="'+$.fbuilder.htmlEncode(this.invalidDates)+'" /></div>';
119
  str += '<div><input type="checkbox" name="sShowDropdown" id="sShowDropdown" '+((this.showDropdown)?"checked":"")+'/><label>Show Dropdown Year and Month</label><div id="divdropdownRange" style="display:'+((this.showDropdown)?"":"none")+'">Year Range [<a class="helpfbuilder" text="The range of years displayed in the year drop-down: either relative to today\'s year (&quot;-nn:+nn&quot;), absolute (&quot;nnnn:nnnn&quot;), or combinations of these formats (&quot;nnnn:-nn&quot;)">help?</a>]: <input type="text" name="sDropdownRange" id="sDropdownRange" value="'+$.fbuilder.htmlEncode(this.dropdownRange)+'"/></div></div>';
120
  str += '<div class="working_dates"><label>Selectable dates </label><br /><input name="sWD0" id="sWD0" value="0" type="checkbox" '+((this.working_dates[0])?"checked":"")+'/>Su<input name="sWD1" id="sWD1" value="1" type="checkbox" '+((this.working_dates[1])?"checked":"")+'/>Mo<input name="sWD2" id="sWD2" value="2" type="checkbox" '+((this.working_dates[2])?"checked":"")+'/>Tu<input name="sWD3" id="sWD3" value="3" type="checkbox" '+((this.working_dates[3])?"checked":"")+'/>We<input name="sWD4" id="sWD4" value="4" type="checkbox" '+((this.working_dates[4])?"checked":"")+'/>Th<input name="sWD5" id="sWD5" value="5" type="checkbox" '+((this.working_dates[5])?"checked":"")+'/>Fr<input name="sWD6" id="sWD6" value="6" type="checkbox" '+((this.working_dates[6])?"checked":"")+'/>Sa</div>';
121
 
@@ -124,17 +124,17 @@
124
  str += '<div><input type="checkbox" name="sShowTimepicker" id="sShowTimepicker" '+( ( this.showTimepicker ) ? 'CHECKED' : '' )+' > <label>Include time</label></div>';
125
  str += '<div class="time-options" '+( ( !this.showTimepicker ) ? 'style="display:none;"': '' )+'>';
126
  str += '<div><label>Time Format</label><br /><label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="24" '+( ( this.tformat == 24 ) ? 'CHECKED' : '' )+' /> 24 hours</label> <label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="12" '+( ( this.tformat == 12 ) ? 'CHECKED' : '' )+' /> 12 hours</label></div>';
127
- str += '<div><label>Default Time HH:mm</label><br /><input class="large" name="sDefaultTime" id="sDefaultTime" value="'+$.fbuilder.htmlEncode(this.defaultTime)+'" /></div>';
128
- str += '<div class="width50 column"><label>Min Hour</label><br /><input class="large" name="sMinHour" id="sMinHour" value="'+$.fbuilder.htmlEncode(this.minHour)+'" /></div>';
129
- str += '<div class="width50 columnr"><label>Min Minutes</label><br /><input class="large" name="sMinMinute" id="sMinMinute" value="'+$.fbuilder.htmlEncode(this.minMinute)+'" /></div>';
130
- str += '<div class="width50 column"><label>Max Hour</label><br /><input class="large" name="sMaxHour" id="sMaxHour" value="'+$.fbuilder.htmlEncode(this.maxHour)+'" /></div>';
131
- str += '<div class="width50 columnr"><label>Max Minutes</label><br /><input class="large" name="sMaxMinute" id="sMaxMinute" value="'+$.fbuilder.htmlEncode(this.maxMinute)+'" /></div>';
132
 
133
- str += '<div><label>Steps for hours</label><br /><input class="large" name="sStepHour" id="sStepHour" value="'+$.fbuilder.htmlEncode(this.stepHour)+'" /></div>';
134
- str += '<div><label>Steps for minutes</label><br /><input class="large" name="sStepMinute" id="sStepMinute" value="'+$.fbuilder.htmlEncode(this.stepMinute)+'" /></div>';
135
- str += '<div><label>Label for hours in screen readers</label><br /><input class="large" name="sAriaHourLabel" id="sAriaHourLabel" value="'+$.fbuilder.htmlEncode(this.ariaHourLabel)+'" /></div>';
136
- str += '<div><label>Label for minutes in screen readers</label><br /><input class="large" name="sAriaMinuteLabel" id="sAriaMinuteLabel" value="'+$.fbuilder.htmlEncode(this.ariaMinuteLabel)+'" /></div>';
137
- str += '<div><label>Label for am/pm component in screen readers</label><br /><input class="large" name="sAriaAMPMLabel" id="sAriaAMPMLabel" value="'+$.fbuilder.htmlEncode(this.ariaAMPMLabel)+'" /></div>';
138
  str += '</div>';
139
  str += '<hr></hr>';
140
  return str;
112
  showSpecialDataInstance: function()
113
  {
114
  var str = "";
115
+ str += '<div><label>Default date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: Leave empty for current date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sDefaultDate" id="sDefaultDate" value="'+$.fbuilder.htmlEncode(this.defaultDate)+'" /></div>';
116
+ str += '<div><label>Min date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No min Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sMinDate" id="sMinDate" value="'+$.fbuilder.htmlEncode(this.minDate)+'" /></div>';
117
+ str += '<div><label>Max date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No max Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sMaxDate" id="sMaxDate" value="'+$.fbuilder.htmlEncode(this.maxDate)+'" /></div>';
118
+ str += '<div><label>Invalid Dates [<a class="helpfbuilder" text="To define some dates as invalid, enter the dates with the format: mm/dd/yyyy separated by comma; for example: 12/31/2014,02/20/2014 or by hyphen for intervals; for example: 12/20/2014-12/28/2014 ">help?</a>]</label><br /><input type="text" class="large" name="sInvalidDates" id="sInvalidDates" value="'+$.fbuilder.htmlEncode(this.invalidDates)+'" /></div>';
119
  str += '<div><input type="checkbox" name="sShowDropdown" id="sShowDropdown" '+((this.showDropdown)?"checked":"")+'/><label>Show Dropdown Year and Month</label><div id="divdropdownRange" style="display:'+((this.showDropdown)?"":"none")+'">Year Range [<a class="helpfbuilder" text="The range of years displayed in the year drop-down: either relative to today\'s year (&quot;-nn:+nn&quot;), absolute (&quot;nnnn:nnnn&quot;), or combinations of these formats (&quot;nnnn:-nn&quot;)">help?</a>]: <input type="text" name="sDropdownRange" id="sDropdownRange" value="'+$.fbuilder.htmlEncode(this.dropdownRange)+'"/></div></div>';
120
  str += '<div class="working_dates"><label>Selectable dates </label><br /><input name="sWD0" id="sWD0" value="0" type="checkbox" '+((this.working_dates[0])?"checked":"")+'/>Su<input name="sWD1" id="sWD1" value="1" type="checkbox" '+((this.working_dates[1])?"checked":"")+'/>Mo<input name="sWD2" id="sWD2" value="2" type="checkbox" '+((this.working_dates[2])?"checked":"")+'/>Tu<input name="sWD3" id="sWD3" value="3" type="checkbox" '+((this.working_dates[3])?"checked":"")+'/>We<input name="sWD4" id="sWD4" value="4" type="checkbox" '+((this.working_dates[4])?"checked":"")+'/>Th<input name="sWD5" id="sWD5" value="5" type="checkbox" '+((this.working_dates[5])?"checked":"")+'/>Fr<input name="sWD6" id="sWD6" value="6" type="checkbox" '+((this.working_dates[6])?"checked":"")+'/>Sa</div>';
121
 
124
  str += '<div><input type="checkbox" name="sShowTimepicker" id="sShowTimepicker" '+( ( this.showTimepicker ) ? 'CHECKED' : '' )+' > <label>Include time</label></div>';
125
  str += '<div class="time-options" '+( ( !this.showTimepicker ) ? 'style="display:none;"': '' )+'>';
126
  str += '<div><label>Time Format</label><br /><label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="24" '+( ( this.tformat == 24 ) ? 'CHECKED' : '' )+' /> 24 hours</label> <label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="12" '+( ( this.tformat == 12 ) ? 'CHECKED' : '' )+' /> 12 hours</label></div>';
127
+ str += '<div><label>Default Time HH:mm</label><br /><input type="text" class="large" name="sDefaultTime" id="sDefaultTime" value="'+$.fbuilder.htmlEncode(this.defaultTime)+'" /></div>';
128
+ str += '<div class="width50 column"><label>Min Hour</label><br /><input type="text" class="large" name="sMinHour" id="sMinHour" value="'+$.fbuilder.htmlEncode(this.minHour)+'" /></div>';
129
+ str += '<div class="width50 columnr"><label>Min Minutes</label><br /><input type="text" class="large" name="sMinMinute" id="sMinMinute" value="'+$.fbuilder.htmlEncode(this.minMinute)+'" /></div>';
130
+ str += '<div class="width50 column"><label>Max Hour</label><br /><input type="text" class="large" name="sMaxHour" id="sMaxHour" value="'+$.fbuilder.htmlEncode(this.maxHour)+'" /></div>';
131
+ str += '<div class="width50 columnr"><label>Max Minutes</label><br /><input type="text" class="large" name="sMaxMinute" id="sMaxMinute" value="'+$.fbuilder.htmlEncode(this.maxMinute)+'" /></div>';
132
 
133
+ str += '<div><label>Steps for hours</label><br /><input type="text" class="large" name="sStepHour" id="sStepHour" value="'+$.fbuilder.htmlEncode(this.stepHour)+'" /></div>';
134
+ str += '<div><label>Steps for minutes</label><br /><input type="text" class="large" name="sStepMinute" id="sStepMinute" value="'+$.fbuilder.htmlEncode(this.stepMinute)+'" /></div>';
135
+ str += '<div><label>Label for hours in screen readers</label><br /><input type="text" class="large" name="sAriaHourLabel" id="sAriaHourLabel" value="'+$.fbuilder.htmlEncode(this.ariaHourLabel)+'" /></div>';
136
+ str += '<div><label>Label for minutes in screen readers</label><br /><input type="text" class="large" name="sAriaMinuteLabel" id="sAriaMinuteLabel" value="'+$.fbuilder.htmlEncode(this.ariaMinuteLabel)+'" /></div>';
137
+ str += '<div><label>Label for am/pm component in screen readers</label><br /><input type="text" class="large" name="sAriaAMPMLabel" id="sAriaAMPMLabel" value="'+$.fbuilder.htmlEncode(this.ariaAMPMLabel)+'" /></div>';
138
  str += '</div>';
139
  str += '<hr></hr>';
140
  return str;
js/fields-admin/05_fbuilder.ftextarea.js CHANGED
@@ -36,6 +36,6 @@
36
  },
37
  showSpecialDataInstance: function()
38
  {
39
- return '<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Number of rows</label><br><input type="text" name="sRows" id="sRows" value="'+$.fbuilder.htmlEncode(this.rows)+'" /></div><div class="clearer"></div>';
40
  }
41
  });
36
  },
37
  showSpecialDataInstance: function()
38
  {
39
+ return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Number of rows</label><br><input type="text" name="sRows" id="sRows" value="'+$.fbuilder.htmlEncode(this.rows)+'" /></div><div class="clearer"></div>';
40
  }
41
  });
js/fields-admin/06_fbuilder.fcheck.js CHANGED
@@ -97,7 +97,7 @@
97
  });
98
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
99
  {
100
- if (e.data.obj.choices.length==1)
101
  {
102
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
103
  }
@@ -218,8 +218,7 @@
218
  var l = this.choices,
219
  lv = this.choicesVal,
220
  v = this.choiceSelected,
221
- str = '', str1, j,
222
- reloadRequired = false;
223
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
224
  {
225
  this.choicesDep = new Array();
@@ -238,18 +237,15 @@
238
  {
239
  while(j--)
240
  {
241
- if(d[i][j].length && $('.'+d[i][j]).length == 0){ reloadRequired = true; d[i].splice(j,1); continue;}
242
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
243
  }
244
  str += str1;
245
  }
246
- j = d[i].length;
247
- if(!j)
248
  {
249
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
250
  }
251
  }
252
- if(reloadRequired) $.fbuilder.reloadItems({'field':this});
253
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.maxChoices()+'</div>';
254
  }
255
  });
97
  });
98
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
99
  {
100
+ if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
101
  {
102
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
103
  }
218
  var l = this.choices,
219
  lv = this.choicesVal,
220
  v = this.choiceSelected,
221
+ str = '', str1, j;
 
222
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
223
  {
224
  this.choicesDep = new Array();
237
  {
238
  while(j--)
239
  {
 
240
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
241
  }
242
  str += str1;
243
  }
244
+ else
 
245
  {
246
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
247
  }
248
  }
 
249
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.maxChoices()+'</div>';
250
  }
251
  });
js/fields-admin/07_fbuilder.fradio.js CHANGED
@@ -93,7 +93,7 @@
93
  });
94
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
95
  {
96
- if (e.data.obj.choices.length==1)
97
  {
98
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
99
  }
@@ -198,8 +198,7 @@
198
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
199
  var l = this.choices,
200
  lv = this.choicesVal,
201
- str = '', str1, j,
202
- reloadRequired = false;
203
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
204
  {
205
  this.choicesDep = new Array();
@@ -218,18 +217,15 @@
218
  {
219
  while(j--)
220
  {
221
- if(d[i][j].length && $('.'+d[i][j]).length == 0){ reloadRequired = true; d[i].splice(j,1); continue;}
222
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
223
  }
224
  str += str1;
225
  }
226
- j = d[i].length;
227
- if(!j)
228
  {
229
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
230
  }
231
  }
232
- if(reloadRequired) $.fbuilder.reloadItems({'field':this});
233
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.attributeToSubmit()+this.allowUntick()+'</div>';
234
  }
235
  });
93
  });
94
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
95
  {
96
+ if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
97
  {
98
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
99
  }
198
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
199
  var l = this.choices,
200
  lv = this.choicesVal,
201
+ str = '', str1, j;
 
202
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
203
  {
204
  this.choicesDep = new Array();
217
  {
218
  while(j--)
219
  {
 
220
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
221
  }
222
  str += str1;
223
  }
224
+ else
 
225
  {
226
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
227
  }
228
  }
 
229
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.attributeToSubmit()+this.allowUntick()+'</div>';
230
  }
231
  });
js/fields-admin/08_fbuilder.fdropdown.js CHANGED
@@ -98,7 +98,7 @@
98
  });
99
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
100
  {
101
- if (e.data.obj.choices.length==1)
102
  {
103
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
104
  }
@@ -218,13 +218,10 @@
218
  {
219
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
220
  if(typeof this.optgroup == 'undefined' ) this.optgroup = new Array();
221
-
222
  var l = this.choices,
223
  lv = this.choicesVal,
224
  og = this.optgroup,
225
- str = '', str1, j,
226
- reloadRequired = false;
227
-
228
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
229
  {
230
  this.choicesDep = new Array();
@@ -246,18 +243,15 @@
246
  {
247
  while(j--)
248
  {
249
- if(d[i][j].length && $('.'+d[i][j]).length == 0){ reloadRequired = true; d[i].splice(j,1); continue;}
250
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
251
  }
252
  str += str1;
253
  }
254
- j = d[i].length;
255
- if(!j)
256
  {
257
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
258
  }
259
  }
260
- if(reloadRequired) $.fbuilder.reloadItems({'field':this});
261
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div>optgroup</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.multipleSelection()+'</div>';
262
  }
263
  });
98
  });
99
  $(".choice_removeDep").bind("click", {obj: this}, function(e)
100
  {
101
+ if (e.data.obj.choicesDep[$(this).attr("i")].length == 1)
102
  {
103
  e.data.obj.choicesDep[$(this).attr("i")][0]="";
104
  }
218
  {
219
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
220
  if(typeof this.optgroup == 'undefined' ) this.optgroup = new Array();
 
221
  var l = this.choices,
222
  lv = this.choicesVal,
223
  og = this.optgroup,
224
+ str = '', str1, j;
 
 
225
  if (!(typeof(this.choicesDep) != "undefined" && this.choicesDep !== null))
226
  {
227
  this.choicesDep = new Array();
243
  {
244
  while(j--)
245
  {
 
246
  str1 = '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="'+d[i][j]+'" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>'+str1;
247
  }
248
  str += str1;
249
  }
250
+ else
 
251
  {
252
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
253
  }
254
  }
 
255
  return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div>optgroup</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.multipleSelection()+'</div>';
256
  }
257
  });
js/fields-admin/09_fbuilder.ffile.js CHANGED
@@ -39,6 +39,6 @@
39
  },
40
  showSpecialDataInstance: function()
41
  {
42
- return '<div><label>Accept these file extensions [<a class="helpfbuilder" text="Extensions comma separated and without the dot.\n\nExample: jpg,png,gif,pdf">help?</a>]</label><br /><input name="sAccept" id="sAccept" value="'+$.fbuilder.htmlEncode(this.accept)+'" class="large"></div><div><label>Maximum upload size in kB [<a class="helpfbuilder" text="1024 kB = 1 MB.\n\nThe support for this HTML5 feature may be partially available or not available in some browsers.">help?</a>]</label><br /><input name="sUpload_size" id="sUpload_size" value="'+$.fbuilder.htmlEncode(this.upload_size)+'" class="large"></div><div><label><input type="checkbox" id="sMultiple" name="sMultiple" '+( ( typeof this.multiple != 'undefined' && this.multiple ) ? 'CHECKED' : '' )+' /> Upload multiple files</label></div><hr /><div><label><input type="checkbox" id="sPreview" name="sPreview" '+( ( typeof this.preview != 'undefined' && this.preview ) ? 'CHECKED' : '' )+' /> Show preview of images</label></div><div><label>Thumbnail width</label><input type="text" id="sThumbWidth" name="sThumbWidth" value="'+$.fbuilder.htmlEncode(this.thumb_width)+'" class="large" /></div><div><label>Thumbnail height</label><input type="text" id="sThumbHeight" name="sThumbHeight" value="'+$.fbuilder.htmlEncode(this.thumb_height)+'" class="large" /></div><hr /><div class="clearer"></div>';
43
  }
44
  });
39
  },
40
  showSpecialDataInstance: function()
41
  {
42
+ return '<div><label>Accept these file extensions [<a class="helpfbuilder" text="Extensions comma separated and without the dot.\n\nExample: jpg,png,gif,pdf">help?</a>]</label><br /><input type="text" name="sAccept" id="sAccept" value="'+$.fbuilder.htmlEncode(this.accept)+'" class="large"></div><div><label>Maximum upload size in kB [<a class="helpfbuilder" text="1024 kB = 1 MB.\n\nThe support for this HTML5 feature may be partially available or not available in some browsers.">help?</a>]</label><br /><input type="text" name="sUpload_size" id="sUpload_size" value="'+$.fbuilder.htmlEncode(this.upload_size)+'" class="large"></div><div><label><input type="checkbox" id="sMultiple" name="sMultiple" '+( ( typeof this.multiple != 'undefined' && this.multiple ) ? 'CHECKED' : '' )+' /> Upload multiple files</label></div><hr /><div><label><input type="checkbox" id="sPreview" name="sPreview" '+( ( typeof this.preview != 'undefined' && this.preview ) ? 'CHECKED' : '' )+' /> Show preview of images</label></div><div><label>Thumbnail width</label><input type="text" id="sThumbWidth" name="sThumbWidth" value="'+$.fbuilder.htmlEncode(this.thumb_width)+'" class="large" /></div><div><label>Thumbnail height</label><input type="text" id="sThumbHeight" name="sThumbHeight" value="'+$.fbuilder.htmlEncode(this.thumb_height)+'" class="large" /></div><hr /><div class="clearer"></div>';
43
  }
44
  });
js/fields-admin/10_fbuilder.fpassword.js CHANGED
@@ -51,6 +51,6 @@
51
  },
52
  showSpecialDataInstance: function()
53
  {
54
- return '<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div>';
55
  }
56
  });
51
  },
52
  showSpecialDataInstance: function()
53
  {
54
+ return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div>';
55
  }
56
  });
js/fields-admin/16_fbuilder.fsummary.js CHANGED
@@ -40,24 +40,24 @@
40
  showAllSettings:function()
41
  {
42
  return this.showTitle()+this.showSummaryFields()+this.showCsslayout();
43
- },
44
- showSummaryFields: function()
45
  {
46
  var str = '',
47
  items = this.fBuild.getItems();
48
-
49
- str += '<div><label>Fields to display on summary</label><br /><input name="sFields" id="sFields" class="large" value="'+$.fbuilder.htmlEncode(this.fields)+'"></div><div class="clearer"></div>';
50
-
51
  str += '<div><label>Select field and press the plus button</label><br /><select name="sSelectedField" id="sSelectedField" style="width:80%;">';
52
  for ( var i=0; i<items.length; i++ )
53
  {
54
  str += '<option value="'+items[i].name+'">'+( ( typeof items[i].title != 'undefined' ) ? items[i].title : '' )+'('+items[i].name+')'+'</option>';
55
  }
56
  str += '</select><input type="button" value="+" name="sPlusBtn" id="sPlusBtn" style="padding:3px 10px;" /></div><div class="clearer"></div>';
57
-
58
- str += '<div><label>Classname for fields titles</label><br /><input class="large" name="sTitleClassname" id="sTitleClassname" value="'+$.fbuilder.htmlEncode(this.titleClassname)+'"></div><div class="clearer"></div>';
59
- str += '<div><label>Classname for fields values</label><br /><input class="large" name="sValueClassname" id="sValueClassname" value="'+$.fbuilder.htmlEncode(this.valueClassname)+'"></div><div class="clearer"></div>';
60
-
61
  return str;
62
  }
63
  });
40
  showAllSettings:function()
41
  {
42
  return this.showTitle()+this.showSummaryFields()+this.showCsslayout();
43
+ },
44
+ showSummaryFields: function()
45
  {
46
  var str = '',
47
  items = this.fBuild.getItems();
48
+
49
+ str += '<div><label>Fields to display on summary</label><br /><input type="text" name="sFields" id="sFields" class="large" value="'+$.fbuilder.htmlEncode(this.fields)+'"></div><div class="clearer"></div>';
50
+
51
  str += '<div><label>Select field and press the plus button</label><br /><select name="sSelectedField" id="sSelectedField" style="width:80%;">';
52
  for ( var i=0; i<items.length; i++ )
53
  {
54
  str += '<option value="'+items[i].name+'">'+( ( typeof items[i].title != 'undefined' ) ? items[i].title : '' )+'('+items[i].name+')'+'</option>';
55
  }
56
  str += '</select><input type="button" value="+" name="sPlusBtn" id="sPlusBtn" style="padding:3px 10px;" /></div><div class="clearer"></div>';
57
+
58
+ str += '<div><label>Classname for fields titles</label><br /><input type="text" class="large" name="sTitleClassname" id="sTitleClassname" value="'+$.fbuilder.htmlEncode(this.titleClassname)+'"></div><div class="clearer"></div>';
59
+ str += '<div><label>Classname for fields values</label><br /><input type="text" class="large" name="sValueClassname" id="sValueClassname" value="'+$.fbuilder.htmlEncode(this.valueClassname)+'"></div><div class="clearer"></div>';
60
+
61
  return str;
62
  }
63
  });
js/fields-admin/28_fbuilder.fcontainer.js CHANGED
@@ -5,9 +5,13 @@
5
  {
6
  fields:[],
7
  columns:1,
 
8
  editItemEvents:function()
9
  {
10
- var evt=[{s:"#sColumns",e:"change", l:"columns"}];
 
 
 
11
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
12
  },
13
  showShortLabel:function(){ return ''; },
@@ -20,7 +24,8 @@
20
  {
21
  cStr += '<option value="'+columns[ i ]+'" '+( ( this.columns == columns[ i ] ) ? 'SELECTED' : '' )+'>'+columns[ i ]+' column'+( ( i ) ? 's' : '' )+'</option>';
22
  }
23
- return '<div><label>Columns</label><br /><select name="sColumns" id="sColumns">' + cStr + '</select><div class="clearer"><span class="uh">Shown in columns the fields into the container.</span></div></div>';
 
24
  },
25
  remove : function()
26
  {
5
  {
6
  fields:[],
7
  columns:1,
8
+ rearrange:0,
9
  editItemEvents:function()
10
  {
11
+ var evt=[
12
+ {s:"#sColumns",e:"change", l:"columns"},
13
+ {s:"#sRearrange",e:"click", l:"rearrange",f:function(el){return el.is(":checked");}}
14
+ ];
15
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
16
  },
17
  showShortLabel:function(){ return ''; },
24
  {
25
  cStr += '<option value="'+columns[ i ]+'" '+( ( this.columns == columns[ i ] ) ? 'SELECTED' : '' )+'>'+columns[ i ]+' column'+( ( i ) ? 's' : '' )+'</option>';
26
  }
27
+ return '<div><label>Columns</label><br /><select name="sColumns" id="sColumns">' + cStr + '</select><div class="clearer"><span class="uh">Shown in columns the fields into the container.</span></div></div>'+
28
+ '<div><label><input name="sRearrange" id="sRearrange" type="checkbox" '+((this.rearrange) ? 'CHECKED' : '')+'> Rearrange</label> <span class="uh">Rearrange the fields in the container.</span></div>';
29
  },
30
  remove : function()
31
  {
js/fields-admin/29_fbuilder.ffieldset.fc.js CHANGED
@@ -14,6 +14,7 @@
14
  ftype:"ffieldset",
15
  fields:[],
16
  columns:1,
 
17
  collapsed:false,
18
  display:function()
19
  {
14
  ftype:"ffieldset",
15
  fields:[],
16
  columns:1,
17
+ rearrange: 0,
18
  collapsed:false,
19
  display:function()
20
  {
js/fields-admin/30_fbuilder.fdiv.fc.js CHANGED
@@ -14,6 +14,7 @@
14
  ftype:"fdiv",
15
  fields:[],
16
  columns:1,
 
17
  collapsed:false,
18
  display:function()
19
  {
14
  ftype:"fdiv",
15
  fields:[],
16
  columns:1,
17
+ rearrange: 0,
18
  collapsed:false,
19
  display:function()
20
  {
js/fields-admin/31_fbuilder.fmedia.js CHANGED
@@ -34,7 +34,8 @@
34
  sMuted:0,
35
  sPreload: "auto",
36
  sFallback: "",
37
- sFigcaption: ""
 
38
  },
39
  video:{
40
  sWidth:"",
@@ -48,7 +49,8 @@
48
  sMuted:0,
49
  sPreload: "auto",
50
  sFallback: "",
51
- sFigcaption: ""
 
52
  }
53
  };
54
  },
@@ -59,7 +61,7 @@
59
  a = [],
60
  l = [],
61
  r = '';
62
-
63
  if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
64
  if( $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
65
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
@@ -74,15 +76,15 @@
74
  {
75
  r = '<img '+a.join( ' ' )+' />';
76
  }
77
-
78
  return r;
79
  },
80
  _display_audio_video: function( d, isV )
81
  {
82
  var esc = $.fbuilder.htmlEncode,
83
  a = [],
84
- t = ( isV ) ? 'video' : 'audio' ;
85
-
86
  if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
87
  if( isV && $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
88
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
@@ -91,8 +93,9 @@
91
  if( d.sControls ) a.push( 'controls' );
92
  if( d.sLoop ) a.push( 'loop' );
93
  if( d.sMuted ) a.push( 'muted' );
 
94
  a.push( 'preload="'+esc( d.sPreload )+'"' );
95
-
96
  return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
97
  },
98
  _display_audio: function()
@@ -108,17 +111,17 @@
108
  return '<div class="fields fmark '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this[ '_display_' + this.sMediaType ]()+'</label><span class="uh">'+this.data[ this.sMediaType ][ 'sFigcaption' ]+'</span><div class="clearer"></div></div>';
109
  },
110
  editItemEvents:function()
111
- {
112
  var me = this;
113
- $("#sMediaBtn").bind("click", function(e)
114
  {
115
  me._loadMedia( 'sSrc', me.sMediaType );
116
  });
117
- $("#sMediaAltBtn").bind("click", function(e)
118
  {
119
  me._loadMedia( 'sSrcAlt', me.sMediaType );
120
  });
121
- $("#sPosterBtn").bind("click", function(e)
122
  {
123
  me._loadMedia( 'sPoster', 'image' );
124
  });
@@ -127,18 +130,18 @@
127
  e.data.obj[ this.name ] = $(this).val();
128
  $.fbuilder.editItem( e.data.obj.index );
129
  $.fbuilder.reloadItems({'field':e.data.obj});
130
- });
131
- $("#sControls,#sLoop,#sAutoplay,#sMuted").bind("click", {obj: this}, function(e)
132
  {
133
  e.data.obj[ 'data' ][ e.data.obj[ 'sMediaType' ] ][ this.id ] = ( this.checked ) ? 1 : 0;
134
  $.fbuilder.reloadItems({'field':e.data.obj});
135
- });
136
- $("#sWidth,#sHeight,#sSrc,#sSrcAlt,#sPoster,#sAlt,#sLink,#sTarget,#sFallback,#sFigcaption,#sPreload").bind("change keyup", {obj: this}, function(e)
137
  {
138
  e.data.obj[ 'data' ][ e.data.obj[ 'sMediaType' ] ][ this.id ] = $(this).val();
139
  $.fbuilder.reloadItems({'field':e.data.obj});
140
  });
141
-
142
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
143
  },
144
  showSpecialDataInstance: function()
@@ -149,7 +152,7 @@
149
  {
150
  var l = [ 'image', 'audio', 'video' ],
151
  r = "", v;
152
-
153
  for( var i = 0, h = l.length; i < h; i++ )
154
  {
155
  v = l[ i ];
@@ -166,7 +169,7 @@
166
  text: 'Select Source'
167
  },
168
  multiple: false
169
- }).on('select',
170
  (function( field, type ){
171
  return function() {
172
  var regExp = new RegExp( type, 'i'),
@@ -175,13 +178,13 @@
175
  {
176
  alert( 'Invalid mime type' );
177
  return;
178
- }
179
  field.val( attachment.url ).change();
180
  };
181
- })( src_field, type )
182
  ).open();
183
  return false;
184
- },
185
  _showSettingsBox: function()
186
  {
187
  var d = this.data[ this.sMediaType ];
@@ -205,20 +208,21 @@
205
  var r = '',
206
  esc = $.fbuilder.htmlEncode;
207
  r = '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">';
208
-
209
  if( isV )
210
  r += '<label>Height</label><input type="text" class="large" name="sHeight" id="sHeight" value="'+esc(d.sHeight)+'">';
211
-
212
  r += '<label>Source</label><div><input type="text" style="width:70%;" name="sSrc" id="sSrc" value="'+esc(d.sSrc)+'"><input id="sMediaBtn" type="button" value="Browse" style="width:28%;" /></div>';
213
-
214
  if( isV )
215
  r += '<label>Poster</label><div><input type="text" style="width:70%;" name="sPoster" id="sPoster" value="'+esc(d.sPoster)+'"><input id="sPosterBtn" type="button" value="Browse" style="width:28%;" /></div>';
216
-
217
  r += '<label>Alternative Source</label><div><input type="text" style="width:70%;" name="sSrcAlt" id="sSrcAlt" value="'+esc(d.sSrcAlt)+'"><input id="sMediaAltBtn" type="button" value="Browse" style="width:28%;" /></div>';
218
  r += '<input type="checkbox" name="sControls" id="sControls" value="1" '+( ( d.sControls ) ? 'CHECKED' : '')+'><label>Controls</label><br />';
219
  r += '<input type="checkbox" name="sLoop" id="sLoop" value="1" '+( ( d.sLoop ) ? 'CHECKED' : '')+'><label>Loop</label><br />';
220
  r += '<input type="checkbox" name="sAutoplay" id="sAutoplay" value="1" '+( ( d.sAutoplay ) ? 'CHECKED' : '')+'><label>Autoplay</label><br />';
221
  r += '<input type="checkbox" name="sMuted" id="sMuted" value="1" '+( ( d.sMuted ) ? 'CHECKED' : '')+'><label>Muted</label><br />';
 
222
  var s = '',
223
  l = [ 'none', 'auto', 'metadata' ];
224
  for( var i = 0; i < 3; i++ )
@@ -240,5 +244,5 @@
240
  },
241
  showTitle: function(){ return ''; },
242
  showShortLabel: function(){ return ''; },
243
- showUserhelp: function(){ return ''; }
244
  });
34
  sMuted:0,
35
  sPreload: "auto",
36
  sFallback: "",
37
+ sFigcaption: "",
38
+ sHideDownload: 0
39
  },
40
  video:{
41
  sWidth:"",
49
  sMuted:0,
50
  sPreload: "auto",
51
  sFallback: "",
52
+ sFigcaption: "",
53
+ sHideDownload: 0
54
  }
55
  };
56
  },
61
  a = [],
62
  l = [],
63
  r = '';
64
+
65
  if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
66
  if( $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
67
  if( $.trim( d.sSrc ) ) a.push( 'src="'+esc( d.sSrc )+'"' );
76
  {
77
  r = '<img '+a.join( ' ' )+' />';
78
  }
79
+
80
  return r;
81
  },
82
  _display_audio_video: function( d, isV )
83
  {
84
  var esc = $.fbuilder.htmlEncode,
85
  a = [],
86
+ t = ( isV ) ? 'video' : 'audio';
87
+
88
  if( $.trim( d.sWidth ) ) a.push( 'width="'+esc( d.sWidth )+'"' );
89
  if( isV && $.trim( d.sHeight ) ) a.push( 'height="'+esc( d.sHeight )+'"' );
90
  if( isV && $.trim( d.sPoster ) ) a.push( 'poster="'+esc( d.sPoster )+'"' );
93
  if( d.sControls ) a.push( 'controls' );
94
  if( d.sLoop ) a.push( 'loop' );
95
  if( d.sMuted ) a.push( 'muted' );
96
+ if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
97
  a.push( 'preload="'+esc( d.sPreload )+'"' );
98
+
99
  return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
100
  },
101
  _display_audio: function()
111
  return '<div class="fields fmark '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this[ '_display_' + this.sMediaType ]()+'</label><span class="uh">'+this.data[ this.sMediaType ][ 'sFigcaption' ]+'</span><div class="clearer"></div></div>';
112
  },
113
  editItemEvents:function()
114
+ {
115
  var me = this;
116
+ $("#sMediaBtn").bind("click", function(e)
117
  {
118
  me._loadMedia( 'sSrc', me.sMediaType );
119
  });
120
+ $("#sMediaAltBtn").bind("click", function(e)
121
  {
122
  me._loadMedia( 'sSrcAlt', me.sMediaType );
123
  });
124
+ $("#sPosterBtn").bind("click", function(e)
125
  {
126
  me._loadMedia( 'sPoster', 'image' );
127
  });
130
  e.data.obj[ this.name ] = $(this).val();
131
  $.fbuilder.editItem( e.data.obj.index );
132
  $.fbuilder.reloadItems({'field':e.data.obj});
133
+ });
134
+ $("#sControls,#sLoop,#sAutoplay,#sMuted,#sHideDownload").bind("click", {obj: this}, function(e)
135
  {
136
  e.data.obj[ 'data' ][ e.data.obj[ 'sMediaType' ] ][ this.id ] = ( this.checked ) ? 1 : 0;
137
  $.fbuilder.reloadItems({'field':e.data.obj});
138
+ });
139
+ $("#sWidth,#sHeight,#sSrc,#sSrcAlt,#sPoster,#sAlt,#sLink,#sTarget,#sFallback,#sFigcaption,#sPreload").bind("change keyup", {obj: this}, function(e)
140
  {
141
  e.data.obj[ 'data' ][ e.data.obj[ 'sMediaType' ] ][ this.id ] = $(this).val();
142
  $.fbuilder.reloadItems({'field':e.data.obj});
143
  });
144
+
145
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
146
  },
147
  showSpecialDataInstance: function()
152
  {
153
  var l = [ 'image', 'audio', 'video' ],
154
  r = "", v;
155
+
156
  for( var i = 0, h = l.length; i < h; i++ )
157
  {
158
  v = l[ i ];
169
  text: 'Select Source'
170
  },
171
  multiple: false
172
+ }).on('select',
173
  (function( field, type ){
174
  return function() {
175
  var regExp = new RegExp( type, 'i'),
178
  {
179
  alert( 'Invalid mime type' );
180
  return;
181
+ }
182
  field.val( attachment.url ).change();
183
  };
184
+ })( src_field, type )
185
  ).open();
186
  return false;
187
+ },
188
  _showSettingsBox: function()
189
  {
190
  var d = this.data[ this.sMediaType ];
208
  var r = '',
209
  esc = $.fbuilder.htmlEncode;
210
  r = '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">';
211
+
212
  if( isV )
213
  r += '<label>Height</label><input type="text" class="large" name="sHeight" id="sHeight" value="'+esc(d.sHeight)+'">';
214
+
215
  r += '<label>Source</label><div><input type="text" style="width:70%;" name="sSrc" id="sSrc" value="'+esc(d.sSrc)+'"><input id="sMediaBtn" type="button" value="Browse" style="width:28%;" /></div>';
216
+
217
  if( isV )
218
  r += '<label>Poster</label><div><input type="text" style="width:70%;" name="sPoster" id="sPoster" value="'+esc(d.sPoster)+'"><input id="sPosterBtn" type="button" value="Browse" style="width:28%;" /></div>';
219
+
220
  r += '<label>Alternative Source</label><div><input type="text" style="width:70%;" name="sSrcAlt" id="sSrcAlt" value="'+esc(d.sSrcAlt)+'"><input id="sMediaAltBtn" type="button" value="Browse" style="width:28%;" /></div>';
221
  r += '<input type="checkbox" name="sControls" id="sControls" value="1" '+( ( d.sControls ) ? 'CHECKED' : '')+'><label>Controls</label><br />';
222
  r += '<input type="checkbox" name="sLoop" id="sLoop" value="1" '+( ( d.sLoop ) ? 'CHECKED' : '')+'><label>Loop</label><br />';
223
  r += '<input type="checkbox" name="sAutoplay" id="sAutoplay" value="1" '+( ( d.sAutoplay ) ? 'CHECKED' : '')+'><label>Autoplay</label><br />';
224
  r += '<input type="checkbox" name="sMuted" id="sMuted" value="1" '+( ( d.sMuted ) ? 'CHECKED' : '')+'><label>Muted</label><br />';
225
+ r += '<input type="checkbox" name="sHideDownload" id="sHideDownload" value="1" '+( ( d.sHideDownload ) ? 'CHECKED' : '')+'><label>Hide the download file control</label><br />';
226
  var s = '',
227
  l = [ 'none', 'auto', 'metadata' ];
228
  for( var i = 0; i < 3; i++ )
244
  },
245
  showTitle: function(){ return ''; },
246
  showShortLabel: function(){ return ''; },
247
+ showUserhelp: function(){ return ''; }
248
  });
js/fields-admin/32_fbuilder.fbutton.js CHANGED
@@ -14,17 +14,30 @@
14
  sType:"button", // button, reset, calculate
15
  sValue:"button",
16
  sOnclick:"",
 
17
  userhelp:"A description of the section goes here.",
18
  display:function()
19
  {
20
  return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><input type="button" disabled value="'+$.fbuilder.htmlEncode(this.sValue)+'"><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
21
  },
22
  editItemEvents:function()
23
- {
24
  var evt=[
25
  {s:"#sValue",e:"change keyup", l:"sValue"},
 
26
  {s:"#sOnclick",e:"change keyup", l:"sOnclick"},
27
- {s:"[name='sType']",e:"click", l:"sType"}
 
 
 
 
 
 
 
 
 
 
 
28
  ];
29
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
30
  },
@@ -34,14 +47,16 @@
34
  },
35
  _showTypeSettings: function()
36
  {
37
- var l = [ 'reset', 'button', 'calculate' ],
38
  r = "", v;
39
-
40
  for( var i = 0, h = l.length; i < h; i++ )
41
  {
42
  v = l[ i ];
43
  r += '<label style="margin-right:10px;"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
44
  }
 
 
45
  return '<div><label>Select button type</label><br/>' + r + '</div>';
46
  },
47
  _showValueSettings: function()
14
  sType:"button", // button, reset, calculate
15
  sValue:"button",
16
  sOnclick:"",
17
+ sLoading: false,
18
  userhelp:"A description of the section goes here.",
19
  display:function()
20
  {
21
  return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><input type="button" disabled value="'+$.fbuilder.htmlEncode(this.sValue)+'"><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
22
  },
23
  editItemEvents:function()
24
+ {
25
  var evt=[
26
  {s:"#sValue",e:"change keyup", l:"sValue"},
27
+ {s:"#sLoading",e:"click", l:"sLoading",f:function(el){return el.is(':checked');}},
28
  {s:"#sOnclick",e:"change keyup", l:"sOnclick"},
29
+ {
30
+ s:"[name='sType']",e:"click",
31
+ l:"sType",
32
+ f:function(e)
33
+ {
34
+ var v = e.val(),
35
+ l = $('#sLoading').closest('div');
36
+ l.hide();
37
+ if(v == 'calculate') l.show();
38
+ return v;
39
+ }
40
+ }
41
  ];
42
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
43
  },
47
  },
48
  _showTypeSettings: function()
49
  {
50
+ var l = [ 'calculate', 'reset', 'button' ],
51
  r = "", v;
52
+ r += '<div>';
53
  for( var i = 0, h = l.length; i < h; i++ )
54
  {
55
  v = l[ i ];
56
  r += '<label style="margin-right:10px;"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
57
  }
58
+ r += '</div>';
59
+ r += '<div '+((this.sType != 'calculate') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sLoading" ' + ((this.sLoading) ? 'CHECKED' : '') + ' >display "calculation in progress" indicator</label></div>';
60
  return '<div><label>Select button type</label><br/>' + r + '</div>';
61
  },
62
  _showValueSettings: function()
js/fields-admin/34_fbuilder.fhtml.js CHANGED
@@ -20,10 +20,35 @@
20
  {
21
  var evt=[{s:"#sContent",e:"change keyup", l:"fcontent"}];
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  },
24
  showContent:function()
25
  {
26
- return '<label>HTML Content</label><textarea class="large" name="sContent" id="sContent" style="height:150px;">'+$( '<div/>' ).text( this.fcontent ).html()+'</textarea>';
27
  },
28
  showAllSettings:function()
29
  {
20
  {
21
  var evt=[{s:"#sContent",e:"change keyup", l:"fcontent"}];
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this,evt);
23
+
24
+ // Code Editor
25
+ if( 'codeEditor' in wp)
26
+ {
27
+ setTimeout(function(){
28
+ var htmlEditorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {}, editor;
29
+ htmlEditorSettings.codemirror = _.extend(
30
+ {},
31
+ htmlEditorSettings.codemirror,
32
+ {
33
+ indentUnit: 2,
34
+ tabSize: 2,
35
+ autoCloseTags: false
36
+ }
37
+ );
38
+ htmlEditorSettings['htmlhint']['spec-char-escape'] = false;
39
+ htmlEditorSettings['htmlhint']['alt-require'] = false;
40
+ htmlEditorSettings['htmlhint']['tag-pair'] = false;
41
+ editor = wp.codeEditor.initialize( $('#sContent'), htmlEditorSettings );
42
+ editor.codemirror.on('change', function(cm){ $('#sContent').val(cm.getValue()).change();});
43
+
44
+ $('.cff-editor-extend-shrink').on('click', function(){$(this).closest('.cff-editor-container').toggleClass('fullscreen');});
45
+
46
+ }, 50);
47
+ }
48
  },
49
  showContent:function()
50
  {
51
+ return '<br><div class="cff-editor-container"><label style="display:block;"><div class="cff-editor-extend-shrink"></div>HTML Content</label><br><textarea class="large" name="sContent" id="sContent" style="height:150px;">'+$( '<div/>' ).text( this.fcontent ).html()+'</textarea></div><br>';
52
  },
53
  showAllSettings:function()
54
  {
js/fields-admin/fbuilder.fcalculated.js CHANGED
@@ -15,7 +15,6 @@
15
  predefined:"",
16
  required:false,
17
  size:"medium",
18
- toolbar:"default|mathematical",
19
  eq:"",
20
  suffix:"",
21
  prefix:"",
@@ -219,7 +218,7 @@
219
  {
220
  if( o.complex )
221
  {
222
- r += '<div><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" ><input class="cf_dependence_rule" type="text" i="'+i+'" value="'+o.rule.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;position:relative;"><span style="float:left;">Ex: value==10</span><a href="#" class="displayWizard" i="'+i+'">Edit through wizard</a><br />(The rule entered will lost)</div></div>';
223
  }
224
  else
225
  {
@@ -235,7 +234,7 @@
235
  value = parts[2];
236
  }
237
 
238
- r += '<div><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" >'+setOperator( i, operator )+' <input type="text" i="'+i+'" class="cf_dependence_value" value="'+value.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;"><a i="'+i+'" class="displayComplexRule" href="#">Edit rule manually</a></div></div>';
239
  }
240
 
241
  r += '<div>';
@@ -250,7 +249,7 @@
250
  opt += '<option value="'+items[k].name+'" '+( ( items[k].name == v ) ? 'selected="SELECTED"' : '' )+'>'+items[k].name+( ( typeof items[ k ].title != 'undefined' ) ? ' (' + items[ k ].title + ')' : '' ) + '</option>';
251
  }
252
  }
253
- r += '<div style="position:relative;"><span>If rule is valid show:</span> <select class="cf_dependence_field" i="'+i+'" j="'+j+'" >'+opt+'</select><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
254
  });
255
  r += '</div>';
256
  r += '</div>';
@@ -264,7 +263,8 @@
264
  },
265
  showEqEditor:function(eq)
266
  {
267
- var me = this,
 
268
  tools = $.fbuilder[ 'objName' ]+'.fbuilder.controls.fCalculated.tools';
269
 
270
  $.fbuilder.controls[ 'fCalculated' ][ 'tools' ] = {
@@ -310,7 +310,7 @@
310
  var module = $.fbuilder[ 'modules' ][ m ];
311
  for( var toolbar in module[ 'toolbars' ] )
312
  {
313
- out += '<option value="'+m+'|'+toolbar+'" '+( ( me.toolbar == m+'|'+toolbar) ? 'SELECTED' : '')+'>'+module[ 'toolbars' ][ toolbar ][ 'label' ]+'</options>';
314
  }
315
  }
316
  }
@@ -369,7 +369,7 @@
369
  out += '<option value="' + fName + '">'+item[ 'name' ] + ( ( item[ 'title' ] && !/^\s*$/.test( item[ 'title' ] ) ) ? '('+item[ 'title' ] + ')' : '' ) + '</option>';
370
  }
371
  }
372
- out += ' </select><input type="button" value="+" class="eq_btn" onclick="'+tools+'.setField();" /></div><label>Operators</label><div style="text-align:center;" class="groupBox"><div style="text-align:left;">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbarList()+'<span id="sEqModuleTutorial">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadTutorial( me.toolbar )+'</span></div><div id="sEqButtonsContainer">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbar( me.toolbar )+'</div><div id="sEqTipsContainer" style="background-color:#DFEFFF;border:1px solid #C2D7EF;padding:5px;margin:5px;display:none;text-align:left;"></div></div><label>Symbol to display at beginning of calculated field</label><input type="text" name="sPrefix" id="sPrefix" class="large" value="'+$.fbuilder.htmlEncode(me.prefix)+'" /><label>Symbol to display at the end of calculated field</label><input type="text" name="sSuffix" id="sSuffix" class="large" value="'+$.fbuilder.htmlEncode(me.suffix)+'" /><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.decimalsymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sGroupingSymbol" id="sGroupingSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.groupingsymbol)+'" />';
373
 
374
  return out;
375
  }
15
  predefined:"",
16
  required:false,
17
  size:"medium",
 
18
  eq:"",
19
  suffix:"",
20
  prefix:"",
218
  {
219
  if( o.complex )
220
  {
221
+ r += '<div class="cff-dependency-rule"><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" ><input class="cf_dependence_rule" type="text" i="'+i+'" value="'+o.rule.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;position:relative;"><span style="float:left;">Ex: value==10</span><a href="#" class="displayWizard" i="'+i+'">Edit through wizard</a><br />(The rule entered will lost)</div></div>';
222
  }
223
  else
224
  {
234
  value = parts[2];
235
  }
236
 
237
+ r += '<div class="cff-dependency-rule"><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" >'+setOperator( i, operator )+' <input type="text" i="'+i+'" class="cf_dependence_value" value="'+value.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;"><a i="'+i+'" class="displayComplexRule" href="#">Edit rule manually</a></div></div>';
238
  }
239
 
240
  r += '<div>';
249
  opt += '<option value="'+items[k].name+'" '+( ( items[k].name == v ) ? 'selected="SELECTED"' : '' )+'>'+items[k].name+( ( typeof items[ k ].title != 'undefined' ) ? ' (' + items[ k ].title + ')' : '' ) + '</option>';
250
  }
251
  }
252
+ r += '<div style="position:relative;" class="cff-dependency-item"><span>If rule is valid show:</span> <select class="cf_dependence_field" i="'+i+'" j="'+j+'" >'+opt+'</select><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
253
  });
254
  r += '</div>';
255
  r += '</div>';
263
  },
264
  showEqEditor:function(eq)
265
  {
266
+ var default_toolbar = "default|mathematical",
267
+ me = this,
268
  tools = $.fbuilder[ 'objName' ]+'.fbuilder.controls.fCalculated.tools';
269
 
270
  $.fbuilder.controls[ 'fCalculated' ][ 'tools' ] = {
310
  var module = $.fbuilder[ 'modules' ][ m ];
311
  for( var toolbar in module[ 'toolbars' ] )
312
  {
313
+ out += '<option value="'+m+'|'+toolbar+'" '+( ( default_toolbar == m+'|'+toolbar) ? 'SELECTED' : '')+'>'+module[ 'toolbars' ][ toolbar ][ 'label' ]+'</options>';
314
  }
315
  }
316
  }
369
  out += '<option value="' + fName + '">'+item[ 'name' ] + ( ( item[ 'title' ] && !/^\s*$/.test( item[ 'title' ] ) ) ? '('+item[ 'title' ] + ')' : '' ) + '</option>';
370
  }
371
  }
372
+ out += ' </select><input type="button" value="+" class="eq_btn" onclick="'+tools+'.setField();" /></div><label>Operators</label><div style="text-align:center;" class="groupBox"><div style="text-align:left;">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbarList()+'<span id="sEqModuleTutorial">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadTutorial( default_toolbar )+'</span></div><div id="sEqButtonsContainer">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbar( default_toolbar )+'</div><div id="sEqTipsContainer" style="background-color:#DFEFFF;border:1px solid #C2D7EF;padding:5px;margin:5px;display:none;text-align:left;"></div></div><label>Symbol to display at beginning of calculated field</label><input type="text" name="sPrefix" id="sPrefix" class="large" value="'+$.fbuilder.htmlEncode(me.prefix)+'" /><label>Symbol to display at the end of calculated field</label><input type="text" name="sSuffix" id="sSuffix" class="large" value="'+$.fbuilder.htmlEncode(me.suffix)+'" /><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.decimalsymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sGroupingSymbol" id="sGroupingSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.groupingsymbol)+'" />';
373
 
374
  return out;
375
  }
js/fields-public/02_fbuilder.fcurrency.js CHANGED
@@ -112,18 +112,22 @@
112
  $.validator.methods.min = function(v, el, p)
113
  {
114
  var f = el.id.match( /_\d+$/), e;
115
-
116
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
117
- if(e) v = e.val();
 
 
 
118
  return this.optional(el) || v >= p;
119
  };
120
  $.validator.methods.max = function(v, el, p)
121
  {
122
  var f = el.id.match( /_\d+$/), e;
123
-
124
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
125
- if(e) v = e.val();
126
-
 
 
 
127
  return this.optional(el) || v <= p;
128
  };
129
  }
112
  $.validator.methods.min = function(v, el, p)
113
  {
114
  var f = el.id.match( /_\d+$/), e;
 
115
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
116
+ if(e){
117
+ v = e.val();
118
+ if('dformat' in e && e.dformat == 'percent') v*=100;
119
+ }
120
  return this.optional(el) || v >= p;
121
  };
122
  $.validator.methods.max = function(v, el, p)
123
  {
124
  var f = el.id.match( /_\d+$/), e;
 
125
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
126
+ if(e)
127
+ {
128
+ v = e.val();
129
+ if('dformat' in e && e.dformat == 'percent') v*=100;
130
+ }
131
  return this.optional(el) || v <= p;
132
  };
133
  }
js/fields-public/02_fbuilder.fnumber.js CHANGED
@@ -16,7 +16,6 @@
16
  max:"",
17
  formatDynamically:false,
18
  dformat:"digits",
19
- formats:new Array("digits","number"),
20
  set_min:function(v, rmv)
21
  {
22
  var e = $('[id="'+this.name+'"]');
@@ -101,18 +100,21 @@
101
  $.validator.methods.min = function(v, el, p)
102
  {
103
  var f = el.id.match( /_\d+$/), e;
104
-
105
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
106
- if(e) v = e.val();
 
 
 
107
  return this.optional(el) || v >= p;
108
  };
109
  $.validator.methods.max = function(v, el, p)
110
  {
111
  var f = el.id.match( /_\d+$/), e;
112
-
113
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
114
- if(e) v = e.val();
115
-
 
 
116
  return this.optional(el) || v <= p;
117
  };
118
  }
16
  max:"",
17
  formatDynamically:false,
18
  dformat:"digits",
 
19
  set_min:function(v, rmv)
20
  {
21
  var e = $('[id="'+this.name+'"]');
100
  $.validator.methods.min = function(v, el, p)
101
  {
102
  var f = el.id.match( /_\d+$/), e;
 
103
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
104
+ if(e){
105
+ v = e.val();
106
+ if('dformat' in e && e.dformat == 'percent') v*=100;
107
+ }
108
  return this.optional(el) || v >= p;
109
  };
110
  $.validator.methods.max = function(v, el, p)
111
  {
112
  var f = el.id.match( /_\d+$/), e;
 
113
  if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
114
+ if(e){
115
+ v = e.val();
116
+ if('dformat' in e && e.dformat == 'percent') v*=100;
117
+ }
118
  return this.optional(el) || v <= p;
119
  };
120
  }
js/fields-public/05_fbuilder.ftextarea.js CHANGED
@@ -15,7 +15,10 @@
15
  rows:4,
16
  show:function()
17
  {
18
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'" minlength="'+(this.minlength)+'" maxlength="'+$.fbuilder.htmlEncode(this.maxlength)+'" class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+'>'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
 
 
 
19
  },
20
  val:function(raw)
21
  {
15
  rows:4,
16
  show:function()
17
  {
18
+ this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
19
+ this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
20
+
21
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+'>'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
22
  },
23
  val:function(raw)
24
  {
js/fields-public/10_fbuilder.fpassword.js CHANGED
@@ -14,7 +14,11 @@
14
  equalTo:"",
15
  show:function()
16
  {
17
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-password-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" minlength="'+(this.minlength)+'" maxlength="'+$.fbuilder.htmlEncode(this.maxlength)+'" '+((this.equalTo!="")?"equalTo=\"#"+$.fbuilder.htmlEncode(this.equalTo+this.form_identifier)+"\"":"" )+' class="field '+this.size+((this.required)?" required":"")+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
 
 
 
 
18
  },
19
  val:function(raw)
20
  {
14
  equalTo:"",
15
  show:function()
16
  {
17
+ this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
18
+ this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
19
+ this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
20
+
21
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-password-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+((this.equalTo.length) ? ' equalTo="#'+this.equalTo+this.form_identifier+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
22
  },
23
  val:function(raw)
24
  {
js/fields-public/28_fbuilder.fcontainer.js CHANGED
@@ -2,6 +2,7 @@
2
  $.fbuilder.controls[ 'fcontainer' ].prototype = {
3
  fields:[],
4
  columns:1,
 
5
  after_show: function()
6
  {
7
  var e = $( '#'+this.name ), f;
@@ -11,7 +12,7 @@
11
  if( this.columns > 1 )
12
  {
13
  f.addClass( 'column'+this.columns );
14
- if( i%this.columns == 0 ) f.css( 'clear', 'left' );
15
  }
16
  f.appendTo( e );
17
  }
2
  $.fbuilder.controls[ 'fcontainer' ].prototype = {
3
  fields:[],
4
  columns:1,
5
+ rearrange: 0,
6
  after_show: function()
7
  {
8
  var e = $( '#'+this.name ), f;
12
  if( this.columns > 1 )
13
  {
14
  f.addClass( 'column'+this.columns );
15
+ if( i%this.columns == 0 && !this.rearrange) f.css( 'clear', 'left' );
16
  }
17
  f.appendTo( e );
18
  }
js/fields-public/29_fbuilder.ffieldset.fc.js CHANGED
@@ -7,6 +7,7 @@
7
  ftype:"ffieldset",
8
  fields:[],
9
  columns:1,
 
10
  show:function()
11
  {
12
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field" id="field'+this.form_identifier+'-'+this.index+'"><FIELDSET id="'+this.name+'">'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'</FIELDSET><div class="clearer"></div></div>';
7
  ftype:"ffieldset",
8
  fields:[],
9
  columns:1,
10
+ rearrange: 0,
11
  show:function()
12
  {
13
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field" id="field'+this.form_identifier+'-'+this.index+'"><FIELDSET id="'+this.name+'">'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'</FIELDSET><div class="clearer"></div></div>';
js/fields-public/30_fbuilder.fdiv.fc.js CHANGED
@@ -6,6 +6,7 @@
6
  ftype:"fdiv",
7
  fields:[],
8
  columns:1,
 
9
  show:function()
10
  {
11
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field" id="field'+this.form_identifier+'-'+this.index+'"><div id="'+this.name+'"></div><div class="clearer"></div></div>';
6
  ftype:"fdiv",
7
  fields:[],
8
  columns:1,
9
+ rearrange: 0,
10
  show:function()
11
  {
12
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field" id="field'+this.form_identifier+'-'+this.index+'"><div id="'+this.name+'"></div><div class="clearer"></div></div>';
js/fields-public/31_fbuilder.fmedia.js CHANGED
@@ -25,7 +25,8 @@
25
  sMuted:0,
26
  sPreload: "auto",
27
  sFallback: "",
28
- sFigcaption: ""
 
29
  },
30
  video:{
31
  sWidth:"",
@@ -39,7 +40,8 @@
39
  sMuted:0,
40
  sPreload: "auto",
41
  sFallback: "",
42
- sFigcaption: ""
 
43
  }
44
  },
45
  _show_image: function()
@@ -81,6 +83,7 @@
81
  if( d.sControls ) a.push( 'controls' );
82
  if( d.sLoop ) a.push( 'loop' );
83
  if( d.sMuted ) a.push( 'muted' );
 
84
  a.push( 'preload="'+esc( d.sPreload )+'"' );
85
 
86
  return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
25
  sMuted:0,
26
  sPreload: "auto",
27
  sFallback: "",
28
+ sFigcaption: "",
29
+ sHideDownload:0
30
  },
31
  video:{
32
  sWidth:"",
40
  sMuted:0,
41
  sPreload: "auto",
42
  sFallback: "",
43
+ sFigcaption: "",
44
+ sHideDownload:0
45
  }
46
  },
47
  _show_image: function()
83
  if( d.sControls ) a.push( 'controls' );
84
  if( d.sLoop ) a.push( 'loop' );
85
  if( d.sMuted ) a.push( 'muted' );
86
+ if( d.sHideDownload ) a.push( 'controlsList="nodownload"' );
87
  a.push( 'preload="'+esc( d.sPreload )+'"' );
88
 
89
  return '<'+t+' '+a.join( ' ' )+'>'+( ( $.trim( d.sSrcAlt ) ) ? '<source src="'+esc( d.sSrcAlt )+'" />' : '' )+'<p>'+d.sFallback+'</p></'+t+'>';
js/fields-public/32_fbuilder.fbutton.js CHANGED
@@ -6,6 +6,7 @@
6
  ftype:"fButton",
7
  sType:"button",
8
  sValue:"button",
 
9
  sOnclick:"",
10
  userhelp:"A description of the section goes here.",
11
  show:function()
@@ -24,27 +25,35 @@
24
  clss = 'reset-button';
25
  }
26
 
27
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-button-field" id="field'+this.form_identifier+'-'+this.index+'"><input id="'+this.name+'" type="'+type+'" value="'+esc( this.sValue )+'" class="field '+clss+'" onclick="'+esc( this.sOnclick )+'" /><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
28
  },
29
  after_show:function()
30
  {
 
31
  $( '#'+this.name ).click(
32
  function()
33
  {
34
  var e = $( this );
35
  if( e.hasClass( 'calculate-button' ) )
36
  {
37
- var suffix = e.attr( 'id' ).match(/_\d+$/)[0],
38
- items = $.fbuilder[ 'forms' ][ suffix ].getItems();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  $.fbuilder[ 'calculator' ].defaultCalc( '#'+e.closest( 'form' ).attr( 'id' ), false );
41
- for(var i = 0, h = items.length; i < h; i++ )
42
- {
43
- if(items[i].ftype == 'fsummary')
44
- {
45
- items[i].update();
46
- }
47
- }
48
  }
49
  if( e.hasClass( 'reset-button' ) )
50
  {
@@ -74,6 +83,7 @@
74
  50
75
  );
76
  }
 
77
  }
78
  );
79
  }
6
  ftype:"fButton",
7
  sType:"button",
8
  sValue:"button",
9
+ sLoading:false,
10
  sOnclick:"",
11
  userhelp:"A description of the section goes here.",
12
  show:function()
25
  clss = 'reset-button';
26
  }
27
 
28
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-button-field" id="field'+this.form_identifier+'-'+this.index+'"><input id="'+this.name+'" type="'+type+'" value="'+esc( this.sValue )+'" class="field '+clss+'" /><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
29
  },
30
  after_show:function()
31
  {
32
+ var me = this;
33
  $( '#'+this.name ).click(
34
  function()
35
  {
36
  var e = $( this );
37
  if( e.hasClass( 'calculate-button' ) )
38
  {
39
+ var items = $.fbuilder[ 'forms' ][ me.form_identifier ].getItems();
40
+ if(me.sLoading) $('<div class="cff-processing-form"></div>').appendTo(e.closest('#fbuilder'));
41
+ $(document).on('equationsQueueEmpty', function(evt, id){
42
+ if(id == me.form_identifier)
43
+ {
44
+ if(me.sLoading) e.closest('#fbuilder').find('.cff-processing-form').remove();
45
+ $(document).off('equationsQueueEmpty');
46
+ for(var i = 0, h = items.length; i < h; i++ )
47
+ {
48
+ if(items[i].ftype == 'fsummary')
49
+ {
50
+ items[i].update();
51
+ }
52
+ }
53
+ }
54
+ });
55
 
56
  $.fbuilder[ 'calculator' ].defaultCalc( '#'+e.closest( 'form' ).attr( 'id' ), false );
 
 
 
 
 
 
 
57
  }
58
  if( e.hasClass( 'reset-button' ) )
59
  {
83
  50
84
  );
85
  }
86
+ eval(me.sOnclick);
87
  }
88
  );
89
  }
js/fields-public/fbuilder.fcalculated.js CHANGED
@@ -261,6 +261,7 @@
261
  }
262
  catch(e)
263
  {
 
264
  return false;
265
  }
266
  };
@@ -286,8 +287,23 @@
286
  var CalcFieldClss = function(){};
287
  CalcFieldClss.prototype = {
288
  processing_queue : false, // Flag indicating the queued equations are being processed
 
289
  // object where attributes names are the forms identifiers, and their values the queue of equations
290
  queued_equations : {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  addEquation : function( calculated_field, equation, configuration, dependencies, form_identifier )
292
  {
293
  var equation_result = $('[id="'+calculated_field+'"]');
@@ -381,6 +397,7 @@
381
  }
382
  catch(e)
383
  {
 
384
  continue;
385
  }
386
  }
@@ -458,6 +475,7 @@
458
  }
459
 
460
  this.processing_queue = false;
 
461
  },
462
  format : function( value, config )
463
  {
261
  }
262
  catch(e)
263
  {
264
+ if(typeof console != 'undefined'){console.log(eq); console.log(e.message);}
265
  return false;
266
  }
267
  };
287
  var CalcFieldClss = function(){};
288
  CalcFieldClss.prototype = {
289
  processing_queue : false, // Flag indicating the queued equations are being processed
290
+ pendings : {},
291
  // object where attributes names are the forms identifiers, and their values the queue of equations
292
  queued_equations : {},
293
+ addPending : function(form_identifier)
294
+ {
295
+ if(!(form_identifier in this.pendings)) this.pendings[form_identifier] = 1;
296
+ else this.pendings[form_identifier]++;
297
+ },
298
+ removePending : function(form_identifier)
299
+ {
300
+ if((form_identifier in this.pendings) && this.pendings[form_identifier]) this.pendings[form_identifier]--;
301
+ },
302
+ thereIsPending : function(form_identifier)
303
+ {
304
+ if(form_identifier in this.pendings) return this.pendings[form_identifier];
305
+ return 0;
306
+ },
307
  addEquation : function( calculated_field, equation, configuration, dependencies, form_identifier )
308
  {
309
  var equation_result = $('[id="'+calculated_field+'"]');
397
  }
398
  catch(e)
399
  {
400
+ if(typeof console != 'undefined') console.log(e.message);
401
  continue;
402
  }
403
  }
475
  }
476
 
477
  this.processing_queue = false;
478
+ if(!this.thereIsPending(fSec)) $(document).trigger('equationsQueueEmpty', [fSec]);
479
  },
480
  format : function( value, config )
481
  {
js/modules/01_mathematical_logical/admin/module_admin.js CHANGED
@@ -15,6 +15,8 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
15
  { "value" : "(", "code" : "(", "tip" : "" },
16
  { "value" : ")", "code" : ")", "tip" : "" },
17
  { "value" : ",", "code" : ",", "tip" : "" },
 
 
18
  { "value" : "ABS", "code" : "ABS(", "tip" : "Returns the absolute value of the number passed as parameter. <strong>ABS(number)</strong>" },
19
  { "value" : "CEIL", "code" : "CEIL(", "tip" : "Returns the next higher integer that is greater than or equal to the number passed as parameter. <strong>CEIL(number)</strong><br>The CEIL operation accepts a second parameter for rounding the number to the next multiple of this second parameter. <strong>CEIL(X,Y)</strong>" },
20
  { "value" : "FLOOR", "code" : "FLOOR(", "tip" : "Returns the next lower integer that is less than or equal to the number passed as parameter. <strong>FLOOR(number)</strong><br>The FLOOR operation accepts a second parameter for rounding the number to the previous multiple of this second parameter. <strong>FLOOR(X,Y)</strong>" },
@@ -28,6 +30,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
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>" },
15
  { "value" : "(", "code" : "(", "tip" : "" },
16
  { "value" : ")", "code" : ")", "tip" : "" },
17
  { "value" : ",", "code" : ",", "tip" : "" },
18
+ { "value" : "SUM", "code" : "SUM(", "tip" : "Returns the sum of values passed by parameter. <strong>SUM(3,10,11)</strong> returns <strong>24</strong>" },
19
+ { "value" : "CONCATENATE", "code" : "CONCATENATE(", "tip" : "Returns a text with all parameters concatenated. <strong>CONCATENATE(1, 2, 3)</strong> returns <strong>123</strong>" },
20
  { "value" : "ABS", "code" : "ABS(", "tip" : "Returns the absolute value of the number passed as parameter. <strong>ABS(number)</strong>" },
21
  { "value" : "CEIL", "code" : "CEIL(", "tip" : "Returns the next higher integer that is greater than or equal to the number passed as parameter. <strong>CEIL(number)</strong><br>The CEIL operation accepts a second parameter for rounding the number to the next multiple of this second parameter. <strong>CEIL(X,Y)</strong>" },
22
  { "value" : "FLOOR", "code" : "FLOOR(", "tip" : "Returns the next lower integer that is less than or equal to the number passed as parameter. <strong>FLOOR(number)</strong><br>The FLOOR operation accepts a second parameter for rounding the number to the previous multiple of this second parameter. <strong>FLOOR(X,Y)</strong>" },
30
  { "value" : "MAX", "code" : "MAX(", "tip" : "Returns the greater value of the two parameters. <strong>MAX(number1, number2)</strong>" },
31
  { "value" : "MIN", "code" : "MIN(", "tip" : "Returns the lesser value of the two parameters. <strong>MIN(number1, number2)</strong>" },
32
  { "value" : "GCD", "code" : "GCD(", "tip" : "Returns greatest common divisor between the two parameters. <strong>GCD(number1, number2)</strong>" },
33
+ { "value" : "LCM", "code" : "LCM(", "tip" : "Returns the least common multiple between two parameters. <strong>LCM(number1, number2)</strong>" },
34
  { "value" : "SIN", "code" : "SIN(", "tip" : "SIN(x) returns the sine of x (x in radians).<br> <strong>SIN(3) = 0.1411200080598672</strong>" },
35
  { "value" : "COS", "code" : "COS(", "tip" : "COS(x) returns the cosine of x (x in radians).<br> <strong>COS(3) = -0.9899924966004454</strong>" },
36
  { "value" : "TAN", "code" : "TAN(", "tip" : "TAN(x) returns the tangent of x (x in radians).<br> <strong>TAN(3) = -0.1425465430742778</strong>" },
js/modules/01_mathematical_logical/public/module_public.js CHANGED
@@ -6,6 +6,11 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
6
  'prefix' : '',
7
  'callback' : function()
8
  {
 
 
 
 
 
9
  function ROUNDx(operation, num, y)
10
  {
11
  if(y && y != 0)
@@ -106,6 +111,30 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
106
  };
107
  } // End if window.CDATE
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  if(window.GCD == undefined)
110
  {
111
  window.GCD = window.gcd = function( a, b)
@@ -115,6 +144,14 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
115
  };
116
  } // End if window.GCD
117
 
 
 
 
 
 
 
 
 
118
  if(window.LOGAB == undefined)
119
  {
120
  window.LOGAB = window.logab = function( a, b)
6
  'prefix' : '',
7
  'callback' : function()
8
  {
9
+ if(Number.prototype.length == undefined)
10
+ {
11
+ Number.prototype.LENGTH = Number.prototype.length = function(){ return this.valueOf().toString().length;};
12
+ }
13
+
14
  function ROUNDx(operation, num, y)
15
  {
16
  if(y && y != 0)
111
  };
112
  } // End if window.CDATE
113
 
114
+ if(window.SUM == undefined)
115
+ {
116
+ window.SUM = window.sum = function ()
117
+ {
118
+ var r = 0, t;
119
+ for(var i in arguments)
120
+ {
121
+ t = arguments[i]*1;
122
+ if(!isNaN(t)) r += t;
123
+ }
124
+ return r;
125
+ };
126
+ } // End if window.SUM
127
+
128
+ if(window.CONCATENATE == undefined)
129
+ {
130
+ window.CONCATENATE = window.concatenate = function ()
131
+ {
132
+ var r = '';
133
+ for(var i in arguments) r += (new String(arguments[i]));
134
+ return r;
135
+ };
136
+ } // End if window.CONCATENATE
137
+
138
  if(window.GCD == undefined)
139
  {
140
  window.GCD = window.gcd = function( a, b)
144
  };
145
  } // End if window.GCD
146
 
147
+ if(window.LCM == undefined)
148
+ {
149
+ window.LCM = window.lcm = function( a, b)
150
+ {
151
+ return (!a || !b) ? 0 : ABS((a * b) / GCD(a, b));
152
+ };
153
+ } // End if window.LCM
154
+
155
  if(window.LOGAB == undefined)
156
  {
157
  window.LOGAB = window.logab = function( a, b)
js/modules/05_managing_fields/admin/module_admin.js CHANGED
@@ -5,13 +5,23 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modul
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
  }
5
  fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ] = {
6
  'tutorial' : 'https://cff.dwbooster.com/documentation#managing-fields-module',
7
  'toolbars' : {
8
+ 'fields' : {
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
+ "value" : "IGNOREFIELD",
18
+ "code" : "IGNOREFIELD(",
19
+ "tip" : "<p>Ignore a field explicitly, similar to dependencies. <strong>IGNOREFIELD( # or fieldname#, form or form selector )</strong></p><p>Ignores the field for the equations and submission. The first parameter is required, it would be the numeric part of the field name or the field name. The second parameter would be a form object, or a selector with the form reference. If the second parameter is not passed, the plugin will apply the ignore action to the field in the first form of the page. For example: IGNOREFIELD(1); or IGNOREFIELD(&quot;fieldname1&quot;);</p>"
20
+ },
21
+ {
22
+ "value" : "ACTIVATEFIELD",
23
+ "code" : "ACTIVATEFIELD(",
24
+ "tip" : "<p>Activates a field explicitly, similar to dependencies. <strong>ACTIVATEFIELD( # or fieldname#, form or form selector )</strong></p><p>Activates the field for the equations and submission. The first parameter is required, it would be the numeric part of the field name or the field name. The second parameter would be a form object, or a selector with the form reference. If the second parameter is not passed, the plugin will apply the activates action to the field in the first form of the page. For example: ACTIVATEFIELD(1); or ACTIVATEFIELD(&quot;fieldname1&quot;);</p>"
25
  }
26
  ]
27
  }
js/modules/05_managing_fields/public/05_managing_fields.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * managing_fields.js v0.1
3
+ * By: CALCULATED FIELD PROGRAMMERS
4
+ * The script allows managing fields
5
+ * Copyright 2015 CODEPEOPLE
6
+ * You may use this project under MIT or GPL licenses.
7
+ */
8
+
9
+ ;(function(root){
10
+ var lib = {};
11
+ lib.cf_processing_version = '0.1';
12
+
13
+ /*** PRIVATE FUNCTIONS ***/
14
+
15
+ function _getForm(_form)
16
+ {
17
+ if(typeof _form == 'undefined') return '_1';
18
+ return $(_form).find('[name="cp_calculatedfieldsf_pform_psequence"]').val();
19
+ }
20
+
21
+ function _getField( _field, _form )
22
+ {
23
+ return $.fbuilder['forms'][_getForm(_form)].getItem(_field);
24
+ }
25
+
26
+ /*** PUBLIC FUNCTIONS ***/
27
+
28
+ lib.activatefield = lib.ACTIVATEFIELD = function( _field, _form )
29
+ {
30
+ var o = _getForm(_form), f = _getField(_field, _form), j;
31
+ if(f)
32
+ {
33
+ j = f.jQueryRef();
34
+ j.add(j.find('.fields')).show();
35
+ if(f.name in $.fbuilder.forms[o].toHide) delete $.fbuilder.forms[o].toHide[f.name];
36
+ if(!(f.name in $.fbuilder.forms[o].toShow)) $.fbuilder.forms[o].toShow[f.name] = {'ref': {}};
37
+ j.find('[id*="'+f.name+'"]').removeClass('ignore').change();
38
+ $.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});
39
+ }
40
+ };
41
+
42
+ lib.ignorefield = lib.IGNOREFIELD = function( _field, _form )
43
+ {
44
+ var o = _getForm(_form), f = _getField(_field, _form), j;
45
+ if(f)
46
+ {
47
+ j = f.jQueryRef();
48
+ j.add(j.find('.fields')).hide();
49
+ if(!(f.name in $.fbuilder.forms[o].toHide)) $.fbuilder.forms[o].toHide[f.name] = {};
50
+ if(f.name in $.fbuilder.forms[o].toShow) delete $.fbuilder.forms[o].toShow[f.name];
51
+ j.find('[id*="'+f.name+'"]').addClass('ignore').change();
52
+ $.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});
53
+ }
54
+ };
55
+
56
+ root.CF_FIELDS_MANAGEMENT = lib;
57
+
58
+ })(this);
js/modules/05_managing_fields/public/module_public.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
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
+ 'prefix' : '',
7
+ 'callback' : function()
8
+ {
9
+ fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ]( fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'processing' ][ 'prefix' ], CF_FIELDS_MANAGEMENT );
10
+ }
11
+ };
js/modules/06_connector/admin/module_admin.js CHANGED
@@ -5,7 +5,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modul
5
  fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'connector' ] = {
6
  'tutorial' : 'https://cff.dwbooster.com/documentation#connection-module',
7
  'toolbars' : {
8
- 'processing' : {
9
  'label' : 'Third-party Connection',
10
  'buttons' : [
11
  {
5
  fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'connector' ] = {
6
  'tutorial' : 'https://cff.dwbooster.com/documentation#connection-module',
7
  'toolbars' : {
8
+ 'connector' : {
9
  'label' : 'Third-party Connection',
10
  'buttons' : [
11
  {
js/modules/06_connector/public/01_connector.js CHANGED
@@ -26,20 +26,22 @@
26
 
27
  if(typeof lib.records[index] != 'undefined') return lib.records[index];
28
  var form_id = (typeof $.fbuilder['currentFormId'] != 'undefined') ? $.fbuilder['currentFormId'] : 'cp_calculatedfieldsf_pform_1',
29
- aux = (function(eq){
30
  return function(value){
31
  lib.records[index] = value;
32
  $.fbuilder.calculator.enqueueEquation(eq.identifier, [eq]);
 
33
  if(!$.fbuilder.calculator.processing_queue)
34
  {
35
  $.fbuilder.calculator.processQueue(eq.identifier);
36
  }
37
  };
38
- })($.fbuilder['currentEq']),
39
  f = args[0];
40
 
41
  args.shift();
42
  args.push(aux);
 
43
  f.apply(null, args);
44
  };
45
 
26
 
27
  if(typeof lib.records[index] != 'undefined') return lib.records[index];
28
  var form_id = (typeof $.fbuilder['currentFormId'] != 'undefined') ? $.fbuilder['currentFormId'] : 'cp_calculatedfieldsf_pform_1',
29
+ aux = (function(eq, index){
30
  return function(value){
31
  lib.records[index] = value;
32
  $.fbuilder.calculator.enqueueEquation(eq.identifier, [eq]);
33
+ $.fbuilder.calculator.removePending(eq.identifier);
34
  if(!$.fbuilder.calculator.processing_queue)
35
  {
36
  $.fbuilder.calculator.processQueue(eq.identifier);
37
  }
38
  };
39
+ })($.fbuilder['currentEq'], index),
40
  f = args[0];
41
 
42
  args.shift();
43
  args.push(aux);
44
+ $.fbuilder.calculator.addPending($.fbuilder['currentEq']['identifier']);
45
  f.apply(null, args);
46
  };
47
 
js/modules/08_url/admin/module_admin.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
2
+ fbuilderjQuery[ 'fbuilder' ] = fbuilderjQuery[ 'fbuilder' ] || {};
3
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modules' ] || {};
4
+
5
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'url' ] = {
6
+ 'tutorial' : 'https://cff.dwbooster.com/documentation#url-module',
7
+ 'toolbars' : {
8
+ 'url' : {
9
+ 'label' : 'URLs and Parameters',
10
+ 'buttons' : [
11
+ {
12
+ "value" : "getURL",
13
+ "code" : "getURL()",
14
+ "tip" : "<p>Returns the current URL. <strong>getURL()</strong></p>"
15
+ },
16
+ {
17
+ "value" : "getBaseURL",
18
+ "code" : "getBaseURL()",
19
+ "tip" : "<p>Returns the base URL of the current page. <strong>getBaseURL()</strong></p>"
20
+ },
21
+ {
22
+ "value" : "getURLHash",
23
+ "code" : "getURLHash()",
24
+ "tip" : "<p>Returns # followed by the fragment identifier of the current page URL, or empty text. getURLHash accepts an optional parameter to removes the hash (#) symbol.<br>Ex. https://www.website.com/page#position<br><strong>getURLHash()</strong> returns <strong>#position</strong><br><strong>getURLHash(true)</strong> returns <strong>position</strong></p>"
25
+ },
26
+ {
27
+ "value" : "getURLPath",
28
+ "code" : "getURLPath()",
29
+ "tip" : "<p>Returns the initial / symbol followed by the path of the current page URL, or empty text. getURLPath accepts an optional parameter to removes the leading and trailing slash (/) symbols.<br>Ex. https://www.website.com/pages/page1/<br><strong>getURLPath()</strong> returns <strong>/pages/page1/</strong><br><strong>getURLPath(true)</strong> returns <strong>pages/page1</strong></p>"
30
+ },
31
+ {
32
+ "value" : "getURLParameters",
33
+ "code" : "getURLParameters()",
34
+ "tip" : "<p>Returns a plain object with the URLs parameters. The operation accepts an URL as optional parameter. <strong>getURLParameters()</strong></p>"
35
+ },
36
+ {
37
+ "value" : "getURLParameter",
38
+ "code" : "getURLParameter(",
39
+ "tip" : "<p>Returns the value of an URL parameter. The operation accepts two parameters: the parameter name and the dafault value. The default value would be returned if the URL parameter does not exist. If not default value is passed as parameter, and the URL parameter does not exist, the operation returns null. <strong>getURLParameter(parameter_name, default_value)</strong> the default_value is optional.</p>"
40
+ },
41
+ {
42
+ "value" : "generateURL",
43
+ "code" : "generateURL(",
44
+ "tip" : "<p>Generates an URL given their components. The operation accepts three parameters: the base URL (required parameter), a plain object for the URL parameters (optional parameter), a text with the hash (optional parameter). <strong>generateURL(&quot;http://www.website.com&quot;, {&quot;param1&quot;:&quot;value1&quot;, &quot;param2&quot;:&quot;value2&quot;}, &quot;bookmark&quot;)</strong> returns the URL <strong>http://www.website.com?param1=value1&param2=value2#bookmark</strong></p>"
45
+ },
46
+ {
47
+ "value" : "redirectToURL",
48
+ "code" : "redirectToURL(",
49
+ "tip" : "<p>Redirects the user. The operation accepts two parameters: the URL and a plain object for the parameters. <strong>redirectToURL(url, object)</strong> the object is optional.</p>"
50
+ },
51
+
52
+ ]
53
+ }
54
+ }
55
+ };
js/modules/08_url/public/01_url.js ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * url.js v0.1
3
+ * By: CALCULATED FIELD PROGRAMMERS
4
+ * Includes operations to interact with the URLs and parameters
5
+ * Copyright 2020 CODEPEOPLE
6
+ */
7
+
8
+ ;(function(root){
9
+ var lib = {
10
+ records: {}
11
+ };
12
+
13
+ /*** PRIVATE FUNCTIONS ***/
14
+
15
+ /*** PUBLIC FUNCTIONS ***/
16
+
17
+ lib.cff_url_version = '0.1';
18
+
19
+ // generateURL()
20
+ lib.generateURL = lib.generateurl = lib.GENERATEURL = function(url, params, hash){
21
+ var urlComponents = url.split('#'), queryString = '', connector = '';
22
+ if(typeof params == 'object' && params)
23
+ {
24
+ connector = (url.indexOf('?') == -1) ? '?' : '&';
25
+ queryString = jQuery.param(params);
26
+ }
27
+ if(typeof hash == 'string') urlComponents[1] = hash;
28
+ urlComponents[0] += connector+queryString;
29
+ return urlComponents.join('#');
30
+ };
31
+
32
+ // redirectToURL()
33
+ lib.redirectToURL = lib.redirecttourl = lib.REDIRECTTOURL = function(url, obj){
34
+ document.location.href = url+( obj ? (url.indexOf('?') === -1 ? '?' : '&')+$.param(obj) : '');
35
+ };
36
+
37
+ // getURL()
38
+ lib.getURL = lib.geturl = lib.GETURL = function(){
39
+ return document.location.href;
40
+ };
41
+
42
+ // getBaseURL()
43
+ lib.getBaseURL = lib.getbaseurl = lib.GETBASEURL = function(){
44
+ return window.location.protocol + '//' + window.location.host + '/';
45
+ };
46
+
47
+ // getURLHash()
48
+ lib.getURLHash = lib.geturlhash = lib.GETURLHASH = function(nohash){
49
+ return window.location.hash.replace((nohash) ? /^#/ : '', '');
50
+ };
51
+
52
+ // getURLPath()
53
+ lib.getURLPath = lib.geturlpath = lib.GETURLPATH = function(noslash){
54
+ return window.location.pathname.replace((noslash) ? new RegExp('^\/', 'g') : '', '').replace((noslash) ? new RegExp('\/$','g') : '', '');
55
+ };
56
+
57
+ // getURLParameters(url) the url is optional
58
+ lib.getURLParameters = lib.geturlparameters = lib.GETURLPARAMETERS = function(url){
59
+ var qs = url ? url.split('?')[1] : window.location.search.slice(1),
60
+ obj = {};
61
+ if(qs)
62
+ {
63
+ qs = qs.split('#')[0];
64
+ var arr = qs.split('&');
65
+ for (var i = 0; i < arr.length; i++)
66
+ {
67
+ var a = arr[i].split('='),
68
+ paramName = a[0],
69
+ paramValue = typeof (a[1]) === 'undefined' ? true : a[1];
70
+
71
+ paramName = paramName.toLowerCase();
72
+ if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase();
73
+
74
+ if (paramName.match(/\[(\d+)?\]$/))
75
+ {
76
+ var key = paramName.replace(/\[(\d+)?\]/, '');
77
+ if (!obj[key]) obj[key] = [];
78
+ if (paramName.match(/\[\d+\]$/))
79
+ {
80
+ var index = /\[(\d+)\]/.exec(paramName)[1];
81
+ obj[key][index] = paramValue;
82
+ }
83
+ else
84
+ {
85
+ obj[key].push(paramValue);
86
+ }
87
+ }
88
+ else
89
+ {
90
+ if (!obj[paramName])
91
+ {
92
+ obj[paramName] = paramValue;
93
+ }
94
+ else if (obj[paramName] && typeof obj[paramName] === 'string')
95
+ {
96
+ obj[paramName] = [obj[paramName]];
97
+ obj[paramName].push(paramValue);
98
+ }
99
+ else
100
+ {
101
+ obj[paramName].push(paramValue);
102
+ }
103
+ }
104
+ }
105
+ }
106
+ return obj;
107
+ };
108
+
109
+ // getURLParameter(paramName, defaultValue) defaultValue is optional
110
+ lib.getURLParameter = lib.geturlparameter = lib.GETURLPARAMETER = function(paramName, defaultValue){
111
+ var parameters = lib.getURLParameters();
112
+ paramName = paramName.toLowerCase();
113
+ if(paramName in parameters) return parameters[paramName];
114
+ else if(defaultValue) return defaultValue;
115
+ else return null;
116
+ }
117
+
118
+ root.CF_URL = lib;
119
+
120
+ })(this);
js/modules/08_url/public/module_public.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fbuilderjQuery = ( typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
2
+ fbuilderjQuery[ 'fbuilder' ] = fbuilderjQuery[ 'fbuilder' ] || {};
3
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ] = fbuilderjQuery[ 'fbuilder' ][ 'modules' ] || {};
4
+
5
+ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'url' ] = {
6
+ 'prefix' : '',
7
+ 'callback' : function()
8
+ {
9
+ fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ](fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'url' ][ 'prefix' ], CF_URL);
10
+ }
11
+ };
languages/calculated-fields-form-en_US.mo CHANGED
Binary file
languages/calculated-fields-form-en_US.po CHANGED
@@ -1,98 +1,97 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2017-05-14 00:25+0200\n"
5
- "PO-Revision-Date: 2017-05-14 00:25+0200\n"
6
- "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.0.2\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
- #: cp_calculatedfieldsf.php:780
19
- msgid "Request custom changes"
20
- msgstr ""
21
-
22
- #: cp_calculatedfieldsf.php:781 cp_calculatedfieldsf_admin_int_list.inc.php:233
23
- msgid "Settings"
24
- msgstr ""
25
-
26
- #: cp_calculatedfieldsf.php:782 cp_calculatedfieldsf_admin_int_list.inc.php:293
27
- msgid "Upgrade"
28
- msgstr ""
29
-
30
- #: cp_calculatedfieldsf.php:783 cp_calculatedfieldsf_admin_int.php:350
31
- #: cp_calculatedfieldsf_admin_int.php:629
32
- #: cp_calculatedfieldsf_admin_int_list.inc.php:293
33
- msgid "Help"
34
  msgstr ""
35
 
36
- #: cp_calculatedfieldsf.php:789 cp_calculatedfieldsf_admin_int.php:340
37
- msgid "Insert Calculated Fields Form"
38
- msgstr ""
39
-
40
- #: cp_calculatedfieldsf.php:789
41
- msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
42
- msgstr ""
43
-
44
- #: cp_calculatedfieldsf.php:998
45
  msgid ""
46
  "<div class=\"error-text\">The data cannot be stored in database because has "
47
  "occurred an error with the database structure. Please, go to the plugins "
48
  "section and Deactivate/Activate the plugin to be sure the structure of "
49
  "database has been checked, and corrected if needed. If the issue persist, "
50
- "please <a href=\"http://wordpress.dwbooster.com/support\">contact us</a></"
51
- "div>"
52
  msgstr ""
53
 
54
- #: cp_calculatedfieldsf.php:1014
55
  msgid ""
56
  "<div class=\"error-text\">The data cannot be stored in database because has "
57
  "occurred an error with the form structure. Please, try to save the data "
58
  "again. If have been copied and pasted data from external text editors, the "
59
  "data can contain invalid characters. If the issue persist, please <a href="
60
- "\"http://wordpress.dwbooster.com/support\">contact us</a></div>"
61
- msgstr ""
62
-
63
- #: cp_calculatedfieldsf_admin_int.php:5
64
- #: cp_calculatedfieldsf_admin_int_list.inc.php:5
65
- msgid "Direct access not allowed."
66
  msgstr ""
67
 
68
- #: cp_calculatedfieldsf_admin_int.php:20
69
  msgid "Settings saved"
70
  msgstr ""
71
 
72
- #: cp_calculatedfieldsf_admin_int.php:33
73
- #: cp_calculatedfieldsf_admin_int_list.inc.php:141
 
 
 
 
 
 
74
  msgid "Calculated Fields Form"
75
  msgstr ""
76
 
77
- #: cp_calculatedfieldsf_admin_int.php:35
 
 
 
 
 
 
 
 
78
  msgid "Back to items list..."
79
  msgstr ""
80
 
81
- #: cp_calculatedfieldsf_admin_int.php:45 cp_calculatedfieldsf_admin_int.php:205
82
  msgid "Form Settings"
83
  msgstr ""
84
 
85
- #: cp_calculatedfieldsf_admin_int.php:47
86
  msgid ""
87
  "* Different form styles available on the tab Form Settings &gt;&gt; Form "
88
  "Template"
89
  msgstr ""
90
 
91
- #: cp_calculatedfieldsf_admin_int.php:49
92
  msgid "Form Builder"
93
  msgstr ""
94
 
95
- #: cp_calculatedfieldsf_admin_int.php:58
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  msgid ""
97
  "If the form is not loading in the public website, go to the settings page of "
98
  "the plugin through the menu option: \"Settings/Calculated Fields Form\", "
@@ -100,525 +99,786 @@ msgid ""
100
  "press the \"Update\" button."
101
  msgstr ""
102
 
103
- #: cp_calculatedfieldsf_admin_int.php:58
104
  msgid ""
105
  "If you need also the form to be sent to the server side for processing (for "
106
- "example to deliver emails) then the <a href=\"http://cff.dwbooster.com/\" "
107
  "target=\"_blank\">Professional or Developer versions</a> of the plugin will "
108
  "be required."
109
  msgstr ""
110
 
111
- #: cp_calculatedfieldsf_admin_int.php:94 cp_calculatedfieldsf_admin_int.php:100
112
- #: cp_calculatedfieldsf_admin_int.php:106
113
- #: cp_calculatedfieldsf_admin_int.php:112
114
- #: cp_calculatedfieldsf_admin_int.php:118
 
 
 
115
  msgid ""
116
  "These features aren't available in this version. Do you want to open the "
117
  "plugin's page to check other versions?"
118
  msgstr ""
119
 
120
- #: cp_calculatedfieldsf_admin_int.php:203
121
  msgid "Add a Field"
122
  msgstr ""
123
 
124
- #: cp_calculatedfieldsf_admin_int.php:204
125
  msgid "Field Settings"
126
  msgstr ""
127
 
128
- #: cp_calculatedfieldsf_admin_int.php:226
129
- #: cp_calculatedfieldsf_admin_int.php:347
130
- #: cp_calculatedfieldsf_admin_int.php:626
131
  msgid "Save Changes"
132
  msgstr ""
133
 
134
- #: cp_calculatedfieldsf_admin_int.php:227
135
- #: cp_calculatedfieldsf_admin_int.php:586
136
- msgid "Preview"
137
  msgstr ""
138
 
139
- #: cp_calculatedfieldsf_admin_int.php:231
140
  msgid "Define Texts"
141
  msgstr ""
142
 
143
- #: cp_calculatedfieldsf_admin_int.php:235
144
  msgid "Previous button label (text)"
145
  msgstr ""
146
 
147
- #: cp_calculatedfieldsf_admin_int.php:239
148
  msgid "Next button label (text)"
149
  msgstr ""
150
 
151
- #: cp_calculatedfieldsf_admin_int.php:244
152
  msgid ""
153
  "- The styles can be applied into any of the CSS files of your theme or into "
154
  "the CSS file <em>\"calculated-fields-form\\css\\stylepublic.css\"</em>."
155
  msgstr ""
156
 
157
- #: cp_calculatedfieldsf_admin_int.php:245
158
  msgid ""
159
  "- For general CSS styles modifications to the form and samples <a href="
160
- "\"http://cff.dwbooster.com/faq#q82\" target=\"_blank\">check this FAQ</a>."
161
  msgstr ""
162
 
163
- #: cp_calculatedfieldsf_admin_int.php:267
164
  msgid "Validation Settings"
165
  msgstr ""
166
 
167
- #: cp_calculatedfieldsf_admin_int.php:271
168
- msgid "Use Validation?"
169
- msgstr ""
170
-
171
- #: cp_calculatedfieldsf_admin_int.php:275
172
- #: cp_calculatedfieldsf_admin_int.php:487
173
- #: cp_calculatedfieldsf_admin_int.php:524
174
- #: cp_calculatedfieldsf_admin_int.php:565
175
- msgid "Yes"
176
- msgstr ""
177
-
178
- #: cp_calculatedfieldsf_admin_int.php:281
179
  msgid "\"is required\" text"
180
  msgstr ""
181
 
182
- #: cp_calculatedfieldsf_admin_int.php:285
183
  msgid "\"is email\" text"
184
  msgstr ""
185
 
186
- #: cp_calculatedfieldsf_admin_int.php:289
187
  msgid "\"is valid captcha\" text"
188
  msgstr ""
189
 
190
- #: cp_calculatedfieldsf_admin_int.php:294
191
  msgid "\"is valid date (mm/dd/yyyy)\" text"
192
  msgstr ""
193
 
194
- #: cp_calculatedfieldsf_admin_int.php:298
195
  msgid "\"is valid date (dd/mm/yyyy)\" text"
196
  msgstr ""
197
 
198
- #: cp_calculatedfieldsf_admin_int.php:302
199
  msgid "\"is number\" text"
200
  msgstr ""
201
 
202
- #: cp_calculatedfieldsf_admin_int.php:306
203
  msgid "\"only digits\" text"
204
  msgstr ""
205
 
206
- #: cp_calculatedfieldsf_admin_int.php:310
207
  msgid "\"under maximum\" text"
208
  msgstr ""
209
 
210
- #: cp_calculatedfieldsf_admin_int.php:314
211
  msgid "\"over minimum\" text"
212
  msgstr ""
213
 
214
- #: cp_calculatedfieldsf_admin_int.php:337
215
  msgid "Note"
216
  msgstr ""
217
 
218
- #: cp_calculatedfieldsf_admin_int.php:339
219
  msgid "To insert this form in a post/page, use the dedicated icon"
220
  msgstr ""
221
 
222
- #: cp_calculatedfieldsf_admin_int.php:341
 
 
 
 
223
  msgid ""
224
  "which has been added to your Upload/Insert Menu, just below the title of "
225
  "your Post/Page."
226
  msgstr ""
227
 
228
- #: cp_calculatedfieldsf_admin_int.php:350
229
- #: cp_calculatedfieldsf_admin_int.php:629
230
- #: cp_calculatedfieldsf_admin_int_list.inc.php:293
231
  msgid "Request Custom Modifications"
232
  msgstr ""
233
 
234
- #: cp_calculatedfieldsf_admin_int.php:354
 
 
 
 
 
235
  msgid ""
236
- "The following settings are available only in the <a href=\"http://cff."
237
  "dwbooster.com/\">pro version</a>"
238
  msgstr ""
239
 
240
- #: cp_calculatedfieldsf_admin_int.php:356
241
  msgid "Form Processing and Payment Settings"
242
  msgstr ""
243
 
244
- #: cp_calculatedfieldsf_admin_int.php:360
245
  msgid "Payment Settings"
246
  msgstr ""
247
 
248
- #: cp_calculatedfieldsf_admin_int.php:365
249
  msgid "Request cost"
250
  msgstr ""
251
 
252
- #: cp_calculatedfieldsf_admin_int.php:370
253
  msgid "Currency"
254
  msgstr ""
255
 
256
- #: cp_calculatedfieldsf_admin_int.php:375
257
  msgid "Base amount"
258
  msgstr ""
259
 
260
- #: cp_calculatedfieldsf_admin_int.php:376
261
  msgid ""
262
  "Minimum amount to charge. If the final price is lesser than this number, the "
263
  "base amount will be applied."
264
  msgstr ""
265
 
266
- #: cp_calculatedfieldsf_admin_int.php:381
267
  msgid "Paypal product name"
268
  msgstr ""
269
 
270
- #: cp_calculatedfieldsf_admin_int.php:386
271
  msgid "Discount Codes"
272
  msgstr ""
273
 
274
- #: cp_calculatedfieldsf_admin_int.php:388
275
  msgid "This feature isn't available in this version."
276
  msgstr ""
277
 
278
- #: cp_calculatedfieldsf_admin_int.php:391
279
  msgid "Add new discount code"
280
  msgstr ""
281
 
282
- #: cp_calculatedfieldsf_admin_int.php:393
283
  msgid "Code"
284
  msgstr ""
285
 
286
- #: cp_calculatedfieldsf_admin_int.php:394
287
  msgid "Discount"
288
  msgstr ""
289
 
290
- #: cp_calculatedfieldsf_admin_int.php:395
291
  msgid "Percent"
292
  msgstr ""
293
 
294
- #: cp_calculatedfieldsf_admin_int.php:396
295
  msgid "Fixed Value"
296
  msgstr ""
297
 
298
- #: cp_calculatedfieldsf_admin_int.php:399
299
  msgid "Valid until"
300
  msgstr ""
301
 
302
- #: cp_calculatedfieldsf_admin_int.php:400
303
- #: cp_calculatedfieldsf_admin_int_list.inc.php:253
304
  msgid "Add"
305
  msgstr ""
306
 
307
- #: cp_calculatedfieldsf_admin_int.php:402
308
  msgid "Note: Expiration date based in server time. Server time now is"
309
  msgstr ""
310
 
311
- #: cp_calculatedfieldsf_admin_int.php:410
312
  msgid "Paypal Payment Configuration"
313
  msgstr ""
314
 
315
- #: cp_calculatedfieldsf_admin_int.php:415
316
  msgid "Enable Paypal Payments?"
317
  msgstr ""
318
 
319
- #: cp_calculatedfieldsf_admin_int.php:420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  msgid "Paypal Mode"
321
  msgstr ""
322
 
323
- #: cp_calculatedfieldsf_admin_int.php:422
324
  msgid "Production - real payments processed"
325
  msgstr ""
326
 
327
- #: cp_calculatedfieldsf_admin_int.php:423
328
  msgid "SandBox - PayPal testing sandbox area"
329
  msgstr ""
330
 
331
- #: cp_calculatedfieldsf_admin_int.php:429
332
  msgid "Paypal email"
333
  msgstr ""
334
 
335
- #: cp_calculatedfieldsf_admin_int.php:434
336
  msgid "A $0 amount to pay means"
337
  msgstr ""
338
 
339
- #: cp_calculatedfieldsf_admin_int.php:436
340
  msgid "Let the user enter any amount at PayPal (ex: for a donation)"
341
  msgstr ""
342
 
343
- #: cp_calculatedfieldsf_admin_int.php:437
344
  msgid "Don't require any payment. Form is submitted skiping the PayPal page."
345
  msgstr ""
346
 
347
- #: cp_calculatedfieldsf_admin_int.php:443
348
  msgid "Paypal language"
349
  msgstr ""
350
 
351
- #: cp_calculatedfieldsf_admin_int.php:448
352
  msgid "Payment frequency"
353
  msgstr ""
354
 
355
- #: cp_calculatedfieldsf_admin_int.php:452
356
  msgid "One time payment (default option, user is billed only once)"
357
  msgstr ""
358
 
359
- #: cp_calculatedfieldsf_admin_int.php:453
360
  msgid "Bill the user every 1 month"
361
  msgstr ""
362
 
363
- #: cp_calculatedfieldsf_admin_int.php:454
364
  msgid "Bill the user every 3 months"
365
  msgstr ""
366
 
367
- #: cp_calculatedfieldsf_admin_int.php:455
368
  msgid "Bill the user every 6 months"
369
  msgstr ""
370
 
371
- #: cp_calculatedfieldsf_admin_int.php:456
372
  msgid "Bill the user every 12 months"
373
  msgstr ""
374
 
375
- #: cp_calculatedfieldsf_admin_int.php:467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  msgid "Form Processing / Email Settings"
377
  msgstr ""
378
 
379
- #: cp_calculatedfieldsf_admin_int.php:471
380
  msgid "\"From\" email"
381
  msgstr ""
382
 
383
- #: cp_calculatedfieldsf_admin_int.php:475
 
 
 
 
 
 
384
  msgid "Destination emails (comma separated)"
385
  msgstr ""
386
 
387
- #: cp_calculatedfieldsf_admin_int.php:479
388
- #: cp_calculatedfieldsf_admin_int.php:534
389
  msgid "Email subject"
390
  msgstr ""
391
 
392
- #: cp_calculatedfieldsf_admin_int.php:483
393
  msgid "Include additional information?"
394
  msgstr ""
395
 
396
- #: cp_calculatedfieldsf_admin_int.php:488
397
- #: cp_calculatedfieldsf_admin_int.php:525
398
- #: cp_calculatedfieldsf_admin_int.php:566
399
- msgid "No"
 
 
 
 
 
400
  msgstr ""
401
 
402
- #: cp_calculatedfieldsf_admin_int.php:493
403
  msgid "Thank you page (after sending the message)"
404
  msgstr ""
405
 
406
- #: cp_calculatedfieldsf_admin_int.php:497
407
- #: cp_calculatedfieldsf_admin_int.php:538
408
  msgid "Email format?"
409
  msgstr ""
410
 
411
- #: cp_calculatedfieldsf_admin_int.php:501
412
- #: cp_calculatedfieldsf_admin_int.php:542
413
  msgid "Plain Text (default)"
414
  msgstr ""
415
 
416
- #: cp_calculatedfieldsf_admin_int.php:502
417
- #: cp_calculatedfieldsf_admin_int.php:543
418
  msgid "HTML (use html in the textarea below)"
419
  msgstr ""
420
 
421
- #: cp_calculatedfieldsf_admin_int.php:507
422
- #: cp_calculatedfieldsf_admin_int.php:548
423
  msgid "Message"
424
  msgstr ""
425
 
426
- #: cp_calculatedfieldsf_admin_int.php:516
427
  msgid "Email Copy to User"
428
  msgstr ""
429
 
430
- #: cp_calculatedfieldsf_admin_int.php:520
431
  msgid "Send confirmation/thank you message to user?"
432
  msgstr ""
433
 
434
- #: cp_calculatedfieldsf_admin_int.php:530
435
  msgid "Email field on the form"
436
  msgstr ""
437
 
438
- #: cp_calculatedfieldsf_admin_int.php:557
439
  msgid "Captcha Verification"
440
  msgstr ""
441
 
442
- #: cp_calculatedfieldsf_admin_int.php:561
443
  msgid "Use Captcha Verification?"
444
  msgstr ""
445
 
446
- #: cp_calculatedfieldsf_admin_int.php:572
447
  msgid "Width"
448
  msgstr ""
449
 
450
- #: cp_calculatedfieldsf_admin_int.php:574
451
  msgid "Height"
452
  msgstr ""
453
 
454
- #: cp_calculatedfieldsf_admin_int.php:576
455
  msgid "Chars"
456
  msgstr ""
457
 
458
- #: cp_calculatedfieldsf_admin_int.php:581
459
  msgid "Min font size"
460
  msgstr ""
461
 
462
- #: cp_calculatedfieldsf_admin_int.php:583
463
  msgid "Max font size"
464
  msgstr ""
465
 
466
- #: cp_calculatedfieldsf_admin_int.php:588
467
  msgid "security code"
468
  msgstr ""
469
 
470
- #: cp_calculatedfieldsf_admin_int.php:594
471
  msgid "Noise"
472
  msgstr ""
473
 
474
- #: cp_calculatedfieldsf_admin_int.php:596
475
  msgid "Noise Length"
476
  msgstr ""
477
 
478
- #: cp_calculatedfieldsf_admin_int.php:601
479
  msgid "Background"
480
  msgstr ""
481
 
482
- #: cp_calculatedfieldsf_admin_int.php:608
483
  msgid "Font"
484
  msgstr ""
485
 
486
- #: cp_calculatedfieldsf_admin_int_list.inc.php:71
487
  msgid "Item added"
488
  msgstr ""
489
 
490
- #: cp_calculatedfieldsf_admin_int_list.inc.php:77
491
  msgid "Item updated"
492
  msgstr ""
493
 
494
- #: cp_calculatedfieldsf_admin_int_list.inc.php:86
495
  msgid "Item deleted"
496
  msgstr ""
497
 
498
- #: cp_calculatedfieldsf_admin_int_list.inc.php:94
499
  msgid "Item duplicated/cloned"
500
  msgstr ""
501
 
502
- #: cp_calculatedfieldsf_admin_int_list.inc.php:133
 
 
 
 
503
  msgid "Troubleshoot settings updated"
504
  msgstr ""
505
 
506
- #: cp_calculatedfieldsf_admin_int_list.inc.php:187
507
  msgid "Are you sure that you want to delete this item?"
508
  msgstr ""
509
 
510
- #: cp_calculatedfieldsf_admin_int_list.inc.php:195
511
  msgid "Are you sure that you want to update these settings?"
512
  msgstr ""
513
 
514
- #: cp_calculatedfieldsf_admin_int_list.inc.php:213
515
  msgid "Form List / Items List"
516
  msgstr ""
517
 
518
- #: cp_calculatedfieldsf_admin_int_list.inc.php:219
519
  msgid "ID"
520
  msgstr ""
521
 
522
- #: cp_calculatedfieldsf_admin_int_list.inc.php:219
523
  msgid "Form Name"
524
  msgstr ""
525
 
526
- #: cp_calculatedfieldsf_admin_int_list.inc.php:219
527
  msgid "Options"
528
  msgstr ""
529
 
530
- #: cp_calculatedfieldsf_admin_int_list.inc.php:219
531
  msgid "Shortcode"
532
  msgstr ""
533
 
534
- #: cp_calculatedfieldsf_admin_int_list.inc.php:232
535
  msgid "Update"
536
  msgstr ""
537
 
538
- #: cp_calculatedfieldsf_admin_int_list.inc.php:234
 
 
 
 
539
  msgid "Messages"
540
  msgstr ""
541
 
542
- #: cp_calculatedfieldsf_admin_int_list.inc.php:235
543
  msgid "Clone"
544
  msgstr ""
545
 
546
- #: cp_calculatedfieldsf_admin_int_list.inc.php:236
547
  msgid "Delete"
548
  msgstr ""
549
 
550
- #: cp_calculatedfieldsf_admin_int_list.inc.php:248
551
  msgid "New Form"
552
  msgstr ""
553
 
554
- #: cp_calculatedfieldsf_admin_int_list.inc.php:252
555
  msgid "Item Name"
556
  msgstr ""
557
 
558
- #: cp_calculatedfieldsf_admin_int_list.inc.php:260
559
  msgid "Troubleshoot Area & General Settings"
560
  msgstr ""
561
 
562
- #: cp_calculatedfieldsf_admin_int_list.inc.php:264
563
  msgid ""
564
  "<strong>Important!</strong>: Use this area <strong>only</strong> if you are "
565
  "experiencing conflicts with third party plugins, with the theme scripts or "
566
  "with the character encoding."
567
  msgstr ""
568
 
569
- #: cp_calculatedfieldsf_admin_int_list.inc.php:265
570
  msgid "Script load method"
571
  msgstr ""
572
 
573
- #: cp_calculatedfieldsf_admin_int_list.inc.php:267
574
  msgid "Classic (Recommended)"
575
  msgstr ""
576
 
577
- #: cp_calculatedfieldsf_admin_int_list.inc.php:268
578
  msgid "Direct"
579
  msgstr ""
580
 
581
- #: cp_calculatedfieldsf_admin_int_list.inc.php:270
582
  msgid ""
583
  "* Change the script load method if the form doesn't appear in the public "
584
  "website."
585
  msgstr ""
586
 
587
- #: cp_calculatedfieldsf_admin_int_list.inc.php:272
588
  msgid "Character encoding"
589
  msgstr ""
590
 
591
- #: cp_calculatedfieldsf_admin_int_list.inc.php:274
592
  msgid "Keep current charset (Recommended)"
593
  msgstr ""
594
 
595
- #: cp_calculatedfieldsf_admin_int_list.inc.php:275
596
  msgid "try this first"
597
  msgstr ""
598
 
599
- #: cp_calculatedfieldsf_admin_int_list.inc.php:276
600
  msgid "Only from MySQL 5.5"
601
  msgstr ""
602
 
603
- #: cp_calculatedfieldsf_admin_int_list.inc.php:279
604
  msgid ""
605
  "* Update the charset if you are getting problems displaying special/non-"
606
  "latin characters. After updated you need to edit the special characters "
607
  "again."
608
  msgstr ""
609
 
610
- #: cp_calculatedfieldsf_admin_int_list.inc.php:282
611
  msgid "Activate Javascript Cache"
612
  msgstr ""
613
 
614
- #: cp_calculatedfieldsf_admin_int_list.inc.php:284
 
 
 
 
 
 
 
 
615
  msgid "Do not load the forms with crawlers"
616
  msgstr ""
617
 
618
- #: cp_calculatedfieldsf_admin_int_list.inc.php:284
619
  msgid "* The forms are not loaded when website is being indexed by searchers."
620
  msgstr ""
621
 
622
- #: cp_calculatedfieldsf_admin_int_list.inc.php:286
623
  msgid "UPDATE"
624
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2020-05-19 01:03+0200\n"
5
+ "PO-Revision-Date: 2020-05-19 01:03+0200\n"
6
+ "Last-Translator: CodePeople\n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.3.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: cp_calculatedfieldsf_free.php:73
19
+ msgid "Form Preview"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgstr ""
21
 
22
+ #: cp_calculatedfieldsf_free.php:108
 
 
 
 
 
 
 
 
23
  msgid ""
24
  "<div class=\"error-text\">The data cannot be stored in database because has "
25
  "occurred an error with the database structure. Please, go to the plugins "
26
  "section and Deactivate/Activate the plugin to be sure the structure of "
27
  "database has been checked, and corrected if needed. If the issue persist, "
28
+ "please <a href=\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
 
29
  msgstr ""
30
 
31
+ #: cp_calculatedfieldsf_free.php:124
32
  msgid ""
33
  "<div class=\"error-text\">The data cannot be stored in database because has "
34
  "occurred an error with the form structure. Please, try to save the data "
35
  "again. If have been copied and pasted data from external text editors, the "
36
  "data can contain invalid characters. If the issue persist, please <a href="
37
+ "\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
 
 
 
 
 
38
  msgstr ""
39
 
40
+ #: inc/cpcff_admin_int.inc.php:32
41
  msgid "Settings saved"
42
  msgstr ""
43
 
44
+ #: inc/cpcff_admin_int.inc.php:46 inc/cpcff_admin_int_list.inc.php:94
45
+ #: inc/cpcff_page_builders.inc.php:155
46
+ #: pagebuilders/beaverbuilder/cff/cff/cff.php:9
47
+ #: pagebuilders/beaverbuilder/cff/cff/cff.php:11
48
+ #: pagebuilders/beaverbuilder/cff/cff/cff.php:12
49
+ #: pagebuilders/beaverbuilder/cffvar/cffvar/cffvar.php:11
50
+ #: pagebuilders/beaverbuilder/cffvar/cffvar/cffvar.php:12
51
+ #: pagebuilders/elementor/elementor.pb.php:42
52
  msgid "Calculated Fields Form"
53
  msgstr ""
54
 
55
+ #: inc/cpcff_admin_int.inc.php:46
56
+ msgid "Form"
57
+ msgstr ""
58
+
59
+ #: inc/cpcff_admin_int.inc.php:53
60
+ msgid "Direct form URL"
61
+ msgstr ""
62
+
63
+ #: inc/cpcff_admin_int.inc.php:56
64
  msgid "Back to items list..."
65
  msgstr ""
66
 
67
+ #: inc/cpcff_admin_int.inc.php:66 inc/cpcff_admin_int.inc.php:221
68
  msgid "Form Settings"
69
  msgstr ""
70
 
71
+ #: inc/cpcff_admin_int.inc.php:68
72
  msgid ""
73
  "* Different form styles available on the tab Form Settings &gt;&gt; Form "
74
  "Template"
75
  msgstr ""
76
 
77
+ #: inc/cpcff_admin_int.inc.php:71
78
  msgid "Form Builder"
79
  msgstr ""
80
 
81
+ #: inc/cpcff_admin_int.inc.php:73
82
+ msgid "Revisions"
83
+ msgstr ""
84
+
85
+ #: inc/cpcff_admin_int.inc.php:77
86
+ msgid "Select a revision"
87
+ msgstr ""
88
+
89
+ #: inc/cpcff_admin_int.inc.php:87 inc/cpcff_admin_int.inc.php:241
90
+ #: inc/cpcff_admin_int.inc.php:608
91
+ msgid "Preview"
92
+ msgstr ""
93
+
94
+ #: inc/cpcff_admin_int.inc.php:98
95
  msgid ""
96
  "If the form is not loading in the public website, go to the settings page of "
97
  "the plugin through the menu option: \"Settings/Calculated Fields Form\", "
99
  "press the \"Update\" button."
100
  msgstr ""
101
 
102
+ #: inc/cpcff_admin_int.inc.php:98
103
  msgid ""
104
  "If you need also the form to be sent to the server side for processing (for "
105
+ "example to deliver emails) then the <a href=\"https://cff.dwbooster.com/\" "
106
  "target=\"_blank\">Professional or Developer versions</a> of the plugin will "
107
  "be required."
108
  msgstr ""
109
 
110
+ #: inc/cpcff_admin_int.inc.php:122
111
+ msgid ""
112
+ "The action will load the revision selected, the data are not stored will be "
113
+ "lose. Do you want continue?"
114
+ msgstr ""
115
+
116
+ #: inc/cpcff_admin_int.inc.php:140
117
  msgid ""
118
  "These features aren't available in this version. Do you want to open the "
119
  "plugin's page to check other versions?"
120
  msgstr ""
121
 
122
+ #: inc/cpcff_admin_int.inc.php:219
123
  msgid "Add a Field"
124
  msgstr ""
125
 
126
+ #: inc/cpcff_admin_int.inc.php:220
127
  msgid "Field Settings"
128
  msgstr ""
129
 
130
+ #: inc/cpcff_admin_int.inc.php:240 inc/cpcff_admin_int.inc.php:352
131
+ #: inc/cpcff_admin_int.inc.php:648
 
132
  msgid "Save Changes"
133
  msgstr ""
134
 
135
+ #: inc/cpcff_admin_int.inc.php:242
136
+ msgid "Generate revisions in the form preview as well"
 
137
  msgstr ""
138
 
139
+ #: inc/cpcff_admin_int.inc.php:246
140
  msgid "Define Texts"
141
  msgstr ""
142
 
143
+ #: inc/cpcff_admin_int.inc.php:250
144
  msgid "Previous button label (text)"
145
  msgstr ""
146
 
147
+ #: inc/cpcff_admin_int.inc.php:254
148
  msgid "Next button label (text)"
149
  msgstr ""
150
 
151
+ #: inc/cpcff_admin_int.inc.php:259
152
  msgid ""
153
  "- The styles can be applied into any of the CSS files of your theme or into "
154
  "the CSS file <em>\"calculated-fields-form\\css\\stylepublic.css\"</em>."
155
  msgstr ""
156
 
157
+ #: inc/cpcff_admin_int.inc.php:260
158
  msgid ""
159
  "- For general CSS styles modifications to the form and samples <a href="
160
+ "\"https://cff.dwbooster.com/faq#q82\" target=\"_blank\">check this FAQ</a>."
161
  msgstr ""
162
 
163
+ #: inc/cpcff_admin_int.inc.php:282
164
  msgid "Validation Settings"
165
  msgstr ""
166
 
167
+ #: inc/cpcff_admin_int.inc.php:286
 
 
 
 
 
 
 
 
 
 
 
168
  msgid "\"is required\" text"
169
  msgstr ""
170
 
171
+ #: inc/cpcff_admin_int.inc.php:290
172
  msgid "\"is email\" text"
173
  msgstr ""
174
 
175
+ #: inc/cpcff_admin_int.inc.php:294
176
  msgid "\"is valid captcha\" text"
177
  msgstr ""
178
 
179
+ #: inc/cpcff_admin_int.inc.php:299
180
  msgid "\"is valid date (mm/dd/yyyy)\" text"
181
  msgstr ""
182
 
183
+ #: inc/cpcff_admin_int.inc.php:303
184
  msgid "\"is valid date (dd/mm/yyyy)\" text"
185
  msgstr ""
186
 
187
+ #: inc/cpcff_admin_int.inc.php:307
188
  msgid "\"is number\" text"
189
  msgstr ""
190
 
191
+ #: inc/cpcff_admin_int.inc.php:311
192
  msgid "\"only digits\" text"
193
  msgstr ""
194
 
195
+ #: inc/cpcff_admin_int.inc.php:315
196
  msgid "\"under maximum\" text"
197
  msgstr ""
198
 
199
+ #: inc/cpcff_admin_int.inc.php:319
200
  msgid "\"over minimum\" text"
201
  msgstr ""
202
 
203
+ #: inc/cpcff_admin_int.inc.php:342
204
  msgid "Note"
205
  msgstr ""
206
 
207
+ #: inc/cpcff_admin_int.inc.php:344
208
  msgid "To insert this form in a post/page, use the dedicated icon"
209
  msgstr ""
210
 
211
+ #: inc/cpcff_admin_int.inc.php:345 inc/cpcff_main.inc.php:241
212
+ msgid "Insert Calculated Fields Form"
213
+ msgstr ""
214
+
215
+ #: inc/cpcff_admin_int.inc.php:346
216
  msgid ""
217
  "which has been added to your Upload/Insert Menu, just below the title of "
218
  "your Post/Page."
219
  msgstr ""
220
 
221
+ #: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
222
+ #: inc/cpcff_admin_int_list.inc.php:255
 
223
  msgid "Request Custom Modifications"
224
  msgstr ""
225
 
226
+ #: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
227
+ #: inc/cpcff_admin_int_list.inc.php:255 inc/cpcff_main.inc.php:224
228
+ msgid "Help"
229
+ msgstr ""
230
+
231
+ #: inc/cpcff_admin_int.inc.php:359
232
  msgid ""
233
+ "The following settings are available only in the <a href=\"https://cff."
234
  "dwbooster.com/\">pro version</a>"
235
  msgstr ""
236
 
237
+ #: inc/cpcff_admin_int.inc.php:361
238
  msgid "Form Processing and Payment Settings"
239
  msgstr ""
240
 
241
+ #: inc/cpcff_admin_int.inc.php:365
242
  msgid "Payment Settings"
243
  msgstr ""
244
 
245
+ #: inc/cpcff_admin_int.inc.php:370
246
  msgid "Request cost"
247
  msgstr ""
248
 
249
+ #: inc/cpcff_admin_int.inc.php:375
250
  msgid "Currency"
251
  msgstr ""
252
 
253
+ #: inc/cpcff_admin_int.inc.php:380
254
  msgid "Base amount"
255
  msgstr ""
256
 
257
+ #: inc/cpcff_admin_int.inc.php:381
258
  msgid ""
259
  "Minimum amount to charge. If the final price is lesser than this number, the "
260
  "base amount will be applied."
261
  msgstr ""
262
 
263
+ #: inc/cpcff_admin_int.inc.php:386
264
  msgid "Paypal product name"
265
  msgstr ""
266
 
267
+ #: inc/cpcff_admin_int.inc.php:391
268
  msgid "Discount Codes"
269
  msgstr ""
270
 
271
+ #: inc/cpcff_admin_int.inc.php:393
272
  msgid "This feature isn't available in this version."
273
  msgstr ""
274
 
275
+ #: inc/cpcff_admin_int.inc.php:396
276
  msgid "Add new discount code"
277
  msgstr ""
278
 
279
+ #: inc/cpcff_admin_int.inc.php:398
280
  msgid "Code"
281
  msgstr ""
282
 
283
+ #: inc/cpcff_admin_int.inc.php:399
284
  msgid "Discount"
285
  msgstr ""
286
 
287
+ #: inc/cpcff_admin_int.inc.php:400
288
  msgid "Percent"
289
  msgstr ""
290
 
291
+ #: inc/cpcff_admin_int.inc.php:401
292
  msgid "Fixed Value"
293
  msgstr ""
294
 
295
+ #: inc/cpcff_admin_int.inc.php:404
296
  msgid "Valid until"
297
  msgstr ""
298
 
299
+ #: inc/cpcff_admin_int.inc.php:405 inc/cpcff_admin_int_list.inc.php:204
 
300
  msgid "Add"
301
  msgstr ""
302
 
303
+ #: inc/cpcff_admin_int.inc.php:407
304
  msgid "Note: Expiration date based in server time. Server time now is"
305
  msgstr ""
306
 
307
+ #: inc/cpcff_admin_int.inc.php:415
308
  msgid "Paypal Payment Configuration"
309
  msgstr ""
310
 
311
+ #: inc/cpcff_admin_int.inc.php:420
312
  msgid "Enable Paypal Payments?"
313
  msgstr ""
314
 
315
+ #: inc/cpcff_admin_int.inc.php:422 inc/cpcff_admin_int.inc.php:510
316
+ #: inc/cpcff_admin_int.inc.php:547 inc/cpcff_admin_int.inc.php:588
317
+ msgid "No"
318
+ msgstr ""
319
+
320
+ #: inc/cpcff_admin_int.inc.php:424
321
+ msgid ""
322
+ "Note: If \"Optional\" is selected, a radiobutton will appear in the form to "
323
+ "select if the payment will be made with PayPal or not."
324
+ msgstr ""
325
+
326
+ #: inc/cpcff_admin_int.inc.php:426
327
+ msgid "Label for the \"<strong>Pay with PayPal</strong>\" option"
328
+ msgstr ""
329
+
330
+ #: inc/cpcff_admin_int.inc.php:432
331
  msgid "Paypal Mode"
332
  msgstr ""
333
 
334
+ #: inc/cpcff_admin_int.inc.php:434
335
  msgid "Production - real payments processed"
336
  msgstr ""
337
 
338
+ #: inc/cpcff_admin_int.inc.php:435
339
  msgid "SandBox - PayPal testing sandbox area"
340
  msgstr ""
341
 
342
+ #: inc/cpcff_admin_int.inc.php:441
343
  msgid "Paypal email"
344
  msgstr ""
345
 
346
+ #: inc/cpcff_admin_int.inc.php:446
347
  msgid "A $0 amount to pay means"
348
  msgstr ""
349
 
350
+ #: inc/cpcff_admin_int.inc.php:448
351
  msgid "Let the user enter any amount at PayPal (ex: for a donation)"
352
  msgstr ""
353
 
354
+ #: inc/cpcff_admin_int.inc.php:449
355
  msgid "Don't require any payment. Form is submitted skiping the PayPal page."
356
  msgstr ""
357
 
358
+ #: inc/cpcff_admin_int.inc.php:455
359
  msgid "Paypal language"
360
  msgstr ""
361
 
362
+ #: inc/cpcff_admin_int.inc.php:460
363
  msgid "Payment frequency"
364
  msgstr ""
365
 
366
+ #: inc/cpcff_admin_int.inc.php:464
367
  msgid "One time payment (default option, user is billed only once)"
368
  msgstr ""
369
 
370
+ #: inc/cpcff_admin_int.inc.php:465
371
  msgid "Bill the user every 1 month"
372
  msgstr ""
373
 
374
+ #: inc/cpcff_admin_int.inc.php:466
375
  msgid "Bill the user every 3 months"
376
  msgstr ""
377
 
378
+ #: inc/cpcff_admin_int.inc.php:467
379
  msgid "Bill the user every 6 months"
380
  msgstr ""
381
 
382
+ #: inc/cpcff_admin_int.inc.php:468
383
  msgid "Bill the user every 12 months"
384
  msgstr ""
385
 
386
+ #: inc/cpcff_admin_int.inc.php:473
387
+ msgid "Paypal prompt buyers for shipping address"
388
+ msgstr ""
389
+
390
+ #: inc/cpcff_admin_int.inc.php:477
391
+ msgid "Do not prompt for an address"
392
+ msgstr ""
393
+
394
+ #: inc/cpcff_admin_int.inc.php:478
395
+ msgid "Prompt for an address, but do not require one"
396
+ msgstr ""
397
+
398
+ #: inc/cpcff_admin_int.inc.php:479
399
+ msgid "Prompt for an address and require one"
400
+ msgstr ""
401
+
402
+ #: inc/cpcff_admin_int.inc.php:489
403
  msgid "Form Processing / Email Settings"
404
  msgstr ""
405
 
406
+ #: inc/cpcff_admin_int.inc.php:493
407
  msgid "\"From\" email"
408
  msgstr ""
409
 
410
+ #: inc/cpcff_admin_int.inc.php:494
411
+ msgid ""
412
+ "This email is required if the \"From fixed email address\" option is "
413
+ "selected, or it is enabled the email copy to the user."
414
+ msgstr ""
415
+
416
+ #: inc/cpcff_admin_int.inc.php:497
417
  msgid "Destination emails (comma separated)"
418
  msgstr ""
419
 
420
+ #: inc/cpcff_admin_int.inc.php:501 inc/cpcff_admin_int.inc.php:556
 
421
  msgid "Email subject"
422
  msgstr ""
423
 
424
+ #: inc/cpcff_admin_int.inc.php:505
425
  msgid "Include additional information?"
426
  msgstr ""
427
 
428
+ #: inc/cpcff_admin_int.inc.php:509 inc/cpcff_admin_int.inc.php:546
429
+ #: inc/cpcff_admin_int.inc.php:587
430
+ msgid "Yes"
431
+ msgstr ""
432
+
433
+ #: inc/cpcff_admin_int.inc.php:511
434
+ msgid ""
435
+ "If the \"No\" option is selected the plugin won't capture the IP address of "
436
+ "users."
437
  msgstr ""
438
 
439
+ #: inc/cpcff_admin_int.inc.php:515
440
  msgid "Thank you page (after sending the message)"
441
  msgstr ""
442
 
443
+ #: inc/cpcff_admin_int.inc.php:519 inc/cpcff_admin_int.inc.php:560
 
444
  msgid "Email format?"
445
  msgstr ""
446
 
447
+ #: inc/cpcff_admin_int.inc.php:523 inc/cpcff_admin_int.inc.php:564
 
448
  msgid "Plain Text (default)"
449
  msgstr ""
450
 
451
+ #: inc/cpcff_admin_int.inc.php:524 inc/cpcff_admin_int.inc.php:565
 
452
  msgid "HTML (use html in the textarea below)"
453
  msgstr ""
454
 
455
+ #: inc/cpcff_admin_int.inc.php:529 inc/cpcff_admin_int.inc.php:570
 
456
  msgid "Message"
457
  msgstr ""
458
 
459
+ #: inc/cpcff_admin_int.inc.php:538
460
  msgid "Email Copy to User"
461
  msgstr ""
462
 
463
+ #: inc/cpcff_admin_int.inc.php:542
464
  msgid "Send confirmation/thank you message to user?"
465
  msgstr ""
466
 
467
+ #: inc/cpcff_admin_int.inc.php:552
468
  msgid "Email field on the form"
469
  msgstr ""
470
 
471
+ #: inc/cpcff_admin_int.inc.php:579
472
  msgid "Captcha Verification"
473
  msgstr ""
474
 
475
+ #: inc/cpcff_admin_int.inc.php:583
476
  msgid "Use Captcha Verification?"
477
  msgstr ""
478
 
479
+ #: inc/cpcff_admin_int.inc.php:594
480
  msgid "Width"
481
  msgstr ""
482
 
483
+ #: inc/cpcff_admin_int.inc.php:596
484
  msgid "Height"
485
  msgstr ""
486
 
487
+ #: inc/cpcff_admin_int.inc.php:598
488
  msgid "Chars"
489
  msgstr ""
490
 
491
+ #: inc/cpcff_admin_int.inc.php:603
492
  msgid "Min font size"
493
  msgstr ""
494
 
495
+ #: inc/cpcff_admin_int.inc.php:605
496
  msgid "Max font size"
497
  msgstr ""
498
 
499
+ #: inc/cpcff_admin_int.inc.php:610
500
  msgid "security code"
501
  msgstr ""
502
 
503
+ #: inc/cpcff_admin_int.inc.php:616
504
  msgid "Noise"
505
  msgstr ""
506
 
507
+ #: inc/cpcff_admin_int.inc.php:618
508
  msgid "Noise Length"
509
  msgstr ""
510
 
511
+ #: inc/cpcff_admin_int.inc.php:623
512
  msgid "Background"
513
  msgstr ""
514
 
515
+ #: inc/cpcff_admin_int.inc.php:630
516
  msgid "Font"
517
  msgstr ""
518
 
519
+ #: inc/cpcff_admin_int_list.inc.php:21
520
  msgid "Item added"
521
  msgstr ""
522
 
523
+ #: inc/cpcff_admin_int_list.inc.php:27
524
  msgid "Item updated"
525
  msgstr ""
526
 
527
+ #: inc/cpcff_admin_int_list.inc.php:33
528
  msgid "Item deleted"
529
  msgstr ""
530
 
531
+ #: inc/cpcff_admin_int_list.inc.php:37
532
  msgid "Item duplicated/cloned"
533
  msgstr ""
534
 
535
+ #: inc/cpcff_admin_int_list.inc.php:38
536
+ msgid "Duplicate/Clone Error, the form cannot be cloned"
537
+ msgstr ""
538
+
539
+ #: inc/cpcff_admin_int_list.inc.php:86
540
  msgid "Troubleshoot settings updated"
541
  msgstr ""
542
 
543
+ #: inc/cpcff_admin_int_list.inc.php:140
544
  msgid "Are you sure that you want to delete this item?"
545
  msgstr ""
546
 
547
+ #: inc/cpcff_admin_int_list.inc.php:148
548
  msgid "Are you sure that you want to update these settings?"
549
  msgstr ""
550
 
551
+ #: inc/cpcff_admin_int_list.inc.php:163
552
  msgid "Form List / Items List"
553
  msgstr ""
554
 
555
+ #: inc/cpcff_admin_int_list.inc.php:168
556
  msgid "ID"
557
  msgstr ""
558
 
559
+ #: inc/cpcff_admin_int_list.inc.php:168
560
  msgid "Form Name"
561
  msgstr ""
562
 
563
+ #: inc/cpcff_admin_int_list.inc.php:168
564
  msgid "Options"
565
  msgstr ""
566
 
567
+ #: inc/cpcff_admin_int_list.inc.php:168
568
  msgid "Shortcode"
569
  msgstr ""
570
 
571
+ #: inc/cpcff_admin_int_list.inc.php:182
572
  msgid "Update"
573
  msgstr ""
574
 
575
+ #: inc/cpcff_admin_int_list.inc.php:183 inc/cpcff_main.inc.php:222
576
+ msgid "Settings"
577
+ msgstr ""
578
+
579
+ #: inc/cpcff_admin_int_list.inc.php:184
580
  msgid "Messages"
581
  msgstr ""
582
 
583
+ #: inc/cpcff_admin_int_list.inc.php:185
584
  msgid "Clone"
585
  msgstr ""
586
 
587
+ #: inc/cpcff_admin_int_list.inc.php:186
588
  msgid "Delete"
589
  msgstr ""
590
 
591
+ #: inc/cpcff_admin_int_list.inc.php:199
592
  msgid "New Form"
593
  msgstr ""
594
 
595
+ #: inc/cpcff_admin_int_list.inc.php:203
596
  msgid "Item Name"
597
  msgstr ""
598
 
599
+ #: inc/cpcff_admin_int_list.inc.php:211
600
  msgid "Troubleshoot Area & General Settings"
601
  msgstr ""
602
 
603
+ #: inc/cpcff_admin_int_list.inc.php:222
604
  msgid ""
605
  "<strong>Important!</strong>: Use this area <strong>only</strong> if you are "
606
  "experiencing conflicts with third party plugins, with the theme scripts or "
607
  "with the character encoding."
608
  msgstr ""
609
 
610
+ #: inc/cpcff_admin_int_list.inc.php:223
611
  msgid "Script load method"
612
  msgstr ""
613
 
614
+ #: inc/cpcff_admin_int_list.inc.php:225
615
  msgid "Classic (Recommended)"
616
  msgstr ""
617
 
618
+ #: inc/cpcff_admin_int_list.inc.php:226
619
  msgid "Direct"
620
  msgstr ""
621
 
622
+ #: inc/cpcff_admin_int_list.inc.php:228
623
  msgid ""
624
  "* Change the script load method if the form doesn't appear in the public "
625
  "website."
626
  msgstr ""
627
 
628
+ #: inc/cpcff_admin_int_list.inc.php:230
629
  msgid "Character encoding"
630
  msgstr ""
631
 
632
+ #: inc/cpcff_admin_int_list.inc.php:232
633
  msgid "Keep current charset (Recommended)"
634
  msgstr ""
635
 
636
+ #: inc/cpcff_admin_int_list.inc.php:233
637
  msgid "try this first"
638
  msgstr ""
639
 
640
+ #: inc/cpcff_admin_int_list.inc.php:234
641
  msgid "Only from MySQL 5.5"
642
  msgstr ""
643
 
644
+ #: inc/cpcff_admin_int_list.inc.php:237
645
  msgid ""
646
  "* Update the charset if you are getting problems displaying special/non-"
647
  "latin characters. After updated you need to edit the special characters "
648
  "again."
649
  msgstr ""
650
 
651
+ #: inc/cpcff_admin_int_list.inc.php:240
652
  msgid "Activate Javascript Cache"
653
  msgstr ""
654
 
655
+ #: inc/cpcff_admin_int_list.inc.php:242
656
+ msgid "Allows to access the forms directly"
657
+ msgstr ""
658
+
659
+ #: inc/cpcff_admin_int_list.inc.php:244
660
+ msgid "Allows to access the forms from amp pages"
661
+ msgstr ""
662
+
663
+ #: inc/cpcff_admin_int_list.inc.php:246
664
  msgid "Do not load the forms with crawlers"
665
  msgstr ""
666
 
667
+ #: inc/cpcff_admin_int_list.inc.php:246
668
  msgid "* The forms are not loaded when website is being indexed by searchers."
669
  msgstr ""
670
 
671
+ #: inc/cpcff_admin_int_list.inc.php:248
672
  msgid "UPDATE"
673
  msgstr ""
674
+
675
+ #: inc/cpcff_admin_int_list.inc.php:255 inc/cpcff_main.inc.php:223
676
+ msgid "Upgrade"
677
+ msgstr ""
678
+
679
+ #: inc/cpcff_compatibility.inc.php:20
680
+ msgid ""
681
+ "There is active the <b>Fast Velocity Minify</b> plugin. If the forms are not "
682
+ "visible, please try disabling the <i>\"Disable minification on JS files\"</"
683
+ "i> or <i>\"Disable JavaScript processing\"</i> options in the <b>Fast "
684
+ "Velocity Minify</b> settings."
685
+ msgstr ""
686
+
687
+ #: inc/cpcff_compatibility.inc.php:26
688
+ msgid ""
689
+ "There is active the <b>Autoptimize</b> plugin. If the forms are not visible, "
690
+ "please try disabling the <i>\"Force JavaScript in &lt;head&gt;\"</i> option "
691
+ "in the <b>Autoptimize</b> settings, or remove the jQuery file from the <i>"
692
+ "\"Exclude scripts from Autoptimize\"</i> one."
693
+ msgstr ""
694
+
695
+ #: inc/cpcff_compatibility.inc.php:32
696
+ msgid ""
697
+ "There is active the <b>LiteSpeed Cache</b> plugin. If the forms are not "
698
+ "visible, please try disabling the <i>\"JS Combine\"</i> option in the "
699
+ "<b>Optimize</b> tab of <b>LiteSpeed Cache</b> settings."
700
+ msgstr ""
701
+
702
+ #: inc/cpcff_compatibility.inc.php:38
703
+ msgid ""
704
+ "There is active the <b>WP Rocket</b> plugin. If the forms are not visible, "
705
+ "please try disabling the <i>\"Combine JavaScript files\"</i> option in the "
706
+ "<b>FILE OPTIMIZATION</b> tab of <b>WP Rocket</b> settings, and remember to "
707
+ "clear the website cache."
708
+ msgstr ""
709
+
710
+ #: inc/cpcff_compatibility.inc.php:44
711
+ msgid ""
712
+ "There is active the <b>SG Optimizer</b> plugin. If the forms are not "
713
+ "visible, please try disabling the options: <i>\"Minify the HTML Output\"</i> "
714
+ "and <i>\"Minify JavaScript Files\"</i> in the <b>SG Optimizer</b> settings, "
715
+ "and remember to purge the website cache."
716
+ msgstr ""
717
+
718
+ #: inc/cpcff_main.inc.php:221
719
+ msgid "Request custom changes"
720
+ msgstr ""
721
+
722
+ #: inc/cpcff_main.inc.php:241
723
+ msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
724
+ msgstr ""
725
+
726
+ #: inc/cpcff_page_builders.inc.php:95
727
+ #: pagebuilders/elementor/elementor.pb.php:59
728
+ msgid "Select a form"
729
+ msgstr ""
730
+
731
+ #: inc/cpcff_page_builders.inc.php:96
732
+ msgid "Forms"
733
+ msgstr ""
734
+
735
+ #: inc/cpcff_page_builders.inc.php:97
736
+ #: pagebuilders/beaverbuilder/cff/cff.inc.php:37
737
+ #: pagebuilders/elementor/elementor.pb.php:70
738
+ msgid "Additional attributes"
739
+ msgstr ""
740
+
741
+ #: pagebuilders/beaverbuilder/cff/cff.inc.php:20
742
+ msgid "Select the form and enter the additional attributes"
743
+ msgstr ""
744
+
745
+ #: pagebuilders/beaverbuilder/cff/cff.inc.php:23
746
+ msgid "Form information"
747
+ msgstr ""
748
+
749
+ #: pagebuilders/beaverbuilder/cff/cff.inc.php:27
750
+ msgid "Select form"
751
+ msgstr ""
752
+
753
+ #: pagebuilders/beaverbuilder/cff/cff.inc.php:33
754
+ msgid "Class name"
755
+ msgstr ""
756
+
757
+ #: pagebuilders/beaverbuilder/cff/cff/cff.php:10
758
+ msgid "Inserts a form"
759
+ msgstr ""
760
+
761
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:8
762
+ msgid "Generate variable"
763
+ msgstr ""
764
+
765
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:11
766
+ msgid "Variable attributes"
767
+ msgstr ""
768
+
769
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:15
770
+ msgid "Enter the variable name"
771
+ msgstr ""
772
+
773
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:20
774
+ msgid "Enter the default value"
775
+ msgstr ""
776
+
777
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:24
778
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:29
779
+ msgid "Generate variable from"
780
+ msgstr ""
781
+
782
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:26
783
+ msgid "Directly"
784
+ msgstr ""
785
+
786
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:27
787
+ msgid "GET parameters"
788
+ msgstr ""
789
+
790
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:28
791
+ msgid "POST parameters"
792
+ msgstr ""
793
+
794
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:29
795
+ msgid "SESSION variables"
796
+ msgstr ""
797
+
798
+ #: pagebuilders/beaverbuilder/cffvar/cffvar.inc.php:30
799
+ msgid "COOKIES variables"
800
+ msgstr ""
801
+
802
+ #: pagebuilders/beaverbuilder/cffvar/cffvar/cffvar.php:9
803
+ msgid "Create variable"
804
+ msgstr ""
805
+
806
+ #: pagebuilders/beaverbuilder/cffvar/cffvar/cffvar.php:10
807
+ msgid "Create javascript variable"
808
+ msgstr ""
809
+
810
+ #: pagebuilders/elementor/elementor.pb.php:166
811
+ msgid "Variable Shortcode"
812
+ msgstr ""
813
+
814
+ #: pagebuilders/elementor/elementor.pb.php:173
815
+ msgid "Variable shortcode"
816
+ msgstr ""
817
+
818
+ #: pagebuilders/elementor/elementor.pb.php:178
819
+ msgid "I need help [+]"
820
+ msgstr ""
821
+
822
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:14
823
+ msgid "Calculated Fields Form, Variable Shortcode"
824
+ msgstr ""
825
+
826
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:16
827
+ msgid ""
828
+ "Shortcode to generate a javascript variable from the url parameters (GET or "
829
+ "POST), session variables, cookies, or define it directly"
830
+ msgstr ""
831
+
832
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:24
833
+ msgid "Variable name"
834
+ msgstr ""
835
+
836
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:32
837
+ msgid "Any source"
838
+ msgstr ""
839
+
840
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:33
841
+ msgid "GET parameter"
842
+ msgstr ""
843
+
844
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:34
845
+ msgid "POST parameter"
846
+ msgstr ""
847
+
848
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:35
849
+ msgid "Session variable"
850
+ msgstr ""
851
+
852
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:36
853
+ msgid "Cookie"
854
+ msgstr ""
855
+
856
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:41
857
+ msgid "Default value (used when variables are generated from a source)"
858
+ msgstr ""
859
+
860
+ #: pagebuilders/siteorigin/siteorigin-cpcff-variable/siteorigin-cpcff-variable.php:46
861
+ msgid "Value (value of the variable when it is generated directly)"
862
+ msgstr ""
863
+
864
+ #: pagebuilders/siteorigin/siteorigin-cpcff/siteorigin-cpcff.php:24
865
+ msgid "Calculated Fields Form Shortcode"
866
+ msgstr ""
867
+
868
+ #: pagebuilders/siteorigin/siteorigin-cpcff/siteorigin-cpcff.php:26
869
+ msgid "Includes the shortcode for inserting a form"
870
+ msgstr ""
871
+
872
+ #: pagebuilders/siteorigin/siteorigin-cpcff/siteorigin-cpcff.php:34
873
+ msgid "Form to include"
874
+ msgstr ""
875
+
876
+ #: pagebuilders/siteorigin/siteorigin-cpcff/siteorigin-cpcff.php:40
877
+ msgid "Enter a class name to be assigned to the form (optional)"
878
+ msgstr ""
879
+
880
+ #: pagebuilders/siteorigin/siteorigin-cpcff/siteorigin-cpcff.php:44
881
+ msgid ""
882
+ "Pass additional attributes to the form. Ex: attr_name=\"attr_value"
883
+ "\" (optional)"
884
+ msgstr ""
pagebuilders/divi/cff.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){r(1),e.exports=r(2)},function(e,t,r){"use strict"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r.n(n),i=r(4);o()(window).on("et_builder_api_ready",function(e,t){t.registerModules(i.a)})},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";var n=r(5);t.a=[n.a]},function(e,t,r){"use strict";var n=r(6),o=r.n(n);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}var r,i,f;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),r=t,(i=[{key:"render",value:function(){var e="cff_form_id"in this.props?parseInt(this.props.cff_form_id):0,t="cff_class_name"in this.props?this.props.cff_class_name.replace(/[^a-z0-9\-_\s]/g," ").replace(/^\s+/,"").replace(/\s+$/,""):"",r="cff_attributes"in this.props?this.props.cff_attributes.replace(/^\s+/,"").replace(/\s+$/,""):"",n="";return!isNaN(e)&&e&&(n+='[CP_CALCULATED_FIELDS id="'+e+'"',""!==t&&(n+=' class="'+t+'"'),""!==r&&(n+=" "+r),n+="]"),o.a.createElement("div",null,n)}}])&&u(r.prototype,i),f&&u(r,f),t}();Object.defineProperty(f,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"cff_divi"}),t.a=f},function(e,t){e.exports=React}]);
pagebuilders/divi/cff.pb.php CHANGED
@@ -2,8 +2,8 @@
2
  class CFF_DIVI extends ET_Builder_Module
3
  {
4
 
5
- public $slug = 'et_pb_cff_divi_module';
6
- public $vb_support = 'partial';
7
 
8
  public function init()
9
  {
@@ -31,7 +31,7 @@ class CFF_DIVI extends ET_Builder_Module
31
  }
32
 
33
  return array(
34
- 'form_id' => array(
35
  'label' => esc_html__( 'Select form', 'calculated-fields-form' ),
36
  'type' => 'select',
37
  'options' => $options,
@@ -40,13 +40,13 @@ class CFF_DIVI extends ET_Builder_Module
40
  'description' => esc_html__( 'Select the form.', 'calculated-fields-form' ),
41
  'toggle_slug' => 'main_content',
42
  ),
43
- 'class_name' => array(
44
  'label' => esc_html__( 'Class name', 'calculated-fields-form' ),
45
  'type' => 'text',
46
  'option_category' => 'basic_option',
47
  'toggle_slug' => 'main_content',
48
  ),
49
- 'attributes' => array(
50
  'label' => esc_html__( 'Additional attributes', 'calculated-fields-form' ),
51
  'type' => 'text',
52
  'option_category' => 'basic_option',
@@ -59,14 +59,14 @@ class CFF_DIVI extends ET_Builder_Module
59
  public function render($unprocessed_props, $content = null, $render_slug)
60
  {
61
  $output = '';
62
- $form = @intval($this->props['form_id']);
63
  if(!empty($form))
64
  {
65
  $output = '[CP_CALCULATED_FIELDS id="'.$form.'"';
66
- $class_name = sanitize_text_field($this->props['class_name']);
67
  if(!empty($class_name)) $output .= ' class="'.esc_attr($class_name).'"';
68
 
69
- $attributes = sanitize_text_field($this->props['attributes']);
70
  if(!empty($attributes)) $output .= ' '.$attributes;
71
 
72
  $output .= ']';
2
  class CFF_DIVI extends ET_Builder_Module
3
  {
4
 
5
+ public $slug = 'cff_divi';
6
+ public $vb_support = 'on';
7
 
8
  public function init()
9
  {
31
  }
32
 
33
  return array(
34
+ 'cff_form_id' => array(
35
  'label' => esc_html__( 'Select form', 'calculated-fields-form' ),
36
  'type' => 'select',
37
  'options' => $options,
40
  'description' => esc_html__( 'Select the form.', 'calculated-fields-form' ),
41
  'toggle_slug' => 'main_content',
42
  ),
43
+ 'cff_class_name' => array(
44
  'label' => esc_html__( 'Class name', 'calculated-fields-form' ),
45
  'type' => 'text',
46
  'option_category' => 'basic_option',
47
  'toggle_slug' => 'main_content',
48
  ),
49
+ 'cff_attributes' => array(
50
  'label' => esc_html__( 'Additional attributes', 'calculated-fields-form' ),
51
  'type' => 'text',
52
  'option_category' => 'basic_option',
59
  public function render($unprocessed_props, $content = null, $render_slug)
60
  {
61
  $output = '';
62
+ $form = @intval($this->props['cff_form_id']);
63
  if(!empty($form))
64
  {
65
  $output = '[CP_CALCULATED_FIELDS id="'.$form.'"';
66
+ $class_name = sanitize_text_field($this->props['cff_class_name']);
67
  if(!empty($class_name)) $output .= ' class="'.esc_attr($class_name).'"';
68
 
69
+ $attributes = sanitize_text_field($this->props['cff_attributes']);
70
  if(!empty($attributes)) $output .= ' '.$attributes;
71
 
72
  $output .= ']';
pagebuilders/elementor/elementor.pb.php CHANGED
@@ -104,7 +104,7 @@ class Elementor_CFF_Widget extends Widget_Base
104
  foreach($atts as $i => $v)
105
  {
106
  if(is_numeric($i)) continue;
107
- if($i == 'id') $url .= '&cff-form';
108
  else $url .= '&'.urlencode(sanitize_text_field($i));
109
  $url .= '='.urlencode(sanitize_text_field($v));
110
  }
104
  foreach($atts as $i => $v)
105
  {
106
  if(is_numeric($i)) continue;
107
+ if($i == 'id') $url .= '&cff-amp-form';
108
  else $url .= '&'.urlencode(sanitize_text_field($i));
109
  $url .= '='.urlencode(sanitize_text_field($v));
110
  }
pagebuilders/gutenberg/assets/js/gutenberg.js CHANGED
@@ -2,7 +2,7 @@ jQuery(function()
2
  {
3
  (function( blocks, element ) {
4
  var el = element.createElement,
5
- InspectorControls = wp.editor.InspectorControls,
6
  category = {slug:'cp-calculated-fields-form', title : 'Calculated Fields Form'};
7
 
8
  /* Plugin Category */
2
  {
3
  (function( blocks, element ) {
4
  var el = element.createElement,
5
+ InspectorControls = ('blockEditor' in wp) ? wp.blockEditor.InspectorControls : wp.editor.InspectorControls,
6
  category = {slug:'cp-calculated-fields-form', title : 'Calculated Fields Form'};
7
 
8
  /* Plugin Category */
templates/07/thumbnail.jpg CHANGED
Binary file
templates/08/thumbnail.jpg CHANGED
Binary file
templates/09/thumbnail.jpg CHANGED
Binary file
templates/10/thumbnail.jpg CHANGED
Binary file
templates/11/thumbnail.jpg CHANGED
Binary file
templates/12/thumbnail.jpg CHANGED
Binary file
templates/13/config.ini ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ prefix="cp_cff_13"
2
+ file="style.css"
3
+ title="Template 13"
4
+ thumbnail="thumbnail.jpg"
5
+ description="Based on WP53 admin appearance (class: .cp_cff_13)"
templates/13/style.css ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cp_cff_13 #fbuilder * {
2
+ box-sizing: border-box;
3
+ -moz-box-sizing: border-box;
4
+ -webkit-box-sizing: border-box;
5
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
6
+ }
7
+
8
+ .cp_cff_13 #fbuilder .fform{margin-bottom:20px;}
9
+ .cp_cff_13 #fbuilder .fform span{font-size: 16px;color: #72777c;}
10
+
11
+ .cp_cff_13 #fbuilder h1,
12
+ .cp_cff_13 #fbuilder h2,
13
+ .cp_cff_13 #fbuilder h3{ font-size: 23px; font-weight: 600; line-height: 1.3; margin:0;}
14
+
15
+ .cp_cff_13 #fbuilder input,
16
+ .cp_cff_13 #fbuilder select,
17
+ .cp_cff_13 #fbuilder textarea,
18
+ .cp_cff_13 #fbuilder button {
19
+ font-family: inherit;
20
+ font-size: inherit;
21
+ font-weight: inherit;
22
+ }
23
+
24
+ .cp_cff_13 #fbuilder textarea,
25
+ .cp_cff_13 #fbuilder input {
26
+ font-size: 14px;
27
+ }
28
+
29
+ .cp_cff_13 #fbuilder textarea {
30
+ overflow: auto;
31
+ padding: 2px 6px;
32
+ line-height: 1.42857143;
33
+ resize: vertical;
34
+ }
35
+
36
+ .cp_cff_13 #fbuilder input[type="text"],
37
+ .cp_cff_13 #fbuilder input[type="password"],
38
+ .cp_cff_13 #fbuilder input[type="date"],
39
+ .cp_cff_13 #fbuilder input[type="datetime"],
40
+ .cp_cff_13 #fbuilder input[type="email"],
41
+ .cp_cff_13 #fbuilder input[type="number"],
42
+ .cp_cff_13 #fbuilder input[type="search"],
43
+ .cp_cff_13 #fbuilder input[type="tel"],
44
+ .cp_cff_13 #fbuilder input[type="time"],
45
+ .cp_cff_13 #fbuilder input[type="url"],
46
+ .cp_cff_13 #fbuilder input[type="week"],
47
+ .cp_cff_13 #fbuilder select,
48
+ .cp_cff_13 #fbuilder textarea {
49
+ box-shadow: 0 0 0 transparent;
50
+ border-radius: 4px;
51
+ border: 1px solid #7e8993;
52
+ background-color: #fff;
53
+ color: #32373c;
54
+ }
55
+
56
+ .cp_cff_13 #fbuilder input[type="text"],
57
+ .cp_cff_13 #fbuilder input[type="password"],
58
+ .cp_cff_13 #fbuilder input[type="date"],
59
+ .cp_cff_13 #fbuilder input[type="datetime"],
60
+ .cp_cff_13 #fbuilder input[type="email"],
61
+ .cp_cff_13 #fbuilder input[type="number"],
62
+ .cp_cff_13 #fbuilder input[type="search"],
63
+ .cp_cff_13 #fbuilder input[type="tel"],
64
+ .cp_cff_13 #fbuilder input[type="time"],
65
+ .cp_cff_13 #fbuilder input[type="url"],
66
+ .cp_cff_13 #fbuilder input[type="week"] {
67
+ padding: 0 8px;
68
+ line-height: 2;
69
+ min-height: 30px;
70
+ }
71
+ .cp_cff_13 #fbuilder input[type="number"]{padding: 0 0 0 8px;}
72
+ .cp_cff_13 #fbuilder input[type="text"]:focus,
73
+ .cp_cff_13 #fbuilder input[type="password"]:focus,
74
+ .cp_cff_13 #fbuilder input[type="color"]:focus,
75
+ .cp_cff_13 #fbuilder input[type="date"]:focus,
76
+ .cp_cff_13 #fbuilder input[type="datetime"]:focus,
77
+ .cp_cff_13 #fbuilder input[type="email"]:focus,
78
+ .cp_cff_13 #fbuilder input[type="number"]:focus,
79
+ .cp_cff_13 #fbuilder input[type="search"]:focus,
80
+ .cp_cff_13 #fbuilder input[type="tel"]:focus,
81
+ .cp_cff_13 #fbuilder input[type="time"]:focus,
82
+ .cp_cff_13 #fbuilder input[type="url"]:focus,
83
+ .cp_cff_13 #fbuilder input[type="week"]:focus,
84
+ .cp_cff_13 #fbuilder input[type="checkbox"]:focus,
85
+ .cp_cff_13 #fbuilder input[type="radio"]:focus,
86
+ .cp_cff_13 #fbuilder select:focus,
87
+ .cp_cff_13 #fbuilder textarea:focus {
88
+ border-color: #007cba;
89
+ box-shadow: 0 0 0 1px #007cba;
90
+ outline: 2px solid transparent;
91
+ }
92
+ .cp_cff_13 #fbuilder select{
93
+ border-color: #7e8993;
94
+ padding: 3px 24px 3px 8px;
95
+ min-height: 28px;
96
+ vertical-align: middle;
97
+ -webkit-appearance: none;
98
+ background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;
99
+ background-size: 16px 16px;
100
+ cursor: pointer;
101
+ }
102
+
103
+ .cp_cff_13 #fbuilder input[type="email"],
104
+ .cp_cff_13 #fbuilder input[type="url"] {
105
+ direction: ltr;
106
+ }
107
+
108
+ .cp_cff_13 #fbuilder input[type="checkbox"],
109
+ .cp_cff_13 #fbuilder input[type="radio"] {
110
+ border: 1px solid #7e8993;
111
+ border-radius: 4px;
112
+ background: #fff;
113
+ color: #555;
114
+ clear: none;
115
+ cursor: pointer;
116
+ display: inline-block;
117
+ line-height: 0;
118
+ height: 16px;
119
+ margin: -4px 4px 0 0;
120
+ outline: 0;
121
+ padding: 0 !important;
122
+ text-align: center;
123
+ vertical-align: middle;
124
+ width: 16px;
125
+ min-width: 16px;
126
+ -webkit-appearance: none !important;
127
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
128
+ transition: .05s border-color ease-in-out;
129
+ }
130
+
131
+ .cp_cff_13 #fbuilder input[type="reset"]:hover,
132
+ .cp_cff_13 #fbuilder input[type="reset"]:active {
133
+ color: #00a0d2;
134
+ }
135
+
136
+ .cp_cff_13 #fbuilder input[type="radio"] {
137
+ border-radius: 50%;
138
+ margin-right: 4px;
139
+ line-height: 0.71428571;
140
+ }
141
+
142
+ .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before,
143
+ .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
144
+ float: left;
145
+ display: inline-block;
146
+ vertical-align: middle;
147
+ width: 16px;
148
+ speak: none;
149
+ -webkit-font-smoothing: antialiased;
150
+ -moz-osx-font-smoothing: grayscale;
151
+ }
152
+
153
+ .cp_cff_13 #fbuilder input[type="checkbox"]:checked::before {
154
+ content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%231e8cbe%27%2F%3E%3C%2Fsvg%3E");
155
+ margin: -3px 0 0 -4px;
156
+ height: 21px;
157
+ width: 21px;
158
+ }
159
+
160
+ .cp_cff_13 #fbuilder input[type="radio"]:checked::before {
161
+ content: "";
162
+ border-radius: 50%;
163
+ width: 8px;
164
+ height: 8px;
165
+ margin: 3px;
166
+ background-color: #1e8cbe;
167
+ line-height: 1.14285714;
168
+ }
169
+
170
+ .cp_cff_13 #fbuilder input[readonly],
171
+ .cp_cff_13 #fbuilder textarea[readonly] {
172
+ background-color: #eee;
173
+ }
174
+
175
+ .cp_cff_13 #fbuilder input:disabled,
176
+ .cp_cff_13 #fbuilder select:disabled,
177
+ .cp_cff_13 #fbuilder textarea:disabled{
178
+ background: rgba(255, 255, 255, 0.5);
179
+ border-color: rgba(222, 222, 222, 0.75);
180
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
181
+ color: rgba(51, 51, 51, 0.5);
182
+ }
183
+
184
+ .cp_cff_13 #fbuilder input[type="file"]:disabled,
185
+ .cp_cff_13 #fbuilder input[type="range"]:disabled{
186
+ background: none;
187
+ box-shadow: none;
188
+ cursor: default;
189
+ }
190
+
191
+ .cp_cff_13 #fbuilder input[type="checkbox"]:disabled,
192
+ .cp_cff_13 #fbuilder input[type="radio"]:disabled,
193
+ .cp_cff_13 #fbuilder input[type="checkbox"]:disabled:checked:before,
194
+ .cp_cff_13 #fbuilder input[type="radio"]:disabled:checked:before{
195
+ opacity: 0.7;
196
+ }
197
+
198
+ .cp_cff_13 #fbuilder .large {width: 100%;}
199
+
200
+ @media screen and (min-width: 740px),print{
201
+ .cp_cff_13 #fbuilder .medium {width: 50%;}
202
+ .cp_cff_13 #fbuilder .small {width: 25%;}
203
+ }
204
+
205
+ @media screen and (max-width: 640px){
206
+ .cp_cff_13 #fbuilder .medium,
207
+ .cp_cff_13 #fbuilder .small {width: 100%;}
208
+ }
209
+
210
+ .cp_cff_13 #fbuilder .pbSubmit,
211
+ .cp_cff_13 #fbuilder .pbreak .pbPrevious,
212
+ .cp_cff_13 #fbuilder .pbreak .pbNext,
213
+ .cp_cff_13 #fbuilder input[type=submit],
214
+ .cp_cff_13 #fbuilder input[type=button],
215
+ .cp_cff_13 #fbuilder input[type=reset]{
216
+ display: inline-block;
217
+ text-decoration: none;
218
+ font-size: 13px;
219
+ line-height: 2;
220
+ min-height: 28px;
221
+ margin: 0;
222
+ padding: 0 10px;
223
+ cursor: pointer;
224
+ border-width: 1px;
225
+ border-style: solid;
226
+ -webkit-appearance: none;
227
+ border-radius: 3px;
228
+ white-space: nowrap;
229
+ box-sizing: border-box;
230
+ vertical-align: baseline;
231
+ background: #007cba;
232
+ border-color: #007cba;
233
+ color: #fff;
234
+ text-shadow: none;
235
+ }
236
+
237
+ .cp_cff_13 #fbuilder button::-moz-focus-inner,
238
+ .cp_cff_13 #fbuilder input[type="reset"]::-moz-focus-inner,
239
+ .cp_cff_13 #fbuilder input[type="button"]::-moz-focus-inner,
240
+ .cp_cff_13 #fbuilder input[type="submit"]::-moz-focus-inner {
241
+ border-width: 0;
242
+ border-style: none;
243
+ padding: 0;
244
+ }
245
+
246
+ .cp_cff_13 #fbuilder .pbSubmit:hover,
247
+ .cp_cff_13 #fbuilder .pbreak .pbPrevious:hover,
248
+ .cp_cff_13 #fbuilder .pbreak .pbNext:hover,
249
+ .cp_cff_13 #fbuilder input[type=submit]:hover,
250
+ .cp_cff_13 #fbuilder input[type=button]:hover,
251
+ .cp_cff_13 #fbuilder input[type=reset]:hover{
252
+ background: #0071a1;
253
+ border-color: #0071a1;
254
+ color: #fff;
255
+ }
256
+ .cp_cff_13 #fbuilder .pbEnd .pbNext,
257
+ .cp_cff_13 #fbuilder .pb0 .pbPrevious{display:none;}
258
+
259
+ .cp_cff_13 #fbuilder .r{color:#FF0000;}
260
+ .cp_cff_13 #fbuilder .ui-slider-handle{background:#007cba;border:2px solid #fff;border-radius:15px;height: 1em;width: 1em;}
261
+ .cp_cff_13 #fbuilder .dfield.slider-container{border-radius: 10px;}
262
+ .cp_cff_13 #fbuilder .slider{background: #ececec; border-radius: 10px;border:0;height: .3em;}
263
+ .cp_cff_13 #fbuilder .ui-slider-range{background: #007cba;}
264
+
265
+ .cp_cff_13 #fbuilder span.uh{
266
+ font-size: 11px;
267
+ font-style: italic;
268
+ }
269
+
270
+ .cp_cff_13 #fbuilder fieldset{
271
+ border:1px solid #dcdcdc;
272
+ border-radius: 3px;
273
+ }
274
+
275
+ .cp_cff_13 #fbuilder fieldset legend{
276
+ border:1px solid #dcdcdc;
277
+ border-radius: 3px;
278
+ }
279
+
280
+ .cp_cff_13 #fbuilder fieldset legend,
281
+ .cp_cff_13 #fbuilder .fields.section_breaks>label{color: #23282d;font-size: 1.3em; margin: 1em 0;}
282
+ .cp_cff_13 #fbuilder .fields.section_breaks .section_break{border:0;}
283
+ .cp_cff_13 #fbuilder .fields.section_breaks{}
284
+
285
+ .cp_cff_13 #fbuilder .fields>label{font-weight: 500;}
286
+
287
+ .cp_cff_13 #fbuilder .discount-container{margin-top:10px;font-weight:bold;}
templates/13/thumbnail.jpg ADDED
Binary file