Version Description
- Includes additional validations rules to identify possible conflicts with Hummingbird.
Download this release
Release Info
Developer | codepeople |
Plugin | ![]() |
Version | 1.0.383 |
Comparing to | |
See all releases |
Code changes from version 1.0.336 to 1.0.383
- README.txt +75 -39
- captcha/captcha.php +0 -1
- changelog.txt +240 -2
- config/cpcff_config.cfg.php +31 -14
- cp_calculatedfieldsf_free.php +22 -3
- css/style.css +20 -1
- css/stylepublic.css +5 -4
- inc/cpcff_admin_int.inc.php +13 -15
- inc/cpcff_admin_int_list.inc.php +20 -5
- inc/cpcff_amp.inc.php +11 -6
- inc/cpcff_auxiliary.inc.php +22 -0
- inc/cpcff_banner.inc.php +1 -1
- inc/cpcff_compatibility.inc.php +98 -0
- inc/cpcff_form.inc.php +12 -3
- inc/cpcff_install_uninstall.inc.php +5 -1
- inc/cpcff_main.inc.php +20 -4
- inc/cpcff_page_builders.inc.php +5 -1
- js/fbuilder-pro-admin.jquery.js +5 -3
- js/fbuilder-pro-public.jquery.js +36 -33
- js/fields-admin/01_fbuilder.ftext.js +1 -1
- js/fields-admin/02_fbuilder.fcurrency.js +1 -1
- js/fields-admin/02_fbuilder.fnumber.js +1 -1
- js/fields-admin/02_fbuilder.fslider.js +2 -2
- js/fields-admin/04_fbuilder.fdate.js +14 -14
- js/fields-admin/05_fbuilder.ftextarea.js +1 -1
- js/fields-admin/06_fbuilder.fcheck.js +3 -7
- js/fields-admin/07_fbuilder.fradio.js +3 -7
- js/fields-admin/08_fbuilder.fdropdown.js +3 -9
- js/fields-admin/09_fbuilder.ffile.js +1 -1
- js/fields-admin/10_fbuilder.fpassword.js +1 -1
- js/fields-admin/16_fbuilder.fsummary.js +9 -9
- js/fields-admin/28_fbuilder.fcontainer.js +7 -2
- js/fields-admin/29_fbuilder.ffieldset.fc.js +1 -0
- js/fields-admin/30_fbuilder.fdiv.fc.js +1 -0
- js/fields-admin/31_fbuilder.fmedia.js +30 -26
- js/fields-admin/32_fbuilder.fbutton.js +19 -4
- js/fields-admin/34_fbuilder.fhtml.js +26 -1
- js/fields-admin/fbuilder.fcalculated.js +7 -7
- js/fields-public/02_fbuilder.fcurrency.js +9 -5
- js/fields-public/02_fbuilder.fnumber.js +8 -6
- js/fields-public/05_fbuilder.ftextarea.js +4 -1
- js/fields-public/10_fbuilder.fpassword.js +5 -1
- js/fields-public/28_fbuilder.fcontainer.js +2 -1
- js/fields-public/29_fbuilder.ffieldset.fc.js +1 -0
- js/fields-public/30_fbuilder.fdiv.fc.js +1 -0
- js/fields-public/31_fbuilder.fmedia.js +5 -2
- js/fields-public/32_fbuilder.fbutton.js +20 -10
- js/fields-public/fbuilder.fcalculated.js +18 -0
- js/modules/01_mathematical_logical/admin/module_admin.js +3 -0
- js/modules/01_mathematical_logical/public/module_public.js +37 -0
- js/modules/05_managing_fields/admin/module_admin.js +11 -1
- js/modules/05_managing_fields/public/05_managing_fields.js +58 -0
- js/modules/05_managing_fields/public/module_public.js +11 -0
- js/modules/06_connector/admin/module_admin.js +1 -1
- js/modules/06_connector/public/01_connector.js +4 -2
- js/modules/08_url/admin/module_admin.js +55 -0
- js/modules/08_url/public/01_url.js +120 -0
- js/modules/08_url/public/module_public.js +11 -0
- languages/calculated-fields-form-en_US.mo +0 -0
- languages/calculated-fields-form-en_US.po +456 -196
- pagebuilders/divi/cff.js +1 -0
- pagebuilders/divi/cff.pb.php +8 -8
- pagebuilders/elementor/elementor.pb.php +1 -1
- pagebuilders/gutenberg/assets/js/gutenberg.js +1 -1
- templates/07/thumbnail.jpg +0 -0
- templates/08/thumbnail.jpg +0 -0
- templates/09/thumbnail.jpg +0 -0
- templates/10/thumbnail.jpg +0 -0
- templates/11/thumbnail.jpg +0 -0
- templates/12/thumbnail.jpg +0 -0
- templates/13/config.ini +5 -0
- templates/13/style.css +287 -0
- 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.
|
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 |
-
*
|
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 "
|
|
|
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 |
-
(
|
239 |
-
|
240 |
-
|
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 |
-
|
|
|
|
|
291 |
|
292 |
-
|
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
|
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
|
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.
|
932 |
|
933 |
-
*
|
934 |
|
935 |
-
= 1.0.
|
936 |
|
937 |
-
*
|
938 |
|
939 |
-
= 1.0.
|
940 |
|
941 |
-
* Modifies the
|
|
|
|
|
|
|
942 |
|
943 |
-
= 1.0.
|
944 |
|
945 |
-
*
|
946 |
|
947 |
-
= 1.0.
|
948 |
|
949 |
-
*
|
|
|
|
|
|
|
950 |
|
951 |
-
= 1.0.
|
952 |
|
953 |
-
*
|
954 |
|
955 |
-
= 1.0.
|
956 |
|
957 |
-
*
|
|
|
|
|
|
|
|
|
958 |
|
959 |
-
= 1.0.
|
960 |
|
961 |
-
* Modifies the
|
962 |
-
*
|
963 |
-
* Modifies the
|
|
|
|
|
964 |
|
965 |
-
= 1.0.
|
966 |
|
967 |
-
*
|
|
|
968 |
|
969 |
-
= 1.0.
|
970 |
|
971 |
-
*
|
972 |
-
*
|
|
|
|
|
973 |
|
974 |
== Upgrade Notice ==
|
975 |
|
976 |
-
= 1.0.
|
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
|
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
|
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 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
{
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
142 |
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
{
|
145 |
-
if(!
|
146 |
-
|
|
|
|
|
|
|
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("/[^\.\/]+(\.[^\.\/]+)?#x2F;", $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.
|
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.
|
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:
|
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
|
392 |
-
#fbuilder .pbreak.pbEnd .pbNext{display:none;}
|
393 |
-
#fbuilder .ignore{
|
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><
|
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> <
|
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> <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+'&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
|
|
|
|
|
|
|
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
|
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('&','&',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 <head>"</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 > 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' =>
|
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' =>
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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::
|
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
|
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
|
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
|
192 |
-
|
|
|
|
|
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 |
-
'
|
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(
|
506 |
{
|
507 |
if(
|
508 |
-
|
509 |
-
'
|
510 |
-
'to' in configObj
|
511 |
)
|
512 |
{
|
513 |
-
var identifier =
|
514 |
-
|
515 |
-
|
|
|
516 |
direction = (_from < _to) ? 1 : -1,
|
517 |
-
|
518 |
-
|
519 |
|
520 |
while(i != _to)
|
521 |
{
|
522 |
-
$(".pbreak:not(.pb"+i+")",
|
523 |
-
$(".pb"+i,
|
524 |
-
if(direction == 1 && !
|
525 |
i += direction;
|
526 |
}
|
527 |
-
|
528 |
-
$(".pbreak:not(.pb"+i+")",
|
529 |
-
|
530 |
-
|
531 |
|
532 |
if(i == _to)
|
533 |
{
|
534 |
-
if ($(".fields",
|
535 |
{
|
536 |
try
|
537 |
{
|
538 |
-
var ffocusable =
|
539 |
_wScrollTop = $(window).scrollTop(),
|
540 |
_viewportHeight = $(window).height(),
|
541 |
-
_scrollTop =
|
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 |
-
|
563 |
}
|
564 |
return i;
|
565 |
}
|
566 |
}; // End goToPage
|
567 |
|
568 |
-
$.fbuilder[ 'showHideDep' ] = function(
|
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
|
593 |
{
|
594 |
-
var identifier =
|
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 =
|
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+#x2F;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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 ("-nn:+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn")">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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 "Date Format" 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 "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" 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 ("-nn:+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn")">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.
|
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 |
-
|
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.
|
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 |
-
|
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.
|
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 |
-
|
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 |
});
|