Version Description
- Modifies the controls to allow using other fields in the form as their predefined values.
Download this release
Release Info
Developer | codepeople |
Plugin | Calculated Fields Form |
Version | 1.0.400 |
Comparing to | |
See all releases |
Code changes from version 1.0.383 to 1.0.400
- README.txt +34 -41
- changelog.txt +89 -0
- config/cpcff_config.cfg.php +3 -2
- cp_calculatedfieldsf_free.php +4 -3
- css/style.css +1 -0
- css/stylepublic.css +3 -1
- inc/cpcff_admin_int.inc.php +2 -0
- inc/cpcff_admin_int_list.inc.php +6 -1
- inc/cpcff_install_uninstall.inc.php +3 -3
- inc/cpcff_main.inc.php +42 -4
- inc/cpcff_templates.inc.php +2 -2
- js/fbuilder-loader-public.php +3 -1
- js/fbuilder-pro-admin.jquery.js +25 -7
- js/fbuilder-pro-public.jquery.js +288 -316
- js/fields-admin/01_fbuilder.ftext.js +1 -0
- js/fields-admin/02_fbuilder.fcurrency.js +7 -3
- js/fields-admin/02_fbuilder.fnumber.js +1 -0
- js/fields-admin/02_fbuilder.fslider.js +1 -0
- js/fields-admin/03_fbuilder.femail.js +1 -0
- js/fields-admin/04_fbuilder.fdate.js +1 -0
- js/fields-admin/05_fbuilder.ftextarea.js +1 -0
- js/fields-admin/06_fbuilder.fcheck.js +1 -0
- js/fields-admin/07_fbuilder.fradio.js +1 -0
- js/fields-admin/08_fbuilder.fdropdown.js +1 -0
- js/fields-admin/09_fbuilder.ffile.js +1 -0
- js/fields-admin/10_fbuilder.fpassword.js +1 -0
- js/fields-admin/11_fbuilder.fphone.js +1 -0
- js/fields-admin/13_fbuilder.fhidden.js +5 -4
- js/fields-admin/36_fbuilder.acceptance.js +1 -0
- js/fields-admin/fbuilder.fcalculated.js +8 -1
- js/fields-public/01_fbuilder.ftext.js +1 -1
- js/fields-public/02_fbuilder.fcurrency.js +6 -3
- js/fields-public/02_fbuilder.fnumber.js +2 -2
- js/fields-public/02_fbuilder.fslider.js +5 -8
- js/fields-public/03_fbuilder.femail.js +1 -0
- js/fields-public/04_fbuilder.fdate.js +1 -1
- js/fields-public/05_fbuilder.ftextarea.js +1 -1
- js/fields-public/06_fbuilder.fcheck.js +1 -1
- js/fields-public/07_fbuilder.fradio.js +1 -1
- js/fields-public/10_fbuilder.fpassword.js +1 -1
- js/fields-public/11_fbuilder.fphone.js +1 -0
- js/fields-public/13_fbuilder.fhidden.js +1 -0
- js/fields-public/16_fbuilder.fsummary.js +14 -2
- js/fields-public/fbuilder.fcalculated.js +27 -15
- js/modules/01_mathematical_logical/public/01_logical.js +11 -11
- js/modules/01_mathematical_logical/public/module_public.js +3 -2
- js/modules/05_managing_fields/public/05_managing_fields.js +16 -10
- languages/calculated-fields-form-en_US.mo +0 -0
- languages/calculated-fields-form-en_US.po +61 -42
- templates/07/js.js +17 -28
- templates/13/style.css +0 -1
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
|
@@ -568,7 +568,7 @@ A: The form processing isn't available in the free version of the plugin. All co
|
|
568 |
|
569 |
= Q: Which calculation operations are included? =
|
570 |
|
571 |
-
A: The Free and Professional versions of the plugin includes the Mathematical
|
572 |
|
573 |
= Q: How can I round the calculated result to 2 decimal digits? =
|
574 |
|
@@ -949,66 +949,59 @@ This way the special characters should show correctly.
|
|
949 |
|
950 |
== Changelog ==
|
951 |
|
952 |
-
= 1.0.
|
953 |
|
954 |
-
*
|
955 |
|
956 |
-
= 1.0.
|
957 |
|
958 |
-
* Modifies the
|
|
|
959 |
|
960 |
-
= 1.0.
|
961 |
|
962 |
-
*
|
963 |
-
* Fixes
|
964 |
-
*
|
965 |
-
* Includes
|
966 |
|
967 |
-
= 1.0.
|
968 |
|
969 |
-
*
|
970 |
|
971 |
-
= 1.0.
|
972 |
|
973 |
-
*
|
974 |
-
*
|
975 |
-
*
|
976 |
-
* Modifies the
|
|
|
977 |
|
978 |
-
= 1.0.
|
979 |
|
980 |
-
*
|
|
|
|
|
981 |
|
982 |
-
= 1.0.
|
983 |
|
984 |
-
*
|
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.
|
991 |
|
992 |
-
* Modifies the
|
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.
|
999 |
|
1000 |
-
*
|
1001 |
-
*
|
1002 |
|
1003 |
-
= 1.0.
|
1004 |
|
1005 |
-
*
|
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.
|
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
|
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.5
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
568 |
|
569 |
= Q: Which calculation operations are included? =
|
570 |
|
571 |
+
A: The Free and Professional versions of the plugin includes the Mathematical operations module, logical operations, the managing fields module and the third-party connection module, but there are other very interesting operations modules that are distributed only with the Deverloper and Platinum versions of the plugin: teh Date/Time operations module, Financial operations module, Distance module, and Server Side operations module. [Read more](/documentation#modules "Operations modules")
|
572 |
|
573 |
= Q: How can I round the calculated result to 2 decimal digits? =
|
574 |
|
949 |
|
950 |
== Changelog ==
|
951 |
|
952 |
+
= 1.0.400 =
|
953 |
|
954 |
+
* Modifies the controls to allow using other fields in the form as their predefined values.
|
955 |
|
956 |
+
= 1.0.399 =
|
957 |
|
958 |
+
* Modifies the forms builder.
|
959 |
+
* It has been tested in WP 5.5
|
960 |
|
961 |
+
= 1.0.398 =
|
962 |
|
963 |
+
* Includes pre tags to prevent other plugins pre-process our plugin's scripts.
|
964 |
+
* Fixes a conflict with Lottie.
|
965 |
+
* Fixes an issue with the conditional attributes in the fields tags used in the notification emails and thank you pages (Professional, Developer and Platinum versions)
|
966 |
+
* Includes a new data source alternative in the recordset fields for reading the records from a javascript variable or JSON file (Developer and Platinum versions)
|
967 |
|
968 |
+
= 1.0.397 =
|
969 |
|
970 |
+
* Includes the exclude attribute in the hidden fields too.
|
971 |
|
972 |
+
= 1.0.396 =
|
973 |
|
974 |
+
* Now edit the forms and equations is easier. The plugin includes a frame with the field's name directly on the dashboard.
|
975 |
+
* Fixes an issue in the summary control. If there is a date-time field with the date component disabled, the summary will display only the time.
|
976 |
+
* Fixes an issue with the progress bar in the template 07 for multi-pages forms.
|
977 |
+
* Modifies the IF operation to prevent an error caused by the optimization algorithm of the WP-Optimize plugin.
|
978 |
+
* Includes a new attribute in the fields' settings to exclude them from submissions and notification emails (Professional, Developer, and Platinum versions).
|
979 |
|
980 |
+
= 1.0.395 =
|
981 |
|
982 |
+
* Includes a new option in the plugins settings to prevent the conflicts with the optimization plugins.
|
983 |
+
* Modifies the WooCommerce add-on (Developer and Platinum versions).
|
984 |
+
* Fixes a minor issue in the payment gateways add-ons (Platinum version).
|
985 |
|
986 |
+
= 1.0.394 =
|
987 |
|
988 |
+
* Fixes an issue formatting the calculated fields results.
|
|
|
|
|
|
|
|
|
989 |
|
990 |
+
= 1.0.393 =
|
991 |
|
992 |
+
* Modifies the pagination process.
|
|
|
|
|
|
|
|
|
993 |
|
994 |
+
= 1.0.392 =
|
995 |
|
996 |
+
* Fixes an issue parsing the fields' values.
|
997 |
+
* Modifies the WooCommerce add-on to allow the integration with the 'WooCommerce Product Add-Ons Ultimate' plugin (Developer and Platinum versions of the number)
|
998 |
|
999 |
+
= 1.0.391 =
|
1000 |
|
1001 |
+
* Includes additional header tags when the form URL is loaded directly.
|
|
|
|
|
|
|
1002 |
|
1003 |
== Upgrade Notice ==
|
1004 |
|
1005 |
+
= 1.0.400 =
|
1006 |
|
1007 |
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
|
changelog.txt
CHANGED
@@ -1,5 +1,94 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.383 =
|
4 |
|
5 |
* Includes additional validations rules to identify possible conflicts with Hummingbird.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.400 =
|
4 |
+
|
5 |
+
* Modifies the controls to allow using other fields in the form as their predefined values.
|
6 |
+
|
7 |
+
= 1.0.399 =
|
8 |
+
|
9 |
+
* Modifies the forms builder.
|
10 |
+
* It has been tested in WP 5.5
|
11 |
+
|
12 |
+
= 1.0.398 =
|
13 |
+
|
14 |
+
* Includes pre tags to prevent other plugins pre-process our plugin's scripts.
|
15 |
+
* Fixes a conflict with Lottie.
|
16 |
+
* Fixes an issue with the conditional attributes in the fields tags used in the notification emails and thank you pages (Professional, Developer and Platinum versions)
|
17 |
+
* Includes a new data source alternative in the recordset fields for reading the records from a javascript variable or JSON file (Developer and Platinum versions)
|
18 |
+
|
19 |
+
= 1.0.397 =
|
20 |
+
|
21 |
+
* Includes the exclude attribute in the hidden fields too.
|
22 |
+
|
23 |
+
= 1.0.396 =
|
24 |
+
|
25 |
+
* Now edit the forms and equations is easier. The plugin includes a frame with the field's name directly on the dashboard.
|
26 |
+
* Fixes an issue in the summary control. If there is a date-time field with the date component disabled, the summary will display only the time.
|
27 |
+
* Fixes an issue with the progress bar in the template 07 for multi-pages forms.
|
28 |
+
* Modifies the IF operation to prevent an error caused by the optimization algorithm of the WP-Optimize plugin.
|
29 |
+
* Includes a new attribute in the fields' settings to exclude them from submissions and notification emails (Professional, Developer, and Platinum versions).
|
30 |
+
|
31 |
+
= 1.0.395 =
|
32 |
+
|
33 |
+
* Includes a new option in the plugins settings to prevent the conflicts with the optimization plugins.
|
34 |
+
* Modifies the WooCommerce add-on (Developer and Platinum versions).
|
35 |
+
* Fixes a minor issue in the payment gateways add-ons (Platinum version).
|
36 |
+
|
37 |
+
= 1.0.394 =
|
38 |
+
|
39 |
+
* Fixes an issue formatting the calculated fields results.
|
40 |
+
|
41 |
+
= 1.0.393 =
|
42 |
+
|
43 |
+
* Modifies the pagination process.
|
44 |
+
|
45 |
+
= 1.0.392 =
|
46 |
+
|
47 |
+
* Fixes an issue parsing the fields' values.
|
48 |
+
* Modifies the WooCommerce add-on to allow the integration with the 'WooCommerce Product Add-Ons Ultimate' plugin (Developer and Platinum versions of the number)
|
49 |
+
|
50 |
+
= 1.0.391 =
|
51 |
+
|
52 |
+
* Includes additional header tags when the form URL is loaded directly.
|
53 |
+
|
54 |
+
= 1.0.390 =
|
55 |
+
|
56 |
+
* Modifies the calculated fields to allow formatting their values dynamically when they are editable.
|
57 |
+
* Optimizes the plugin's execution reducing the time that takes generate the form.
|
58 |
+
* Modifies the WooCommerce add-on allowing the integration with other plugins of the ecosystem, like WooCommerce Booking (Developer and Platinum versions of the plugin).
|
59 |
+
|
60 |
+
= 1.0.389 =
|
61 |
+
|
62 |
+
* Modifies the radio buttons and checkbox fields to fix some conflicts with third party themes.
|
63 |
+
|
64 |
+
= 1.0.388 =
|
65 |
+
|
66 |
+
* Begins a process of the plugin's optimization, removing unnecessary code.
|
67 |
+
* Fixes an issue in the predefined template 13.
|
68 |
+
|
69 |
+
= 1.0.387 =
|
70 |
+
|
71 |
+
* Fixes two issues in the tooltips with the instructions for users. It prevents the tooltips be displayed over the radio buttons and checkbox configured as side-by-side, and prevents the tooltips be cut-off on mobiles and small screens.
|
72 |
+
* Fixes an issue in the IGNOREFIELD and ACTIVATEFIELD operations to prevent infinite loops.
|
73 |
+
* Implements the if_paid parameter in the [CP_CALCULATED_FIELDS_RESULT] and [CP_CALCULATED_FIELDS_RESULT_LIST] shortcodes to load only the paid entries (Professional, Developer and Platinum versions of the plugin).
|
74 |
+
|
75 |
+
= 1.0.386 =
|
76 |
+
|
77 |
+
* Includes a new attribute in the currency fields to allow truncate the values entered by the users to two decimal places.
|
78 |
+
* Includes a new modifier to be used with the fields' names in the equations (|n) to prevent the fields' names be replaced by their values (Ex. fieldname1|n). Now it is possible to call the getField operation as follows: getField(fieldname1|n)
|
79 |
+
* Modifies the plugin's styles to prevent a conflict with third party themes.
|
80 |
+
* It does not set the focus by default in multi-pages forms when are loaded from mobiles devices.
|
81 |
+
|
82 |
+
= 1.0.385 =
|
83 |
+
|
84 |
+
* Fixes a style conflict.
|
85 |
+
|
86 |
+
= 1.0.384 =
|
87 |
+
|
88 |
+
* Modifies the behavior of the instructions for the users, allowing to display them on icons.
|
89 |
+
* Fixes a conflict with a third party plugin.
|
90 |
+
* Modifies the WooCommerce add-on. Includes a checkbox to replace the 'Add To Cart' buttons in the pages of the shop and archives by 'View Product' buttons (Developer and Platinum versions of the plugin).
|
91 |
+
|
92 |
= 1.0.383 =
|
93 |
|
94 |
* Includes additional validations rules to identify possible conflicts with Hummingbird.
|
config/cpcff_config.cfg.php
CHANGED
@@ -3,12 +3,13 @@
|
|
3 |
* Defines the plugin's constants and global variables
|
4 |
*/
|
5 |
|
6 |
-
// Calculated Fields Form constants
|
7 |
define('CP_CFF_PHPVERSION', phpversion());
|
8 |
define('CP_SCHEME', ( is_ssl() ) ? 'https://' : 'http://' );
|
9 |
-
|
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 );
|
3 |
* Defines the plugin's constants and global variables
|
4 |
*/
|
5 |
|
6 |
+
// Calculated Fields Form constants and global variables
|
7 |
define('CP_CFF_PHPVERSION', phpversion());
|
8 |
define('CP_SCHEME', ( is_ssl() ) ? 'https://' : 'http://' );
|
9 |
+
$GLOBALS['CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING'] = (get_option('CP_CFF_LOAD_SCRIPTS',"1") == "1" ? true : false);
|
10 |
define('CP_CALCULATEDFIELDSF_USE_CACHE', 1 );
|
11 |
define('CP_CALCULATEDFIELDSF_DEFAULT_vs_use_validation', 'true');
|
12 |
+
define('CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN', 1);
|
13 |
|
14 |
// Forms access:
|
15 |
define('CP_CALCULATEDFIELDSF_AMP', 1 );
|
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 ) );
|
@@ -47,7 +47,8 @@ function cp_calculated_fields_form_direct_form_access()
|
|
47 |
$cpcff_main->form_preview(
|
48 |
array(
|
49 |
'shortcode_atts' => array('id' => @intval($_GET['cff-form'])),
|
50 |
-
'page_title' => 'CFF'
|
|
|
51 |
)
|
52 |
);
|
53 |
}
|
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.400
|
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.400' );
|
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 ) );
|
47 |
$cpcff_main->form_preview(
|
48 |
array(
|
49 |
'shortcode_atts' => array('id' => @intval($_GET['cff-form'])),
|
50 |
+
'page_title' => 'CFF',
|
51 |
+
'page' => true
|
52 |
)
|
53 |
);
|
54 |
}
|
css/style.css
CHANGED
@@ -18,6 +18,7 @@
|
|
18 |
#tabs{height:650px;width:100%;overflow-y:auto;}
|
19 |
#fbuilder{height:640px;overflow:auto;position:relative;}
|
20 |
#fbuilder .fields{border:1px solid transparent;padding:3px 10px 14px 10px;margin:5px 0px;display:block;position:relative;}
|
|
|
21 |
|
22 |
#fbuilder .fields .collapse,
|
23 |
#fbuilder .fields .uncollapse,
|
18 |
#tabs{height:650px;width:100%;overflow-y:auto;}
|
19 |
#fbuilder{height:640px;overflow:auto;position:relative;}
|
20 |
#fbuilder .fields{border:1px solid transparent;padding:3px 10px 14px 10px;margin:5px 0px;display:block;position:relative;}
|
21 |
+
#fbuilder .fields:before {content: attr(title); background-color:#FFF1A0;border:1px solid #F9DD34; padding:0 5px; margin:0 5px 5px 0; display:table;}
|
22 |
|
23 |
#fbuilder .fields .collapse,
|
24 |
#fbuilder .fields .uncollapse,
|
css/stylepublic.css
CHANGED
@@ -15,6 +15,8 @@
|
|
15 |
#fbuilder p,
|
16 |
#fbuilder a,
|
17 |
#fbuilder label{white-space:normal;}
|
|
|
|
|
18 |
|
19 |
#fbuilder input[type="text"],
|
20 |
#fbuilder input[type="date"],
|
@@ -433,4 +435,4 @@
|
|
433 |
#fbuilder .cff-close-dlg{display:inline-block;width:16px;height:16px;position:absolute;top:10px;right:10px;cursor:pointer;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAowAAAKMB8MeazgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB5SURBVDiNrZPRCcAwCEQfnUiySAZuF8kSWeH6Yz8KrQZMQAicJ+epAB0YwAmYJKIADLic0/GPPCbQAnLznCd/4NWUFfkgy1VjH8CryA95ApYltAiTRCZxpuoW+gz9WXE6NPeg+ra1UDIxGlWEObe4SGxY5fIxlc75Bkt9V4JS7KWJAAAAAElFTkSuQmCC59ef34356faa7edebc7ed5432ddb673d');
|
434 |
}
|
435 |
#fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
|
436 |
-
#fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;}
|
15 |
#fbuilder p,
|
16 |
#fbuilder a,
|
17 |
#fbuilder label{white-space:normal;}
|
18 |
+
#fbuilder label{position:relative;}
|
19 |
+
#fbuilder .cff-help-icon{clear:none;display:inline-block;vertical-align:middle;margin-left:5px;}
|
20 |
|
21 |
#fbuilder input[type="text"],
|
22 |
#fbuilder input[type="date"],
|
435 |
#fbuilder .cff-close-dlg{display:inline-block;width:16px;height:16px;position:absolute;top:10px;right:10px;cursor:pointer;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAowAAAKMB8MeazgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB5SURBVDiNrZPRCcAwCEQfnUiySAZuF8kSWeH6Yz8KrQZMQAicJ+epAB0YwAmYJKIADLic0/GPPCbQAnLznCd/4NWUFfkgy1VjH8CryA95ApYltAiTRCZxpuoW+gz9WXE6NPeg+ra1UDIxGlWEObe4SGxY5fIxlc75Bkt9V4JS7KWJAAAAAElFTkSuQmCC59ef34356faa7edebc7ed5432ddb673d');
|
436 |
}
|
437 |
#fbuilder .cff-dialog{position:fixed;z-index:999999;padding:30px;width:600px;height:300px;background:#fff;top:50%;left:50%;box-shadow:rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;}
|
438 |
+
#fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;white-space:normal;}
|
inc/cpcff_admin_int.inc.php
CHANGED
@@ -99,6 +99,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
|
|
99 |
<input type="hidden" name="form_structure" id="form_structure" value="<?php print esc_attr(preg_replace('/"/i', '&quot;', json_encode($form_obj->get_option( 'form_structure', CP_CALCULATEDFIELDSF_DEFAULT_form_structure )))); ?>" />
|
100 |
<input type="hidden" name="templates" id="templates" value="<?php print esc_attr( json_encode( CPCFF_TEMPLATES::load_templates() ) ); ?>" />
|
101 |
<link href="<?php echo plugins_url('/css/cupertino/jquery-ui-1.8.20.custom.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>" type="text/css" rel="stylesheet" property="stylesheet" />
|
|
|
102 |
<script type="text/javascript">
|
103 |
try
|
104 |
{
|
@@ -210,6 +211,7 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
|
|
210 |
$calculatedfieldsfQuery(document).ready( calculatedFieldsFormReady );
|
211 |
}
|
212 |
</script>
|
|
|
213 |
<div style="background:#fafafa;" class="form-builder">
|
214 |
|
215 |
<div class="column ctrlsColumn">
|
99 |
<input type="hidden" name="form_structure" id="form_structure" value="<?php print esc_attr(preg_replace('/"/i', '&quot;', json_encode($form_obj->get_option( 'form_structure', CP_CALCULATEDFIELDSF_DEFAULT_form_structure )))); ?>" />
|
100 |
<input type="hidden" name="templates" id="templates" value="<?php print esc_attr( json_encode( CPCFF_TEMPLATES::load_templates() ) ); ?>" />
|
101 |
<link href="<?php echo plugins_url('/css/cupertino/jquery-ui-1.8.20.custom.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>" type="text/css" rel="stylesheet" property="stylesheet" />
|
102 |
+
<pre style="display:none;">
|
103 |
<script type="text/javascript">
|
104 |
try
|
105 |
{
|
211 |
$calculatedfieldsfQuery(document).ready( calculatedFieldsFormReady );
|
212 |
}
|
213 |
</script>
|
214 |
+
</pre>
|
215 |
<div style="background:#fafafa;" class="form-builder">
|
216 |
|
217 |
<div class="column ctrlsColumn">
|
inc/cpcff_admin_int_list.inc.php
CHANGED
@@ -41,6 +41,7 @@ else if (isset($_GET['d']) && $_GET['d'] != '')
|
|
41 |
check_admin_referer( 'cff-update-general-settings', '_cpcff_nonce' );
|
42 |
update_option( 'CP_CFF_LOAD_SCRIPTS', (isset($_GET["scr"]) && $_GET["scr"]=="1"? "0":"1") );
|
43 |
update_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', (isset($_GET["jsc"]) && $_GET["jsc"]=="1" ? 1 : 0) );
|
|
|
44 |
update_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', (isset($_GET["ecr"]) && $_GET["ecr"]=="1" ? 1 : 0) );
|
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) );
|
@@ -150,11 +151,12 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
|
|
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>
|
@@ -235,6 +237,9 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
|
|
235 |
<option value="latin1_swedish_ci">latin1_swedish_ci</option>
|
236 |
</select><br />
|
237 |
<em><?php _e( '* Update the charset if you are getting problems displaying special/non-latin characters. After updated you need to edit the special characters again.', 'calculated-fields-form' ); ?></em>
|
|
|
|
|
|
|
238 |
</div>
|
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' : ''; ?> />
|
41 |
check_admin_referer( 'cff-update-general-settings', '_cpcff_nonce' );
|
42 |
update_option( 'CP_CFF_LOAD_SCRIPTS', (isset($_GET["scr"]) && $_GET["scr"]=="1"? "0":"1") );
|
43 |
update_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', (isset($_GET["jsc"]) && $_GET["jsc"]=="1" ? 1 : 0) );
|
44 |
+
update_option( 'CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN',(isset($_GET["optm"]) && $_GET["optm"]=="1" ? 1 : 0) );
|
45 |
update_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', (isset($_GET["ecr"]) && $_GET["ecr"]=="1" ? 1 : 0) );
|
46 |
update_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS',(isset($_GET["df"]) && $_GET["df"]=="1" ? 1 : 0) );
|
47 |
update_option( 'CP_CALCULATEDFIELDSF_AMP', (isset($_GET["amp"]) && $_GET["amp"]=="1" ? 1 : 0) );
|
151 |
var scr = document.getElementById("ccscriptload").value,
|
152 |
chs = document.getElementById("cccharsets").value,
|
153 |
jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
|
154 |
+
optm = (document.getElementById("ccoptimizationplugin").checked) ? 1 : 0,
|
155 |
df = (document.getElementById("ccdirectform").checked) ? 1 : 0,
|
156 |
amp = (document.getElementById("ccampform").checked) ? 1 : 0,
|
157 |
ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
|
158 |
|
159 |
+
document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&jsc='+jsc+'&optm='+optm+'&df='+df+'&='+amp+'&r='+Math.random()+'&_cpcff_nonce=<?php echo wp_create_nonce( 'cff-update-general-settings' ); ?>';
|
160 |
}
|
161 |
}
|
162 |
</script>
|
237 |
<option value="latin1_swedish_ci">latin1_swedish_ci</option>
|
238 |
</select><br />
|
239 |
<em><?php _e( '* Update the charset if you are getting problems displaying special/non-latin characters. After updated you need to edit the special characters again.', 'calculated-fields-form' ); ?></em>
|
240 |
+
<br /><br />
|
241 |
+
<?php _e( "There is active an optimization plugin in WordPress", 'calculated-fields-form' ); ?>:<br />
|
242 |
+
<input type="checkbox" id="ccoptimizationplugin" name="ccoptimizationplugin" value="1" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN', CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN ) ) ? 'CHECKED' : ''; ?> /><em><?php _e('* Tick the checkbox if there is an optimization plugin active on the website, and the forms are not visible.', 'calculated-fields-form'); ?></em>
|
243 |
</div>
|
244 |
<br />
|
245 |
<?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' : ''; ?> />
|
inc/cpcff_install_uninstall.inc.php
CHANGED
@@ -100,7 +100,7 @@ if(!class_exists('CPCFF_INSTALLER'))
|
|
100 |
$db_queries[] = "CREATE TABLE ".$wpdb->prefix.CP_CALCULATEDFIELDSF_POSTS_TABLE_NAME_NO_PREFIX." (
|
101 |
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
102 |
formid INT NOT NULL,
|
103 |
-
time datetime
|
104 |
ipaddr VARCHAR(41) DEFAULT '' NOT NULL,
|
105 |
notifyto VARCHAR(250) DEFAULT '' NOT NULL,
|
106 |
data mediumtext,
|
@@ -115,7 +115,7 @@ if(!class_exists('CPCFF_INSTALLER'))
|
|
115 |
form_id mediumint(9) NOT NULL DEFAULT 1,
|
116 |
code VARCHAR(250) DEFAULT '' NOT NULL,
|
117 |
discount VARCHAR(250) DEFAULT '' NOT NULL,
|
118 |
-
expires datetime
|
119 |
availability int(10) unsigned NOT NULL DEFAULT 0,
|
120 |
used int(10) unsigned NOT NULL DEFAULT 0,
|
121 |
UNIQUE KEY id (id)
|
@@ -192,7 +192,7 @@ if(!class_exists('CPCFF_INSTALLER'))
|
|
192 |
$db_queries[] = "CREATE TABLE ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_REVISIONS_TABLE." (
|
193 |
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
194 |
formid mediumint(9) NOT NULL,
|
195 |
-
time datetime
|
196 |
revision longtext NOT NULL,
|
197 |
UNIQUE KEY id (id)
|
198 |
) $charset_collate;";
|
100 |
$db_queries[] = "CREATE TABLE ".$wpdb->prefix.CP_CALCULATEDFIELDSF_POSTS_TABLE_NAME_NO_PREFIX." (
|
101 |
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
102 |
formid INT NOT NULL,
|
103 |
+
time datetime,
|
104 |
ipaddr VARCHAR(41) DEFAULT '' NOT NULL,
|
105 |
notifyto VARCHAR(250) DEFAULT '' NOT NULL,
|
106 |
data mediumtext,
|
115 |
form_id mediumint(9) NOT NULL DEFAULT 1,
|
116 |
code VARCHAR(250) DEFAULT '' NOT NULL,
|
117 |
discount VARCHAR(250) DEFAULT '' NOT NULL,
|
118 |
+
expires datetime,
|
119 |
availability int(10) unsigned NOT NULL DEFAULT 0,
|
120 |
used int(10) unsigned NOT NULL DEFAULT 0,
|
121 |
UNIQUE KEY id (id)
|
192 |
$db_queries[] = "CREATE TABLE ".$wpdb->prefix.CP_CALCULATEDFIELDSF_FORMS_REVISIONS_TABLE." (
|
193 |
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
194 |
formid mediumint(9) NOT NULL,
|
195 |
+
time datetime,
|
196 |
revision longtext NOT NULL,
|
197 |
UNIQUE KEY id (id)
|
198 |
) $charset_collate;";
|
inc/cpcff_main.inc.php
CHANGED
@@ -398,6 +398,13 @@ if(!class_exists('CPCFF_MAIN'))
|
|
398 |
{
|
399 |
wp_die($message, $page_title, 200);
|
400 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
else
|
402 |
{
|
403 |
print $message;
|
@@ -762,7 +769,6 @@ if(!class_exists('CPCFF_MAIN'))
|
|
762 |
private function _public_resources( $formid )
|
763 |
{
|
764 |
/* TO-DO: This method should be analyzed after moving other functions to the main class . */
|
765 |
-
|
766 |
$public_js_path = (
|
767 |
get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) &&
|
768 |
file_exists( CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js' )
|
@@ -771,7 +777,7 @@ if(!class_exists('CPCFF_MAIN'))
|
|
771 |
|
772 |
$config_json = $this->_get_form_configuration($formid);
|
773 |
|
774 |
-
if (CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING)
|
775 |
{
|
776 |
wp_enqueue_script( "jquery" );
|
777 |
wp_enqueue_script( "jquery-ui-core" );
|
@@ -846,21 +852,53 @@ if(!class_exists('CPCFF_MAIN'))
|
|
846 |
{
|
847 |
require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_compatibility.inc.php';
|
848 |
return CPCFF_COMPATIBILITY::warnings();
|
849 |
-
} // End
|
850 |
|
851 |
private function troubleshoots()
|
852 |
{
|
853 |
-
if(
|
|
|
|
|
|
|
854 |
{
|
855 |
// Solves a conflict caused by the "Speed Booster Pack" plugin
|
856 |
add_filter('option_sbp_settings', 'CPCFF_MAIN::speed_booster_pack_troubleshoot');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
857 |
}
|
858 |
} // End troubleshoots
|
859 |
|
|
|
|
|
|
|
|
|
|
|
860 |
public static function speed_booster_pack_troubleshoot($option)
|
861 |
{
|
862 |
if(is_array($option) && isset($option['jquery_to_footer'])) unset($option['jquery_to_footer']);
|
863 |
return $option;
|
864 |
} // End speed_booster_pack_troubleshoot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
} // End CPCFF_MAIN
|
866 |
}
|
398 |
{
|
399 |
wp_die($message, $page_title, 200);
|
400 |
}
|
401 |
+
elseif(!empty($atts['page']))
|
402 |
+
{
|
403 |
+
print '<!DOCTYPE html><html><head profile="http://gmpg.org/xfn/11"><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1"></head><body>';
|
404 |
+
print $message;
|
405 |
+
print '</body></html>';
|
406 |
+
exit;
|
407 |
+
}
|
408 |
else
|
409 |
{
|
410 |
print $message;
|
769 |
private function _public_resources( $formid )
|
770 |
{
|
771 |
/* TO-DO: This method should be analyzed after moving other functions to the main class . */
|
|
|
772 |
$public_js_path = (
|
773 |
get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) &&
|
774 |
file_exists( CP_CALCULATEDFIELDSF_BASE_PATH.'/js/cache/all.js' )
|
777 |
|
778 |
$config_json = $this->_get_form_configuration($formid);
|
779 |
|
780 |
+
if ($GLOBALS['CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING'])
|
781 |
{
|
782 |
wp_enqueue_script( "jquery" );
|
783 |
wp_enqueue_script( "jquery-ui-core" );
|
852 |
{
|
853 |
require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_compatibility.inc.php';
|
854 |
return CPCFF_COMPATIBILITY::warnings();
|
855 |
+
} // End compatibility_warnings
|
856 |
|
857 |
private function troubleshoots()
|
858 |
{
|
859 |
+
if(
|
860 |
+
!$this->_is_admin &&
|
861 |
+
get_option('CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN', CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN)*1
|
862 |
+
)
|
863 |
{
|
864 |
// Solves a conflict caused by the "Speed Booster Pack" plugin
|
865 |
add_filter('option_sbp_settings', 'CPCFF_MAIN::speed_booster_pack_troubleshoot');
|
866 |
+
|
867 |
+
// Solves a conflict caused by the "Autoptimize" plugin
|
868 |
+
if(
|
869 |
+
class_exists('autoptimizeOptionWrapper') &&
|
870 |
+
(
|
871 |
+
autoptimizeOptionWrapper::get_option( 'autoptimize_js' ) ||
|
872 |
+
autoptimizeOptionWrapper::get_option( 'autoptimize_html' )
|
873 |
+
)
|
874 |
+
)
|
875 |
+
{
|
876 |
+
$GLOBALS['CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING'] = true;
|
877 |
+
add_filter( 'autoptimize_js_include_inline', 'CPCFF_MAIN::autoptimize_js_include_inline');
|
878 |
+
}
|
879 |
+
|
880 |
+
// Solves a conflict caused by the "WP Rocket" plugin
|
881 |
+
add_filter( 'rocket_exclude_js', 'CPCFF_MAIN::rocket_exclude_js' );
|
882 |
+
add_filter( 'rocket_exclude_defer_js', 'CPCFF_MAIN::rocket_exclude_js' );
|
883 |
}
|
884 |
} // End troubleshoots
|
885 |
|
886 |
+
public static function autoptimize_js_include_inline($include_inline)
|
887 |
+
{
|
888 |
+
return false;
|
889 |
+
} // autoptimize_js_include_inline
|
890 |
+
|
891 |
public static function speed_booster_pack_troubleshoot($option)
|
892 |
{
|
893 |
if(is_array($option) && isset($option['jquery_to_footer'])) unset($option['jquery_to_footer']);
|
894 |
return $option;
|
895 |
} // End speed_booster_pack_troubleshoot
|
896 |
+
|
897 |
+
public static function rocket_exclude_js($excluded_js)
|
898 |
+
{
|
899 |
+
$excluded_js[] = '(.*)/jquery.js';
|
900 |
+
return $excluded_js;
|
901 |
+
} // End rocket_exclude_js
|
902 |
+
|
903 |
} // End CPCFF_MAIN
|
904 |
}
|
inc/cpcff_templates.inc.php
CHANGED
@@ -117,7 +117,7 @@ if(!class_exists('CPCFF_TEMPLATES'))
|
|
117 |
($css = trim($template_info['file'])) != ''
|
118 |
)
|
119 |
{
|
120 |
-
if(CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING)
|
121 |
{
|
122 |
wp_enqueue_style( 'cpcff_template_css'.$template, $css, array(), CP_CALCULATEDFIELDSF_VERSION );
|
123 |
}
|
@@ -133,7 +133,7 @@ if(!class_exists('CPCFF_TEMPLATES'))
|
|
133 |
($js = trim($template_info['js'])) != ''
|
134 |
)
|
135 |
{
|
136 |
-
if(CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING)
|
137 |
{
|
138 |
wp_enqueue_script( 'cpcff_template_js'.$template, $js, array(), CP_CALCULATEDFIELDSF_VERSION );
|
139 |
}
|
117 |
($css = trim($template_info['file'])) != ''
|
118 |
)
|
119 |
{
|
120 |
+
if($GLOBALS['CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING'])
|
121 |
{
|
122 |
wp_enqueue_style( 'cpcff_template_css'.$template, $css, array(), CP_CALCULATEDFIELDSF_VERSION );
|
123 |
}
|
133 |
($js = trim($template_info['js'])) != ''
|
134 |
)
|
135 |
{
|
136 |
+
if($GLOBALS['CP_CALCULATEDFIELDSF_DEFAULT_DEFER_SCRIPTS_LOADING'])
|
137 |
{
|
138 |
wp_enqueue_script( 'cpcff_template_js'.$template, $js, array(), CP_CALCULATEDFIELDSF_VERSION );
|
139 |
}
|
js/fbuilder-loader-public.php
CHANGED
@@ -7,6 +7,7 @@ fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQue
|
|
7 |
fbuilderjQuery(window).bind( 'pageshow', function( event ){ if( typeof event.originalEvent[ 'persisted' ] != 'undefined' && event.originalEvent[ 'persisted' ] ) location.reload(); } );
|
8 |
fbuilderjQuery.fbuilderjQueryGenerator = function(){
|
9 |
if('fbuilderGeneratorFlag' in fbuilderjQuery) return;
|
|
|
10 |
(function($) {
|
11 |
// Namespace of fbuilder
|
12 |
$.fbuilder = $.fbuilder || {};
|
@@ -75,12 +76,13 @@ fbuilderjQuery.fbuilderjQueryGenerator = function(){
|
|
75 |
var cp_calculatedfieldsf_fbuilder_config = window["cp_calculatedfieldsf_fbuilder_config"+fnum];
|
76 |
var f = $("#fbuilder"+fnum).fbuilder(( typeof cp_calculatedfieldsf_fbuilder_config.obj == 'string' ) ? $.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj) : cp_calculatedfieldsf_fbuilder_config.obj );
|
77 |
f.fBuild.loadData("form_structure"+fnum);
|
|
|
78 |
} catch (e) {}
|
79 |
fcount++;
|
80 |
fnum = "_"+fcount;
|
81 |
}
|
82 |
})(fbuilderjQuery);
|
83 |
-
fbuilderjQuery.fbuilderGeneratorFlag = 1;
|
84 |
};
|
85 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
86 |
fbuilderjQuery(window).on('load',fbuilderjQuery.fbuilderjQueryGenerator);
|
7 |
fbuilderjQuery(window).bind( 'pageshow', function( event ){ if( typeof event.originalEvent[ 'persisted' ] != 'undefined' && event.originalEvent[ 'persisted' ] ) location.reload(); } );
|
8 |
fbuilderjQuery.fbuilderjQueryGenerator = function(){
|
9 |
if('fbuilderGeneratorFlag' in fbuilderjQuery) return;
|
10 |
+
var found_form = false;
|
11 |
(function($) {
|
12 |
// Namespace of fbuilder
|
13 |
$.fbuilder = $.fbuilder || {};
|
76 |
var cp_calculatedfieldsf_fbuilder_config = window["cp_calculatedfieldsf_fbuilder_config"+fnum];
|
77 |
var f = $("#fbuilder"+fnum).fbuilder(( typeof cp_calculatedfieldsf_fbuilder_config.obj == 'string' ) ? $.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj) : cp_calculatedfieldsf_fbuilder_config.obj );
|
78 |
f.fBuild.loadData("form_structure"+fnum);
|
79 |
+
found_form = true;
|
80 |
} catch (e) {}
|
81 |
fcount++;
|
82 |
fnum = "_"+fcount;
|
83 |
}
|
84 |
})(fbuilderjQuery);
|
85 |
+
if(found_form) fbuilderjQuery.fbuilderGeneratorFlag = 1;
|
86 |
};
|
87 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
88 |
fbuilderjQuery(window).on('load',fbuilderjQuery.fbuilderjQueryGenerator);
|
js/fbuilder-pro-admin.jquery.js
CHANGED
@@ -44,7 +44,7 @@
|
|
44 |
return value;
|
45 |
};
|
46 |
|
47 |
-
$.fbuilder[ '
|
48 |
{
|
49 |
return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
|
50 |
};
|
@@ -54,8 +54,8 @@
|
|
54 |
if( value == '' ) return 0;
|
55 |
value += '';
|
56 |
|
57 |
-
thousandSeparator = new RegExp( $.fbuilder.
|
58 |
-
decimalSymbol = new RegExp( $.fbuilder.
|
59 |
|
60 |
var t = value.replace( thousandSeparator, '' ).replace( decimalSymbol, '.' ).replace( /\s/g, '' ),
|
61 |
p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
|
@@ -836,7 +836,7 @@
|
|
836 |
},
|
837 |
showPredefined: function(v,c)
|
838 |
{
|
839 |
-
return '<div><label>Predefined Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+v+'</textarea><br /><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+((c)?"checked":"")+' value="1" > Use predefined value as placeholder.</div>';
|
840 |
},
|
841 |
showEqualTo: function(v,name)
|
842 |
{
|
@@ -846,6 +846,10 @@
|
|
846 |
{
|
847 |
return '<div><input type="checkbox" name="sRequired" id="sRequired" '+((v)?"checked":"")+'><label>Required</label></div>';
|
848 |
},
|
|
|
|
|
|
|
|
|
849 |
showReadonly: function(v)
|
850 |
{
|
851 |
return '<div><input type="checkbox" name="sReadonly" id="sReadonly" '+((v)?"checked":"")+'><label>Read Only</label></div>';
|
@@ -868,9 +872,9 @@
|
|
868 |
}
|
869 |
return '<label>Field Layout</label><br /><select name="sLayout" id="sLayout">'+str+'</select>';
|
870 |
},
|
871 |
-
showUserhelp: function(v,c)
|
872 |
{
|
873 |
-
return '<div><label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+v+'</textarea><br /><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+((c)?"checked":"")+' value="1" > Show as floating tooltip
|
874 |
},
|
875 |
showCsslayout: function(v)
|
876 |
{
|
@@ -888,6 +892,7 @@
|
|
888 |
ftype:"",
|
889 |
userhelp:"",
|
890 |
userhelpTooltip:false,
|
|
|
891 |
csslayout:"",
|
892 |
init:function(){},
|
893 |
editItemEvents:function( e )
|
@@ -948,6 +953,12 @@
|
|
948 |
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
949 |
});
|
950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
$("#sUserhelp").bind("keyup", {obj: this}, function(e)
|
952 |
{
|
953 |
e.data.obj.userhelp = $(this).val();
|
@@ -960,6 +971,12 @@
|
|
960 |
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
961 |
});
|
962 |
|
|
|
|
|
|
|
|
|
|
|
|
|
963 |
$("#sCsslayout").bind("keyup", {obj: this}, function(e)
|
964 |
{
|
965 |
e.data.obj.csslayout = $(this).val().replace(/\,/g, ' ').replace(/\s+/g, ' ');
|
@@ -1012,6 +1029,7 @@
|
|
1012 |
{
|
1013 |
var result = '';
|
1014 |
if(typeof this.required != 'undefined') result += $.fbuilder.showSettings.showRequired(this.required);
|
|
|
1015 |
if(typeof this.readonly != 'undefined') result += $.fbuilder.showSettings.showReadonly(this.readonly);
|
1016 |
return result;
|
1017 |
},
|
@@ -1081,7 +1099,7 @@
|
|
1081 |
|
1082 |
showUserhelp:function()
|
1083 |
{
|
1084 |
-
return $.fbuilder.showSettings.showUserhelp(this.userhelp,this.userhelpTooltip);
|
1085 |
},
|
1086 |
|
1087 |
showCsslayout:function()
|
44 |
return value;
|
45 |
};
|
46 |
|
47 |
+
$.fbuilder[ 'escapeSymbol' ] = function( value ) // Escape the symbols used in regulars expressions
|
48 |
{
|
49 |
return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
|
50 |
};
|
54 |
if( value == '' ) return 0;
|
55 |
value += '';
|
56 |
|
57 |
+
thousandSeparator = new RegExp( $.fbuilder.escapeSymbol( ( typeof thousandSeparator == 'undefined' ) ? ',' : thousandSeparator ), 'g' );
|
58 |
+
decimalSymbol = new RegExp( $.fbuilder.escapeSymbol( ( typeof decimalSymbol == 'undefined' || /^\s*$/.test( decimalSymbol ) ) ? '.' : decimalSymbol ), 'g' );
|
59 |
|
60 |
var t = value.replace( thousandSeparator, '' ).replace( decimalSymbol, '.' ).replace( /\s/g, '' ),
|
61 |
p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
|
836 |
},
|
837 |
showPredefined: function(v,c)
|
838 |
{
|
839 |
+
return '<div><label>Predefined Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+v+'</textarea><br /><i>It is possible to use another field in the form as predefined value. Ex: fieldname1</i><br /><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+((c)?"checked":"")+' value="1" > Use predefined value as placeholder.</div>';
|
840 |
},
|
841 |
showEqualTo: function(v,name)
|
842 |
{
|
846 |
{
|
847 |
return '<div><input type="checkbox" name="sRequired" id="sRequired" '+((v)?"checked":"")+'><label>Required</label></div>';
|
848 |
},
|
849 |
+
showExclude: function(v)
|
850 |
+
{
|
851 |
+
return '<div><input type="checkbox" name="sExclude" id="sExclude" '+((v)?"checked":"")+'><label>Exclude from submission</label></div>';
|
852 |
+
},
|
853 |
showReadonly: function(v)
|
854 |
{
|
855 |
return '<div><input type="checkbox" name="sReadonly" id="sReadonly" '+((v)?"checked":"")+'><label>Read Only</label></div>';
|
872 |
}
|
873 |
return '<label>Field Layout</label><br /><select name="sLayout" id="sLayout">'+str+'</select>';
|
874 |
},
|
875 |
+
showUserhelp: function(v,c,i)
|
876 |
{
|
877 |
+
return '<div><label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+v+'</textarea><br /><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+((c)?"checked":"")+' value="1" > Show as floating tooltip - <input type="checkbox" name="sTooltipIcon" id="sTooltipIcon" '+((i)?"checked":"")+' value="1" > Display on icon</div>';
|
878 |
},
|
879 |
showCsslayout: function(v)
|
880 |
{
|
892 |
ftype:"",
|
893 |
userhelp:"",
|
894 |
userhelpTooltip:false,
|
895 |
+
tooltipIcon:false,
|
896 |
csslayout:"",
|
897 |
init:function(){},
|
898 |
editItemEvents:function( e )
|
953 |
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
954 |
});
|
955 |
|
956 |
+
$("#sExclude").bind("click", {obj: this}, function(e)
|
957 |
+
{
|
958 |
+
e.data.obj.exclude = $(this).is(':checked');
|
959 |
+
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
960 |
+
});
|
961 |
+
|
962 |
$("#sUserhelp").bind("keyup", {obj: this}, function(e)
|
963 |
{
|
964 |
e.data.obj.userhelp = $(this).val();
|
971 |
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
972 |
});
|
973 |
|
974 |
+
$("#sTooltipIcon").bind("click", {obj: this}, function(e)
|
975 |
+
{
|
976 |
+
e.data.obj.tooltipIcon = $(this).is(':checked');
|
977 |
+
$.fbuilder.reloadItems( {'field': e.data.obj} );
|
978 |
+
});
|
979 |
+
|
980 |
$("#sCsslayout").bind("keyup", {obj: this}, function(e)
|
981 |
{
|
982 |
e.data.obj.csslayout = $(this).val().replace(/\,/g, ' ').replace(/\s+/g, ' ');
|
1029 |
{
|
1030 |
var result = '';
|
1031 |
if(typeof this.required != 'undefined') result += $.fbuilder.showSettings.showRequired(this.required);
|
1032 |
+
if(typeof this.exclude != 'undefined') result += $.fbuilder.showSettings.showExclude(this.exclude);
|
1033 |
if(typeof this.readonly != 'undefined') result += $.fbuilder.showSettings.showReadonly(this.readonly);
|
1034 |
return result;
|
1035 |
},
|
1099 |
|
1100 |
showUserhelp:function()
|
1101 |
{
|
1102 |
+
return $.fbuilder.showSettings.showUserhelp(this.userhelp,this.userhelpTooltip,this.tooltipIcon);
|
1103 |
},
|
1104 |
|
1105 |
showCsslayout:function()
|
js/fbuilder-pro-public.jquery.js
CHANGED
@@ -1,22 +1,21 @@
|
|
1 |
-
$.fbuilder[
|
2 |
-
$.fbuilder[
|
|
|
3 |
|
4 |
-
$.fbuilder[
|
5 |
{
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
return value;
|
11 |
};
|
12 |
|
13 |
-
$.fbuilder[
|
14 |
{
|
15 |
-
|
16 |
-
return value;
|
17 |
};
|
18 |
|
19 |
-
$.fbuilder[
|
20 |
{
|
21 |
return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
|
22 |
};
|
@@ -24,39 +23,206 @@
|
|
24 |
$.fbuilder[ 'parseValStr' ] = function( value, raw )
|
25 |
{
|
26 |
raw = raw || false;
|
27 |
-
|
28 |
-
|
29 |
-
value = $.trim( value.replace(/\\/g, "\\\\") ).replace(/'/g, "\\'").replace(/"/g, '\\"');
|
30 |
return ($.isNumeric(value)) ? ((raw) ? value : value*1) : '"' + value + '"';
|
31 |
};
|
32 |
|
33 |
-
$.fbuilder[ 'parseVal' ] = function( value,
|
34 |
{
|
35 |
-
if(
|
36 |
-
value = $.trim(value);
|
37 |
|
38 |
-
/*
|
39 |
if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value))
|
40 |
return $.fbuilder[ 'parseValStr' ]( value );
|
41 |
|
42 |
-
/*
|
43 |
-
|
44 |
-
|
45 |
-
var correction = new RegExp( ( ( /^\s*$/.test( thousandSeparator ) ) ? ',' : thousandSeparator )+('\(\\d{1,2}\)$') ),
|
46 |
-
correctionReplacement = decimalSymbol+'$1';
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
.replace( thousandSeparator, '' )
|
53 |
-
.replace( decimalSymbol, '.' )
|
54 |
-
.replace( /\s/g, '' ),
|
55 |
p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
|
|
|
|
|
|
58 |
};
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
$.fn.fbuilder = function(options){
|
62 |
var opt = $.extend({},
|
@@ -66,23 +232,26 @@
|
|
66 |
title:""
|
67 |
},options, true);
|
68 |
|
69 |
-
opt.messages = $.extend(
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
86 |
|
87 |
opt.messages.max = $.validator.format(opt.messages.max);
|
88 |
opt.messages.min = $.validator.format(opt.messages.min);
|
@@ -99,129 +268,128 @@
|
|
99 |
var _parent = element.closest( '.dfield' ),
|
100 |
_uh = _parent.find( 'span.uh:visible' );
|
101 |
|
102 |
-
|
103 |
-
e.appendTo( _uh );
|
104 |
-
else
|
105 |
-
e.insertAfter( _parent );
|
106 |
-
|
107 |
-
e.addClass( 'message' )
|
108 |
-
.css( 'position', 'absolute' );
|
109 |
}
|
110 |
}).messages = opt.messages;
|
111 |
|
112 |
var items = [],
|
113 |
reloadItemsPublic = function()
|
114 |
{
|
115 |
-
var form_tag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
form_tag.addClass( theForm.formtemplate );
|
117 |
if( !opt.cached )
|
118 |
{
|
119 |
-
$("
|
120 |
-
|
|
|
|
|
121 |
|
122 |
-
|
123 |
-
$("#fieldlist"+opt.identifier).append('<div class="pb'+page+' pbreak" page="'+page+'"></div>');
|
124 |
-
for (var i=0;i<items.length;i++)
|
125 |
{
|
126 |
items[i].index = i;
|
127 |
if (items[i].ftype=="fPageBreak")
|
128 |
{
|
129 |
page++;
|
130 |
-
$(
|
|
|
131 |
}
|
132 |
else
|
133 |
{
|
134 |
-
|
135 |
if (items[i].predefinedClick)
|
136 |
{
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
139 |
}
|
140 |
if (items[i].userhelpTooltip)
|
141 |
{
|
142 |
-
var
|
143 |
-
if(
|
144 |
-
{
|
145 |
-
uh = $("#fieldlist"+opt.identifier+" .pb"+page).find('[id*="'+items[i].name+'"]').closest(".fields");
|
146 |
-
}
|
147 |
-
uh_t = uh.find(".uh");
|
148 |
-
if(uh_t.length && uh_t.html()!="")
|
149 |
{
|
150 |
-
|
151 |
-
|
152 |
}
|
|
|
153 |
}
|
154 |
}
|
155 |
}
|
156 |
}
|
157 |
else
|
158 |
{
|
159 |
-
|
160 |
-
|
161 |
}
|
162 |
|
163 |
if (page>0)
|
164 |
{
|
165 |
if( !opt.cached ) // Check if the form is cached
|
166 |
{
|
167 |
-
$("
|
168 |
-
$("
|
169 |
-
var code = $(this).html()
|
170 |
-
|
171 |
|
172 |
if (index == page)
|
173 |
{
|
174 |
-
|
175 |
-
|
176 |
-
code += '<div class="captcha">'+$("#cpcaptchalayer"+opt.identifier).html()+'</div><div class="clearer"></div>';
|
177 |
-
$("#cpcaptchalayer"+opt.identifier).html("");
|
178 |
-
}
|
179 |
-
if ($("#cp_subbtn"+opt.identifier).html())
|
180 |
-
{
|
181 |
-
bSubmit = '<div class="pbSubmit" tabindex="0">'+$("#cp_subbtn"+opt.identifier).html()+'</div>';
|
182 |
-
}
|
183 |
}
|
|
|
184 |
$(this).html('<fieldset><legend>'+opt.messages.pageof.replace( /\{\s*\d+\s*\}/, (index+1) ).replace( /\{\s*\d+\s*\}/, (page+1) )+'</legend>'+code+'<div class="pbPrevious" tabindex="0">'+opt.messages.previous+'</div><div class="pbNext" tabindex="0">'+opt.messages.next+'</div>'+bSubmit+'<div class="clearer"></div></fieldset>');
|
185 |
});
|
186 |
}
|
187 |
|
188 |
-
|
189 |
if(evt.which == 13 || evt.which == 32) $(this).click();
|
190 |
}).bind("click", {'identifier' : opt.identifier}, function(evt){
|
191 |
-
var
|
192 |
-
_from = _pg.attr('page')*1,
|
193 |
_inc = ($(this).hasClass("pbPrevious")) ? -1 : 1,
|
194 |
-
|
195 |
-
_p;
|
196 |
-
|
197 |
-
_p = $.fbuilder['goToPage'](
|
198 |
{
|
199 |
'formIdentifier' : evt.data.identifier,
|
200 |
'from' : _from,
|
201 |
-
'to' :
|
202 |
-
}
|
203 |
-
|
204 |
-
|
205 |
-
if(
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
209 |
});
|
210 |
}
|
211 |
else
|
212 |
{
|
213 |
-
if( !opt.cached )
|
214 |
-
{
|
215 |
-
if ( $( "#cpcaptchalayer"+opt.identifier ).length && !/^\s*$/.test( $( "#cpcaptchalayer"+opt.identifier ).html() ) )
|
216 |
-
{
|
217 |
-
$("#fieldlist"+opt.identifier+" .pb"+page).append('<div class="captcha">'+$("#cpcaptchalayer"+opt.identifier).html()+'</div>');
|
218 |
-
$("#cpcaptchalayer"+opt.identifier).html("");
|
219 |
-
}
|
220 |
-
if ($("#cp_subbtn"+opt.identifier).html())
|
221 |
-
{
|
222 |
-
$("#fieldlist"+opt.identifier+" .pb"+page).append('<div class="pbSubmit" tabindex="0">'+$("#cp_subbtn"+opt.identifier).html()+'</div>');
|
223 |
-
}
|
224 |
-
}
|
225 |
}
|
226 |
|
227 |
if( !opt.cached && opt.setCache)
|
@@ -278,7 +446,7 @@
|
|
278 |
try
|
279 |
{
|
280 |
$.widget.bridge('uitooltip', $.ui.tooltip);
|
281 |
-
$( "#fbuilder"+opt.identifier ).uitooltip({show: false,hide:false,tooltipClass:"uh-tooltip",position: { my: "left top", at: "left bottom+5", collision: "
|
282 |
var duration = ('undefined' != typeof tooltip_duration && /^\d+$/.test(tooltip_duration)) ? tooltip_duration : 3000;
|
283 |
setTimeout( function(){$(ui.tooltip).hide('fade'); }, duration);
|
284 |
}}catch( err ){}} });
|
@@ -368,7 +536,7 @@
|
|
368 |
|
369 |
reloadItemsPublic();
|
370 |
}
|
371 |
-
$.fbuilder.
|
372 |
}
|
373 |
}
|
374 |
};
|
@@ -378,10 +546,6 @@
|
|
378 |
return this;
|
379 |
}; // End fbuilder plugin
|
380 |
|
381 |
-
$.fbuilder[ 'showSettings' ] = {
|
382 |
-
formlayoutList : [{id:"top_aligned",name:"Top Aligned"},{id:"left_aligned",name:"Left Aligned"},{id:"right_aligned",name:"Right Aligned"}]
|
383 |
-
};
|
384 |
-
|
385 |
$.fbuilder.controls[ 'ffields' ] = function(){};
|
386 |
$.extend($.fbuilder.controls[ 'ffields' ].prototype,
|
387 |
{
|
@@ -451,198 +615,6 @@
|
|
451 |
}
|
452 |
});
|
453 |
|
454 |
-
$.fbuilder[ 'setBrowserHistory' ] = function(replace)
|
455 |
-
{
|
456 |
-
if('history' in window)
|
457 |
-
{
|
458 |
-
var bookmark = '#',
|
459 |
-
separator = '';
|
460 |
-
for(var formId in $.fbuilder.forms)
|
461 |
-
{
|
462 |
-
bookmark += separator+'f'+formId.replace(/[^\d]/g,'')+'p'+($.fbuilder.forms[formId]['currentPage'] || 0);
|
463 |
-
separator = '|';
|
464 |
-
}
|
465 |
-
history[(replace) ? 'replaceState' : 'pushState']({}, document.title, bookmark);
|
466 |
-
}
|
467 |
-
}; // End setBrowserHistory
|
468 |
-
|
469 |
-
$.fbuilder[ 'manageHistory' ] = function(state)
|
470 |
-
{
|
471 |
-
var bookmark = (document.URL.split('#').length > 1) ? document.URL.split('#')[1] : null,
|
472 |
-
_match, _form, _to, setHistoryEntry = false;
|
473 |
-
|
474 |
-
if(bookmark)
|
475 |
-
{
|
476 |
-
while(_match = bookmark.match(/f(\d+)p(\d+)\|?/))
|
477 |
-
{
|
478 |
-
_form = '_'+_match[1];
|
479 |
-
_to = _match[2]*1;
|
480 |
-
bookmark = bookmark.replace(_match[0],'');
|
481 |
-
|
482 |
-
if(!(_form in $.fbuilder.forms)){setHistoryEntry = true; continue;}
|
483 |
-
if('currentPage' in $.fbuilder.forms[_form]) continue;
|
484 |
-
if(
|
485 |
-
!$('#'+$.fbuilder.forms[_form].formId).hasClass('persist-form') ||
|
486 |
-
_to != $.fbuilder['goToPage'](
|
487 |
-
{
|
488 |
-
'formIdentifier' : _form,
|
489 |
-
'from' : 0,
|
490 |
-
'to' : _to
|
491 |
-
}
|
492 |
-
)
|
493 |
-
) setHistoryEntry = true;
|
494 |
-
}
|
495 |
-
}
|
496 |
-
else
|
497 |
-
{
|
498 |
-
for(_form in $.fbuilder.forms)
|
499 |
-
{
|
500 |
-
if('currentPage' in $.fbuilder.forms[_form])
|
501 |
-
$.fbuilder['goToPage'](
|
502 |
-
{
|
503 |
-
'formIdentifier' : _form,'from' : 0, 'to' : 0
|
504 |
-
}
|
505 |
-
);
|
506 |
-
}
|
507 |
-
}
|
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
|
575 |
-
*/
|
576 |
-
var process_items = function( items, isNotFirstTime )
|
577 |
-
{
|
578 |
-
for( var i = 0, h = items.length; i < h; i++ )
|
579 |
-
{
|
580 |
-
if( typeof items[ i ] == 'string' ) items[i] = $.fbuilder[ 'forms' ][ identifier ].getItem( items[i] );
|
581 |
-
if(isNotFirstTime && items[i])
|
582 |
-
{
|
583 |
-
$('[name="'+items[i].name+'"]').trigger('depEvent');
|
584 |
-
if(items[i].usedInEquations ) $.fbuilder[ 'calculator' ].enqueueEquation( identifier, items[i].usedInEquations );
|
585 |
-
}
|
586 |
-
if( typeof items[ i ][ 'showHideDep' ] != 'undefined' )
|
587 |
-
{
|
588 |
-
var list = items[ i ][ 'showHideDep' ]( toShow, toHide, hiddenByContainer );
|
589 |
-
if( typeof list != 'undefined' && list.length )
|
590 |
-
process_items( list, true );
|
591 |
-
}
|
592 |
-
}
|
593 |
-
};
|
594 |
-
|
595 |
-
if('formIdentifier' in config)
|
596 |
-
{
|
597 |
-
var identifier = config[ 'formIdentifier' ];
|
598 |
-
|
599 |
-
if( typeof $.fbuilder[ 'forms' ][ identifier ] != 'undefined' )
|
600 |
-
{
|
601 |
-
var toShow = $.fbuilder[ 'forms' ][ identifier ][ 'toShow' ],
|
602 |
-
toHide = $.fbuilder[ 'forms' ][ identifier ][ 'toHide' ],
|
603 |
-
hiddenByContainer = $.fbuilder[ 'forms' ][ identifier ][ 'hiddenByContainer' ],
|
604 |
-
items = ('fieldIdentifier' in config) ? [ $.fbuilder[ 'forms' ][ identifier ].getItem(config[ 'fieldIdentifier' ].replace(/_[cr]b\d+$/i, '')) ] : $.fbuilder[ 'forms' ][ identifier ].getItems();
|
605 |
-
|
606 |
-
process_items( items );
|
607 |
-
$( document ).trigger( 'showHideDepEvent', $.fbuilder[ 'forms' ][ identifier ][ 'formId' ] );
|
608 |
-
}
|
609 |
-
}
|
610 |
-
}; // End showHideDep
|
611 |
-
|
612 |
-
// Load default values
|
613 |
-
$.fbuilder[ 'cpcff_load_defaults' ] = function( o )
|
614 |
-
{
|
615 |
-
var $ = fbuilderjQuery,
|
616 |
-
id,
|
617 |
-
item,
|
618 |
-
form_data,
|
619 |
-
form_obj;
|
620 |
-
|
621 |
-
if( typeof cpcff_default != 'undefined' )
|
622 |
-
{
|
623 |
-
id = o.identifier.replace( /[^\d]/g, '' );
|
624 |
-
if( typeof cpcff_default[ id ] != 'undefined' )
|
625 |
-
{
|
626 |
-
form_data = cpcff_default[ id ];
|
627 |
-
id = '_'+id;
|
628 |
-
form_obj = $.fbuilder[ 'forms' ][ id ];
|
629 |
-
|
630 |
-
for( var field_id in form_data )
|
631 |
-
{
|
632 |
-
item = form_obj.getItem( field_id+id );
|
633 |
-
try{ if( typeof item[ 'setVal' ] != 'undefined' ) item.setVal( form_data[ field_id ] ); }
|
634 |
-
catch(err){}
|
635 |
-
}
|
636 |
-
|
637 |
-
$.fbuilder.showHideDep(
|
638 |
-
{
|
639 |
-
'formIdentifier' : o.identifier
|
640 |
-
}
|
641 |
-
);
|
642 |
-
}
|
643 |
-
}
|
644 |
-
};
|
645 |
-
|
646 |
// Read history
|
647 |
window.addEventListener('popstate', function(){
|
648 |
try
|
@@ -655,5 +627,5 @@
|
|
655 |
});
|
656 |
|
657 |
$(window).on('load', function(){
|
658 |
-
$.fbuilder.manageHistory();
|
659 |
});
|
1 |
+
$.fbuilder['version'] = '1.0.400';
|
2 |
+
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
+
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
5 |
+
$.fbuilder['htmlEncode'] = function(value)
|
6 |
{
|
7 |
+
return $('<div/>').text(value).html()
|
8 |
+
.replace(/"/g, """)
|
9 |
+
.replace(/&lt;/g, '<')
|
10 |
+
.replace(/&gt;/g, '>');
|
|
|
11 |
};
|
12 |
|
13 |
+
$.fbuilder['htmlDecode'] = function(value)
|
14 |
{
|
15 |
+
return (/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/ig.test(value)) ? $('<div/>').html(value).text() : value;
|
|
|
16 |
};
|
17 |
|
18 |
+
$.fbuilder['escapeSymbol'] = function( value ) // Escape the symbols used in regulars expressions
|
19 |
{
|
20 |
return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
|
21 |
};
|
23 |
$.fbuilder[ 'parseValStr' ] = function( value, raw )
|
24 |
{
|
25 |
raw = raw || false;
|
26 |
+
value = $.trim(value || '');
|
27 |
+
value = value.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/"/g, '\\"');
|
|
|
28 |
return ($.isNumeric(value)) ? ((raw) ? value : value*1) : '"' + value + '"';
|
29 |
};
|
30 |
|
31 |
+
$.fbuilder[ 'parseVal' ] = function( value, thousand, decimal )
|
32 |
{
|
33 |
+
if(!!value == false) return 0;
|
|
|
34 |
|
35 |
+
/* date */
|
36 |
if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value))
|
37 |
return $.fbuilder[ 'parseValStr' ]( value );
|
38 |
|
39 |
+
/* number */
|
40 |
+
thousand = $.fbuilder.escapeSymbol($.trim((typeof thousand != 'undefined') ? thousand : ','));
|
41 |
+
decimal = $.trim((!!!decimal || /^\s*$/.test(decimal)) ? '.': decimal);
|
|
|
|
|
42 |
|
43 |
+
var t = (new String(value)).replace(new RegExp((/^\s*$/.test(thousand) ? '\,' : thousand)+'\(\\d{1,2}\)$' ), decimal+'$1')
|
44 |
+
.replace( new RegExp(thousand, 'g'), '' )
|
45 |
+
.replace( new RegExp($.fbuilder.escapeSymbol(decimal), 'g' ), '.' )
|
46 |
+
.replace( /\s/g, '' ),
|
|
|
|
|
|
|
47 |
p = /[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec( t );
|
48 |
+
return (p) ? ((/^0\d/.test(p[0])) ? p[0].substr(1) : p[0])*1 : $.fbuilder['parseValStr'](value);
|
49 |
+
};
|
50 |
+
|
51 |
+
$.fbuilder[ 'isMobile' ] = function() {
|
52 |
+
try{ document.createEvent("TouchEvent"); return true; }
|
53 |
+
catch(e){ return false; }
|
54 |
+
};
|
55 |
+
|
56 |
+
$.fbuilder[ 'setBrowserHistory' ] = function(r)
|
57 |
+
{
|
58 |
+
if('history' in window)
|
59 |
+
{
|
60 |
+
var b = '#',
|
61 |
+
s = '';
|
62 |
+
for(var id in $.fbuilder.forms)
|
63 |
+
{
|
64 |
+
b += s+'f'+id.replace(/[^\d]/g,'')+'p'+($.fbuilder.forms[id]['currentPage'] || 0);
|
65 |
+
s = '|';
|
66 |
+
}
|
67 |
+
history[(r) ? 'replaceState' : 'pushState']({}, document.title, b);
|
68 |
+
}
|
69 |
+
};
|
70 |
+
|
71 |
+
$.fbuilder[ 'manageHistory' ] = function(onload)
|
72 |
+
{
|
73 |
+
var b = (document.URL.split('#')[1] || null),
|
74 |
+
m, f, t, flag = false;
|
75 |
+
|
76 |
+
if(b)
|
77 |
+
{
|
78 |
+
while(m = b.match(/f(\d+)p(\d+)\|?/))
|
79 |
+
{
|
80 |
+
f = '_'+m[1];
|
81 |
+
t = onload ? 0 : m[2]*1;
|
82 |
+
b = b.replace(m[0],'');
|
83 |
+
|
84 |
+
flag = (
|
85 |
+
!(f in $.fbuilder.forms) ||
|
86 |
+
t != $.fbuilder['goToPage'](
|
87 |
+
{
|
88 |
+
'formIdentifier' : f,
|
89 |
+
'from' : 0,
|
90 |
+
'to' : t
|
91 |
+
}
|
92 |
+
)
|
93 |
+
);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
else
|
97 |
+
{
|
98 |
+
for(f in $.fbuilder.forms)
|
99 |
+
if('currentPage' in $.fbuilder.forms[f])
|
100 |
+
$.fbuilder['goToPage']({'formIdentifier' : f, 'from' : 0, 'to' : 0});
|
101 |
+
}
|
102 |
+
if(flag) $.fbuilder.setBrowserHistory(true);
|
103 |
+
};
|
104 |
+
|
105 |
+
$.fbuilder[ 'goToPage' ] = function( config )
|
106 |
+
{
|
107 |
+
if(
|
108 |
+
('formIdentifier' in config || 'form' in config) &&
|
109 |
+
'to' in config
|
110 |
+
)
|
111 |
+
{
|
112 |
+
var id = (config['form']) ? $('[name="cp_calculatedfieldsf_pform_psequence"]', config['form']).val() : config['formIdentifier'],
|
113 |
+
formObj = $.fbuilder.forms[id],
|
114 |
+
_from = (config['from'] || formObj['currentPage'] || 0)*1,
|
115 |
+
_to = config['to']*1,
|
116 |
+
direction = (_from < _to) ? 1 : -1,
|
117 |
+
formDom = $(config['form'] || '[id="'+formObj.formId+'"]'),
|
118 |
+
pageDom, i = _from;
|
119 |
+
|
120 |
+
while(i != _to)
|
121 |
+
{
|
122 |
+
if(direction == 1 && !formDom.valid()) break;
|
123 |
+
i += direction;
|
124 |
+
}
|
125 |
+
formObj['currentPage'] = i;
|
126 |
+
$(".pbreak:not(.pb"+i+")",formDom).hide().find(".field").addClass("ignorepb");
|
127 |
+
(pageDom = $(".pbreak.pb"+i,formDom)).show().find(".ignorepb").removeClass("ignorepb");
|
128 |
+
|
129 |
+
if(i != _from)
|
130 |
+
{
|
131 |
+
try
|
132 |
+
{
|
133 |
+
if(!this.isMobile())
|
134 |
+
{
|
135 |
+
var ff = pageDom.find(":focusable:first");
|
136 |
+
if( ff &&
|
137 |
+
!ff.hasClass('hasDatepicker') &&
|
138 |
+
ff.attr('type') != 'radio' &&
|
139 |
+
ff.attr('type') != 'checkbox' &&
|
140 |
+
ff.closest('[uh]').length == 0 /* FIXES AUTO-OPEN TOOLTIPS */
|
141 |
+
) ff.focus();
|
142 |
+
}
|
143 |
+
var _wScrollTop = $(window).scrollTop(),
|
144 |
+
_viewportHeight = $(window).height(),
|
145 |
+
_scrollTop = formDom.offset().top;
|
146 |
+
if(_scrollTop < _wScrollTop || (_wScrollTop+_viewportHeight)<_scrollTop )
|
147 |
+
$( 'html, body' ).animate({scrollTop: _scrollTop}, 50);
|
148 |
+
}
|
149 |
+
catch(e){}
|
150 |
+
}
|
151 |
+
else
|
152 |
+
{
|
153 |
+
formDom.validate().focusInvalid();
|
154 |
+
}
|
155 |
+
return i;
|
156 |
+
}
|
157 |
+
}; // End goToPage
|
158 |
+
|
159 |
+
$.fbuilder[ 'showHideDep' ] = function( config )
|
160 |
+
{
|
161 |
+
// If isNotFirstTime the enqueue the equations associated to the fields
|
162 |
+
var processItems = function( items, isNotFirstTime )
|
163 |
+
{
|
164 |
+
for( var i = 0, h = items.length; i < h; i++ )
|
165 |
+
{
|
166 |
+
if(typeof items[i] == 'string') items[i] = $.fbuilder['forms'][id].getItem(items[i]);
|
167 |
+
if(items[i])
|
168 |
+
{
|
169 |
+
if(isNotFirstTime)
|
170 |
+
{
|
171 |
+
$('[name="'+items[i].name+'"]').trigger('depEvent');
|
172 |
+
if(items[i].usedInEquations) $.fbuilder['calculator'].enqueueEquation(id, items[i].usedInEquations);
|
173 |
+
}
|
174 |
+
if('showHideDep' in items[i])
|
175 |
+
{
|
176 |
+
var list = items[i]['showHideDep']( toShow, toHide, hiddenByContainer );
|
177 |
+
if(list && list.length) processItems( list, true );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
};
|
182 |
+
|
183 |
+
if('formIdentifier' in config)
|
184 |
+
{
|
185 |
+
var id = config['formIdentifier'];
|
186 |
+
|
187 |
+
if(id in $.fbuilder['forms'])
|
188 |
+
{
|
189 |
+
var toShow = $.fbuilder['forms'][id]['toShow'],
|
190 |
+
toHide = $.fbuilder['forms'][id]['toHide'],
|
191 |
+
hiddenByContainer = $.fbuilder['forms'][id]['hiddenByContainer'],
|
192 |
+
items = ('fieldIdentifier' in config) ? [$.fbuilder['forms'][id].getItem(config['fieldIdentifier'].replace(/_[cr]b\d+$/i, ''))] : $.fbuilder['forms'][id].getItems();
|
193 |
|
194 |
+
processItems(items);
|
195 |
+
$(document).trigger('showHideDepEvent', $.fbuilder['forms'][id]['formId']);
|
196 |
+
}
|
197 |
+
}
|
198 |
};
|
199 |
|
200 |
+
// Load default values
|
201 |
+
$.fbuilder[ 'cpcffLoadDefaults' ] = function( o )
|
202 |
+
{
|
203 |
+
if( typeof cpcff_default != 'undefined' )
|
204 |
+
{
|
205 |
+
var $ = fbuilderjQuery,
|
206 |
+
id = o.identifier.replace(/[^\d]/g, ''),
|
207 |
+
item, data, formObj;
|
208 |
+
|
209 |
+
if(id in cpcff_default)
|
210 |
+
{
|
211 |
+
data = cpcff_default[id];
|
212 |
+
id = '_'+id;
|
213 |
+
formObj = $.fbuilder['forms'][id];
|
214 |
+
|
215 |
+
for( var fieldId in data )
|
216 |
+
{
|
217 |
+
item = formObj.getItem(fieldId+id);
|
218 |
+
try{ if('setVal' in item) item.setVal(data[fieldId]); }
|
219 |
+
catch(err){}
|
220 |
+
}
|
221 |
+
|
222 |
+
$.fbuilder.showHideDep({'formIdentifier' : o.identifier});
|
223 |
+
}
|
224 |
+
}
|
225 |
+
};
|
226 |
|
227 |
$.fn.fbuilder = function(options){
|
228 |
var opt = $.extend({},
|
232 |
title:""
|
233 |
},options, true);
|
234 |
|
235 |
+
opt.messages = $.extend(
|
236 |
+
{
|
237 |
+
previous: "Previous",
|
238 |
+
next: "Next",
|
239 |
+
pageof: "Page {0} of {0}",
|
240 |
+
required: "This field is required.",
|
241 |
+
email: "Please enter a valid email address.",
|
242 |
+
datemmddyyyy: "Please enter a valid date with this format(mm/dd/yyyy)",
|
243 |
+
dateddmmyyyy: "Please enter a valid date with this format(dd/mm/yyyy)",
|
244 |
+
number: "Please enter a valid number.",
|
245 |
+
digits: "Please enter only digits.",
|
246 |
+
maxlength: "Please enter no more than {0} characters.",
|
247 |
+
minlength: "Please enter at least {0} characters.",
|
248 |
+
equalTo: "Please enter the same value again.",
|
249 |
+
max: "Please enter a value less than or equal to {0}.",
|
250 |
+
min: "Please enter a value greater than or equal to {0}.",
|
251 |
+
currency: "Please enter a valid currency value."
|
252 |
+
},
|
253 |
+
(opt.messages || {})
|
254 |
+
);
|
255 |
|
256 |
opt.messages.max = $.validator.format(opt.messages.max);
|
257 |
opt.messages.min = $.validator.format(opt.messages.min);
|
268 |
var _parent = element.closest( '.dfield' ),
|
269 |
_uh = _parent.find( 'span.uh:visible' );
|
270 |
|
271 |
+
e.addClass( 'message' ).css( 'position', 'absolute' ).appendTo( (_uh.length) ? _uh : _parent );
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
}).messages = opt.messages;
|
274 |
|
275 |
var items = [],
|
276 |
reloadItemsPublic = function()
|
277 |
{
|
278 |
+
var form_tag = $("#cp_calculatedfieldsf_pform"+opt.identifier),
|
279 |
+
fieldlist_tag = $("#fieldlist"+opt.identifier),
|
280 |
+
page_tag,
|
281 |
+
i = 0,
|
282 |
+
page = 0,
|
283 |
+
getCaptchaHTML = function(){
|
284 |
+
var captcha_tag = $( "#cpcaptchalayer"+opt.identifier+':not(:empty)')
|
285 |
+
html = '';
|
286 |
+
if( captcha_tag.length )
|
287 |
+
{
|
288 |
+
html += '<div class="captcha">'+captcha_tag.html()+'</div><div class="clearer"></div>';
|
289 |
+
captcha_tag.remove();
|
290 |
+
}
|
291 |
+
return html;
|
292 |
+
},
|
293 |
+
getSubmitHTML = function(){
|
294 |
+
var submit_tag = $("#cp_subbtn"+opt.identifier+':not(:empty)'),
|
295 |
+
html = '';
|
296 |
+
if( submit_tag.length )
|
297 |
+
{
|
298 |
+
html += '<div class="pbSubmit" tabindex="0">'+submit_tag.html()+'</div>';
|
299 |
+
submit_tag.remove();
|
300 |
+
}
|
301 |
+
return html;
|
302 |
+
};
|
303 |
+
|
304 |
form_tag.addClass( theForm.formtemplate );
|
305 |
if( !opt.cached )
|
306 |
{
|
307 |
+
page_tag = $('<div class="pb'+page+' pbreak" page="'+page+'"></div>');
|
308 |
+
fieldlist_tag.addClass(theForm.formlayout)
|
309 |
+
.html(theForm.show())
|
310 |
+
.append(page_tag);
|
311 |
|
312 |
+
for(i; i<items.length; i++)
|
|
|
|
|
313 |
{
|
314 |
items[i].index = i;
|
315 |
if (items[i].ftype=="fPageBreak")
|
316 |
{
|
317 |
page++;
|
318 |
+
page_tag = $('<div class="pb'+page+' pbreak" page="'+page+'"></div>');
|
319 |
+
fieldlist_tag.append(page_tag);
|
320 |
}
|
321 |
else
|
322 |
{
|
323 |
+
page_tag.append(items[i].show());
|
324 |
if (items[i].predefinedClick)
|
325 |
{
|
326 |
+
page_tag.find("#"+items[i].name).attr({placeholder: items[i].predefined, value: ""});
|
327 |
+
}
|
328 |
+
if(items[i].exclude)
|
329 |
+
{
|
330 |
+
page_tag.find('.'+items[i].name).addClass('cff-exclude');
|
331 |
}
|
332 |
if (items[i].userhelpTooltip)
|
333 |
{
|
334 |
+
var uh = items[i].jQueryRef();
|
335 |
+
if(items[i].userhelp && items[i].userhelp.length)
|
|
|
|
|
|
|
|
|
|
|
336 |
{
|
337 |
+
if(items[i].tooltipIcon) $('<span class="cff-help-icon ui-icon ui-icon-info"></span>').attr('uh', items[i].userhelp).appendTo($(uh.children('label')[0] || uh));
|
338 |
+
else $(uh.find(".dfield")[0] || uh).attr('uh', items[i].userhelp);
|
339 |
}
|
340 |
+
uh.find(".uh").remove();
|
341 |
}
|
342 |
}
|
343 |
}
|
344 |
}
|
345 |
else
|
346 |
{
|
347 |
+
page = fieldlist_tag.find( '.pbreak' ).length;
|
348 |
+
i = items.length;
|
349 |
}
|
350 |
|
351 |
if (page>0)
|
352 |
{
|
353 |
if( !opt.cached ) // Check if the form is cached
|
354 |
{
|
355 |
+
$(".pb"+page, fieldlist_tag).addClass("pbEnd");
|
356 |
+
$(".pbreak", fieldlist_tag).each(function(index) {
|
357 |
+
var code = $(this).html(),
|
358 |
+
bSubmit = '';
|
359 |
|
360 |
if (index == page)
|
361 |
{
|
362 |
+
code += getCaptchaHTML();
|
363 |
+
bSubmit = getSubmitHTML();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
}
|
365 |
+
|
366 |
$(this).html('<fieldset><legend>'+opt.messages.pageof.replace( /\{\s*\d+\s*\}/, (index+1) ).replace( /\{\s*\d+\s*\}/, (page+1) )+'</legend>'+code+'<div class="pbPrevious" tabindex="0">'+opt.messages.previous+'</div><div class="pbNext" tabindex="0">'+opt.messages.next+'</div>'+bSubmit+'<div class="clearer"></div></fieldset>');
|
367 |
});
|
368 |
}
|
369 |
|
370 |
+
fieldlist_tag.find(".pbPrevious,.pbNext").bind("keyup", function(evt){
|
371 |
if(evt.which == 13 || evt.which == 32) $(this).click();
|
372 |
}).bind("click", {'identifier' : opt.identifier}, function(evt){
|
373 |
+
var _from = ($.fbuilder.forms[evt.data.identifier]['currentPage'] || 0),
|
|
|
374 |
_inc = ($(this).hasClass("pbPrevious")) ? -1 : 1,
|
375 |
+
_p = $.fbuilder['goToPage'](
|
|
|
|
|
|
|
376 |
{
|
377 |
'formIdentifier' : evt.data.identifier,
|
378 |
'from' : _from,
|
379 |
+
'to' : _from+_inc
|
380 |
+
}),
|
381 |
+
_pDom = $('.pb'+_p);
|
382 |
+
|
383 |
+
if(_from != _p) $.fbuilder.setBrowserHistory();
|
384 |
+
if(_pDom.find('.fields:visible').length == 0)
|
385 |
+
if(_inc == -1 && 0 < _p) _pDom.find('.pbPrevious').click();
|
386 |
+
else if(!_pDom.hasClass('pbEnd')) _pDom.find('.pbNext').click();
|
387 |
+
return false;
|
388 |
});
|
389 |
}
|
390 |
else
|
391 |
{
|
392 |
+
if( !opt.cached ) $(".pb"+page, fieldlist_tag).append(getCaptchaHTML()+getSubmitHTML());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
|
395 |
if( !opt.cached && opt.setCache)
|
446 |
try
|
447 |
{
|
448 |
$.widget.bridge('uitooltip', $.ui.tooltip);
|
449 |
+
$( "#fbuilder"+opt.identifier ).uitooltip({show: false,hide:false,tooltipClass:"uh-tooltip",position: { my: "left top", at: "left bottom+5", collision: "flipfit" },items: "[uh]",content: function (){return $(this).attr("uh");}, open: function( evt, ui ){ try{ if(window.matchMedia("screen and (max-width: 640px)").matches){
|
450 |
var duration = ('undefined' != typeof tooltip_duration && /^\d+$/.test(tooltip_duration)) ? tooltip_duration : 3000;
|
451 |
setTimeout( function(){$(ui.tooltip).hide('fade'); }, duration);
|
452 |
}}catch( err ){}} });
|
536 |
|
537 |
reloadItemsPublic();
|
538 |
}
|
539 |
+
$.fbuilder.cpcffLoadDefaults( opt );
|
540 |
}
|
541 |
}
|
542 |
};
|
546 |
return this;
|
547 |
}; // End fbuilder plugin
|
548 |
|
|
|
|
|
|
|
|
|
549 |
$.fbuilder.controls[ 'ffields' ] = function(){};
|
550 |
$.extend($.fbuilder.controls[ 'ffields' ].prototype,
|
551 |
{
|
615 |
}
|
616 |
});
|
617 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
// Read history
|
619 |
window.addEventListener('popstate', function(){
|
620 |
try
|
627 |
});
|
628 |
|
629 |
$(window).on('load', function(){
|
630 |
+
$.fbuilder.manageHistory(true);
|
631 |
});
|
js/fields-admin/01_fbuilder.ftext.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
readonly:false,
|
19 |
size:"medium",
|
20 |
minlength:"",
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
readonly:false,
|
20 |
size:"medium",
|
21 |
minlength:"",
|
js/fields-admin/02_fbuilder.fcurrency.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
readonly:false,
|
19 |
size:"small",
|
20 |
currencySymbol:"$",
|
@@ -25,6 +26,7 @@
|
|
25 |
min:"",
|
26 |
max:"",
|
27 |
formatDynamically:false,
|
|
|
28 |
getPredefinedValue:function()
|
29 |
{
|
30 |
var me = this,
|
@@ -36,13 +38,14 @@
|
|
36 |
if( /^\s*$/.test( me.centSeparator ) ) me.centSeparator = '.';
|
37 |
|
38 |
|
39 |
-
v = v.replace( new RegExp( $.fbuilder[ '
|
40 |
-
.replace( new RegExp( $.fbuilder[ '
|
41 |
|
42 |
v = $.fbuilder.parseVal( v, me.thousandSeparator, me.centSeparator );
|
43 |
|
44 |
if( !isNaN( v ) )
|
45 |
{
|
|
|
46 |
v = v.toString();
|
47 |
var parts = v.toString().split("."),
|
48 |
counter = 0,
|
@@ -80,6 +83,7 @@
|
|
80 |
{s:"#sThousandSeparator",e:"change keyup", l:"thousandSeparator"},
|
81 |
{s:"#sCentSeparator",e:"change keyup", l:"centSeparator"},
|
82 |
{s:"#sFormatDynamically",e:"click", l:"formatDynamically",f:f},
|
|
|
83 |
{s:"#sNoCents",e:"click", l:"noCents",f:f},
|
84 |
{s:"#sMin",e:"change keyup", l:"min"},
|
85 |
{s:"#sMax",e:"change keyup", l:"max"}
|
@@ -97,7 +101,7 @@
|
|
97 |
str += '<div><label>Thousands Separator</label><br /><input type="text" name="sThousandSeparator" id="sThousandSeparator" value="'+$.fbuilder.htmlEncode(this.thousandSeparator)+'" class="large"></div>';
|
98 |
str += '<div><label>Cents Separator</label><br /><input type="text" name="sCentSeparator" id="sCentSeparator" value="'+$.fbuilder.htmlEncode(this.centSeparator)+'" class="large"></div>';
|
99 |
str += '<div><label><input type="checkbox" name="sNoCents" id="sNoCents" '+( (this.noCents) ? 'CHECKED' : '')+'> Do Not Allow Cents</label><br /></div>';
|
100 |
-
str += '<div><label><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+( (this.formatDynamically) ? 'CHECKED' : '')+'> Format Dynamically</label><br /></div>';
|
101 |
return str;
|
102 |
},
|
103 |
showRangeIntance: function()
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
readonly:false,
|
20 |
size:"small",
|
21 |
currencySymbol:"$",
|
26 |
min:"",
|
27 |
max:"",
|
28 |
formatDynamically:false,
|
29 |
+
twoDecimals:false,
|
30 |
getPredefinedValue:function()
|
31 |
{
|
32 |
var me = this,
|
38 |
if( /^\s*$/.test( me.centSeparator ) ) me.centSeparator = '.';
|
39 |
|
40 |
|
41 |
+
v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](me.currencySymbol), 'g' ), '' )
|
42 |
+
.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](me.currencyText), 'g' ), '' );
|
43 |
|
44 |
v = $.fbuilder.parseVal( v, me.thousandSeparator, me.centSeparator );
|
45 |
|
46 |
if( !isNaN( v ) )
|
47 |
{
|
48 |
+
if(this.twoDecimals) v = v.toFixed(2);
|
49 |
v = v.toString();
|
50 |
var parts = v.toString().split("."),
|
51 |
counter = 0,
|
83 |
{s:"#sThousandSeparator",e:"change keyup", l:"thousandSeparator"},
|
84 |
{s:"#sCentSeparator",e:"change keyup", l:"centSeparator"},
|
85 |
{s:"#sFormatDynamically",e:"click", l:"formatDynamically",f:f},
|
86 |
+
{s:"#sTwoDecimals",e:"click", l:"twoDecimals",f:f},
|
87 |
{s:"#sNoCents",e:"click", l:"noCents",f:f},
|
88 |
{s:"#sMin",e:"change keyup", l:"min"},
|
89 |
{s:"#sMax",e:"change keyup", l:"max"}
|
101 |
str += '<div><label>Thousands Separator</label><br /><input type="text" name="sThousandSeparator" id="sThousandSeparator" value="'+$.fbuilder.htmlEncode(this.thousandSeparator)+'" class="large"></div>';
|
102 |
str += '<div><label>Cents Separator</label><br /><input type="text" name="sCentSeparator" id="sCentSeparator" value="'+$.fbuilder.htmlEncode(this.centSeparator)+'" class="large"></div>';
|
103 |
str += '<div><label><input type="checkbox" name="sNoCents" id="sNoCents" '+( (this.noCents) ? 'CHECKED' : '')+'> Do Not Allow Cents</label><br /></div>';
|
104 |
+
str += '<div><label><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+( (this.formatDynamically) ? 'CHECKED' : '')+'> Format Dynamically to </label> <label><input type="checkbox" name="sTwoDecimals" id="sTwoDecimals" '+( (this.twoDecimals) ? 'CHECKED' : '')+'> two decimal places</label><br /></div>';
|
105 |
return str;
|
106 |
},
|
107 |
showRangeIntance: function()
|
js/fields-admin/02_fbuilder.fnumber.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
readonly:false,
|
19 |
size:"small",
|
20 |
thousandSeparator:"",
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
readonly:false,
|
20 |
size:"small",
|
21 |
thousandSeparator:"",
|
js/fields-admin/02_fbuilder.fslider.js
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
{
|
13 |
title:"Slider",
|
14 |
ftype:"fslider",
|
|
|
15 |
predefined:"",
|
16 |
predefinedMin:"",
|
17 |
predefinedMax:"",
|
12 |
{
|
13 |
title:"Slider",
|
14 |
ftype:"fslider",
|
15 |
+
exclude:false,
|
16 |
predefined:"",
|
17 |
predefinedMin:"",
|
18 |
predefinedMax:"",
|
js/fields-admin/03_fbuilder.femail.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
readonly:false,
|
19 |
size:"medium",
|
20 |
equalTo:"",
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
readonly:false,
|
20 |
size:"medium",
|
21 |
equalTo:"",
|
js/fields-admin/04_fbuilder.fdate.js
CHANGED
@@ -16,6 +16,7 @@
|
|
16 |
predefinedClick:false,
|
17 |
size:"medium",
|
18 |
required:false,
|
|
|
19 |
dformat:"mm/dd/yyyy",
|
20 |
dseparator:"/",
|
21 |
tformat:"24",
|
16 |
predefinedClick:false,
|
17 |
size:"medium",
|
18 |
required:false,
|
19 |
+
exclude:false,
|
20 |
dformat:"mm/dd/yyyy",
|
21 |
dseparator:"/",
|
22 |
tformat:"24",
|
js/fields-admin/05_fbuilder.ftextarea.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
readonly:false,
|
19 |
size:"medium",
|
20 |
minlength:"",
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
readonly:false,
|
20 |
size:"medium",
|
21 |
minlength:"",
|
js/fields-admin/06_fbuilder.fcheck.js
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
ftype:"fcheck",
|
15 |
layout:"one_column",
|
16 |
required:false,
|
|
|
17 |
toSubmit:'text',
|
18 |
merge:1,
|
19 |
max:-1,
|
14 |
ftype:"fcheck",
|
15 |
layout:"one_column",
|
16 |
required:false,
|
17 |
+
exclude:false,
|
18 |
toSubmit:'text',
|
19 |
merge:1,
|
20 |
max:-1,
|
js/fields-admin/07_fbuilder.fradio.js
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
ftype:"fradio",
|
15 |
layout:"one_column",
|
16 |
required:false,
|
|
|
17 |
toSubmit:'text',
|
18 |
choiceSelected:"",
|
19 |
showDep:false,
|
14 |
ftype:"fradio",
|
15 |
layout:"one_column",
|
16 |
required:false,
|
17 |
+
exclude:false,
|
18 |
toSubmit:'text',
|
19 |
choiceSelected:"",
|
20 |
showDep:false,
|
js/fields-admin/08_fbuilder.fdropdown.js
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
ftype:"fdropdown",
|
15 |
size:"medium",
|
16 |
required:false,
|
|
|
17 |
toSubmit:'text',
|
18 |
merge:0,
|
19 |
choiceSelected:"",
|
14 |
ftype:"fdropdown",
|
15 |
size:"medium",
|
16 |
required:false,
|
17 |
+
exclude:false,
|
18 |
toSubmit:'text',
|
19 |
merge:0,
|
20 |
choiceSelected:"",
|
js/fields-admin/09_fbuilder.ffile.js
CHANGED
@@ -13,6 +13,7 @@
|
|
13 |
title:"Untitled",
|
14 |
ftype:"ffile",
|
15 |
required:false,
|
|
|
16 |
size:"medium",
|
17 |
accept:"",
|
18 |
upload_size:"",
|
13 |
title:"Untitled",
|
14 |
ftype:"ffile",
|
15 |
required:false,
|
16 |
+
exclude:false,
|
17 |
size:"medium",
|
18 |
accept:"",
|
19 |
upload_size:"",
|
js/fields-admin/10_fbuilder.fpassword.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
|
|
18 |
size:"medium",
|
19 |
minlength:"",
|
20 |
maxlength:"",
|
15 |
predefined:"",
|
16 |
predefinedClick:false,
|
17 |
required:false,
|
18 |
+
exclude:false,
|
19 |
size:"medium",
|
20 |
minlength:"",
|
21 |
maxlength:"",
|
js/fields-admin/11_fbuilder.fphone.js
CHANGED
@@ -13,6 +13,7 @@
|
|
13 |
title:"Phone",
|
14 |
ftype:"fPhone",
|
15 |
required:false,
|
|
|
16 |
readonly:false,
|
17 |
dformat:"### ### ####",
|
18 |
predefined:"888 888 8888",
|
13 |
title:"Phone",
|
14 |
ftype:"fPhone",
|
15 |
required:false,
|
16 |
+
exclude:false,
|
17 |
readonly:false,
|
18 |
dformat:"### ### ####",
|
19 |
predefined:"888 888 8888",
|
js/fields-admin/13_fbuilder.fhidden.js
CHANGED
@@ -12,21 +12,22 @@
|
|
12 |
{
|
13 |
title:"Hidden",
|
14 |
ftype:"fhidden",
|
|
|
15 |
predefined:"",
|
16 |
display:function()
|
17 |
{
|
18 |
return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this.title+'</label><span class="uh">'+this.predefined+'</span><div class="clearer"></div></div>';
|
19 |
},
|
20 |
editItemEvents:function()
|
21 |
-
{
|
22 |
$.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
|
23 |
},
|
24 |
-
showTitle: function(f)
|
25 |
{
|
26 |
return '<div><label>Field Label</label><textarea class="large" name="sTitle" id="sTitle">'+this.title+'</textarea><span class="uh">The field label is only for the admin section, never for the public page</span></div>';
|
27 |
-
},
|
28 |
showUserhelp:function(){ return ''; },
|
29 |
-
showPredefined: function()
|
30 |
{
|
31 |
return '<div><label>Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+this.predefined+'</textarea></div>';
|
32 |
}
|
12 |
{
|
13 |
title:"Hidden",
|
14 |
ftype:"fhidden",
|
15 |
+
exclude:false,
|
16 |
predefined:"",
|
17 |
display:function()
|
18 |
{
|
19 |
return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this.title+'</label><span class="uh">'+this.predefined+'</span><div class="clearer"></div></div>';
|
20 |
},
|
21 |
editItemEvents:function()
|
22 |
+
{
|
23 |
$.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
|
24 |
},
|
25 |
+
showTitle: function(f)
|
26 |
{
|
27 |
return '<div><label>Field Label</label><textarea class="large" name="sTitle" id="sTitle">'+this.title+'</textarea><span class="uh">The field label is only for the admin section, never for the public page</span></div>';
|
28 |
+
},
|
29 |
showUserhelp:function(){ return ''; },
|
30 |
+
showPredefined: function()
|
31 |
{
|
32 |
return '<div><label>Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+this.predefined+'</textarea></div>';
|
33 |
}
|
js/fields-admin/36_fbuilder.acceptance.js
CHANGED
@@ -16,6 +16,7 @@
|
|
16 |
url:"",
|
17 |
message:"",
|
18 |
required:true,
|
|
|
19 |
display:function()
|
20 |
{
|
21 |
var str = '<div class="one_column"><input class="field" disabled="true" type="checkbox"/> '+this.title+((this.required)?"*":"")+'</div>';
|
16 |
url:"",
|
17 |
message:"",
|
18 |
required:true,
|
19 |
+
exclude:false,
|
20 |
display:function()
|
21 |
{
|
22 |
var str = '<div class="one_column"><input class="field" disabled="true" type="checkbox"/> '+this.title+((this.required)?"*":"")+'</div>';
|
js/fields-admin/fbuilder.fcalculated.js
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
ftype:"fCalculated",
|
15 |
predefined:"",
|
16 |
required:false,
|
|
|
17 |
size:"medium",
|
18 |
eq:"",
|
19 |
suffix:"",
|
@@ -21,6 +22,7 @@
|
|
21 |
decimalsymbol:".",
|
22 |
groupingsymbol:"",
|
23 |
readonly:true,
|
|
|
24 |
hidefield:false,
|
25 |
init:function()
|
26 |
{
|
@@ -41,6 +43,7 @@
|
|
41 |
{s:"#sDecimalSymbol",e:"change keyup", l:"decimalsymbol"},
|
42 |
{s:"#sGroupingSymbol",e:"change keyup", l:"groupingsymbol"},
|
43 |
{s:"#sHideField",e:"click", l:"hidefield", f:function(el){return el.is(':checked');}},
|
|
|
44 |
{s:"#sSize",e:"change", l:"size"}
|
45 |
];
|
46 |
$("#sEq").bind("change keyup", {obj: this}, function(e)
|
@@ -185,7 +188,7 @@
|
|
185 |
},
|
186 |
showSpecialDataInstance: function()
|
187 |
{
|
188 |
-
return this.showHideField()+this.showEqEditor()+this.showDependencies();
|
189 |
},
|
190 |
showDependencies : function()
|
191 |
{
|
@@ -257,6 +260,10 @@
|
|
257 |
|
258 |
return '<label>Define dependencies</label><div class="dependenciesBox">'+r+'</div>';
|
259 |
},
|
|
|
|
|
|
|
|
|
260 |
showHideField:function()
|
261 |
{
|
262 |
return '<div><input type="checkbox" name="sHideField" id="sHideField" '+((this.hidefield)?"checked":"")+'><label>Hide Field From Public Page</label></div>';
|
14 |
ftype:"fCalculated",
|
15 |
predefined:"",
|
16 |
required:false,
|
17 |
+
exclude:false,
|
18 |
size:"medium",
|
19 |
eq:"",
|
20 |
suffix:"",
|
22 |
decimalsymbol:".",
|
23 |
groupingsymbol:"",
|
24 |
readonly:true,
|
25 |
+
formatDynamically:false,
|
26 |
hidefield:false,
|
27 |
init:function()
|
28 |
{
|
43 |
{s:"#sDecimalSymbol",e:"change keyup", l:"decimalsymbol"},
|
44 |
{s:"#sGroupingSymbol",e:"change keyup", l:"groupingsymbol"},
|
45 |
{s:"#sHideField",e:"click", l:"hidefield", f:function(el){return el.is(':checked');}},
|
46 |
+
{s:"#sFormatDynamically",e:"click", l:"formatDynamically", f:function(el){return el.is(':checked');}},
|
47 |
{s:"#sSize",e:"change", l:"size"}
|
48 |
];
|
49 |
$("#sEq").bind("change keyup", {obj: this}, function(e)
|
188 |
},
|
189 |
showSpecialDataInstance: function()
|
190 |
{
|
191 |
+
return this.showFormatDynamically()+this.showHideField()+this.showEqEditor()+this.showDependencies();
|
192 |
},
|
193 |
showDependencies : function()
|
194 |
{
|
260 |
|
261 |
return '<label>Define dependencies</label><div class="dependenciesBox">'+r+'</div>';
|
262 |
},
|
263 |
+
showFormatDynamically:function()
|
264 |
+
{
|
265 |
+
return '<div><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+((this.hidefield)?"checked":"")+'><label>If editable, format dynamically</label></div>';
|
266 |
+
},
|
267 |
showHideField:function()
|
268 |
{
|
269 |
return '<div><input type="checkbox" name="sHideField" id="sHideField" '+((this.hidefield)?"checked":"")+'><label>Hide Field From Public Page</label></div>';
|
js/fields-public/01_fbuilder.ftext.js
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
21 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
22 |
this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
|
23 |
-
|
24 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-text-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+(this.minlength)+'"' : '')+((this.maxlength.length) ? ' maxlength="'+(this.maxlength)+'"' : '')+((this.equalTo.length) ? ' equalTo="#'+this.equalTo+this.form_identifier+'"':'' )+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+' type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'" /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
25 |
},
|
26 |
after_show:function()
|
20 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
21 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
22 |
this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
|
23 |
+
this.predefined = this._getAttr('predefined');
|
24 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-text-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+(this.minlength)+'"' : '')+((this.maxlength.length) ? ' maxlength="'+(this.maxlength)+'"' : '')+((this.equalTo.length) ? ' equalTo="#'+this.equalTo+this.form_identifier+'"':'' )+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+' type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'" /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
25 |
},
|
26 |
after_show:function()
|
js/fields-public/02_fbuilder.fcurrency.js
CHANGED
@@ -18,6 +18,7 @@
|
|
18 |
min:"",
|
19 |
max:"",
|
20 |
formatDynamically:false,
|
|
|
21 |
set_min:function(v, rmv)
|
22 |
{
|
23 |
var e = $('[id="'+this.name+'"]');
|
@@ -48,6 +49,7 @@
|
|
48 |
{
|
49 |
if(v < 0) sign = '-';
|
50 |
v = ABS(v);
|
|
|
51 |
parts = v.toString().split(".");
|
52 |
|
53 |
for( var i = parts[0].length-1; i >= 0; i--)
|
@@ -78,6 +80,7 @@
|
|
78 |
},
|
79 |
show:function()
|
80 |
{
|
|
|
81 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-currency-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input '+(( this.readonly )? 'readonly' : '' )+' id="'+this.name+'" name="'+this.name+'" class="field cffcurrency '+this.size+((this.required)?" required":"")+'" type="text" value="'+$.fbuilder.htmlEncode( (this.formatDynamically) ? this.getFormattedValue( this.predefined ) : this.predefined )+'" '+( ( !/^\s*$/.test( this.min) ) ? 'min="'+$.fbuilder.parseVal( this._getAttr('min'), this.thousandSeparator, this.centSeparator )+'" ' : '' )+( ( !/^\s*$/.test( this.max) ) ? ' max="'+$.fbuilder.parseVal( this._getAttr('max'), this.thousandSeparator, this.centSeparator )+'" ' : '' )+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
82 |
},
|
83 |
after_show:function()
|
@@ -99,7 +102,7 @@
|
|
99 |
function(v, el)
|
100 |
{
|
101 |
var f = el.id.match( /_\d+$/),
|
102 |
-
esc = $.fbuilder.
|
103 |
r;
|
104 |
|
105 |
e = $.fbuilder['forms'][f[0]].getItem( el.name );
|
@@ -142,8 +145,8 @@
|
|
142 |
if(raw) return ($.isNumeric(v)) ? v : $.fbuilder.parseValStr(v, raw);
|
143 |
v = $.trim(v);
|
144 |
|
145 |
-
v = v.replace( new RegExp( $.fbuilder[ '
|
146 |
-
.replace( new RegExp( $.fbuilder[ '
|
147 |
|
148 |
return $.fbuilder.parseVal( v, this.thousandSeparator, this.centSeparator );
|
149 |
}
|
18 |
min:"",
|
19 |
max:"",
|
20 |
formatDynamically:false,
|
21 |
+
twoDecimals:false,
|
22 |
set_min:function(v, rmv)
|
23 |
{
|
24 |
var e = $('[id="'+this.name+'"]');
|
49 |
{
|
50 |
if(v < 0) sign = '-';
|
51 |
v = ABS(v);
|
52 |
+
if(this.twoDecimals) v = v.toFixed(2);
|
53 |
parts = v.toString().split(".");
|
54 |
|
55 |
for( var i = parts[0].length-1; i >= 0; i--)
|
80 |
},
|
81 |
show:function()
|
82 |
{
|
83 |
+
this.predefined = this._getAttr('predefined');
|
84 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-currency-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input '+(( this.readonly )? 'readonly' : '' )+' id="'+this.name+'" name="'+this.name+'" class="field cffcurrency '+this.size+((this.required)?" required":"")+'" type="text" value="'+$.fbuilder.htmlEncode( (this.formatDynamically) ? this.getFormattedValue( this.predefined ) : this.predefined )+'" '+( ( !/^\s*$/.test( this.min) ) ? 'min="'+$.fbuilder.parseVal( this._getAttr('min'), this.thousandSeparator, this.centSeparator )+'" ' : '' )+( ( !/^\s*$/.test( this.max) ) ? ' max="'+$.fbuilder.parseVal( this._getAttr('max'), this.thousandSeparator, this.centSeparator )+'" ' : '' )+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
85 |
},
|
86 |
after_show:function()
|
102 |
function(v, el)
|
103 |
{
|
104 |
var f = el.id.match( /_\d+$/),
|
105 |
+
esc = $.fbuilder.escapeSymbol,
|
106 |
r;
|
107 |
|
108 |
e = $.fbuilder['forms'][f[0]].getItem( el.name );
|
145 |
if(raw) return ($.isNumeric(v)) ? v : $.fbuilder.parseValStr(v, raw);
|
146 |
v = $.trim(v);
|
147 |
|
148 |
+
v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencySymbol), 'g' ), '' )
|
149 |
+
.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.currencyText), 'g' ), '' );
|
150 |
|
151 |
return $.fbuilder.parseVal( v, this.thousandSeparator, this.centSeparator );
|
152 |
}
|
js/fields-public/02_fbuilder.fnumber.js
CHANGED
@@ -69,7 +69,7 @@
|
|
69 |
show:function()
|
70 |
{
|
71 |
var _type = ( this.dformat == 'digits' || ( this.dformat != 'percent' && /^$/.test( this.thousandSeparator ) && /^\s*(\.\s*)?$/.test( this.decimalSymbol ) ) ) ? 'number' : 'text';
|
72 |
-
|
73 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-number-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+( ( !/^\s*$/.test( this.min) ) ? 'min="'+$.fbuilder.parseVal( this._getAttr('min'), this.thousandSeparator, this.decimalSymbol )+'" ' : '' )+( ( !/^\s*$/.test(this.max) ) ? ' max="'+$.fbuilder.parseVal( this._getAttr('max'), this.thousandSeparator, this.decimalSymbol )+'" ' : '' )+' class="field '+this.dformat+((this.dformat == 'percent') ? ' number' : '')+' '+this.size+((this.required)?" required":"")+'" type="'+_type+'" value="'+$.fbuilder.htmlEncode((this.formatDynamically) ? this.getFormattedValue(this.predefined) : this.predefined)+'" '+((this.readonly)?'readonly':'')+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
74 |
},
|
75 |
after_show:function()
|
@@ -88,7 +88,7 @@
|
|
88 |
$.validator.methods.number = function(v, el)
|
89 |
{
|
90 |
var f = el.id.match(/_\d+$/),
|
91 |
-
esc = $.fbuilder.
|
92 |
e, r;
|
93 |
|
94 |
if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
|
69 |
show:function()
|
70 |
{
|
71 |
var _type = ( this.dformat == 'digits' || ( this.dformat != 'percent' && /^$/.test( this.thousandSeparator ) && /^\s*(\.\s*)?$/.test( this.decimalSymbol ) ) ) ? 'number' : 'text';
|
72 |
+
this.predefined = this._getAttr('predefined');
|
73 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-number-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+( ( !/^\s*$/.test( this.min) ) ? 'min="'+$.fbuilder.parseVal( this._getAttr('min'), this.thousandSeparator, this.decimalSymbol )+'" ' : '' )+( ( !/^\s*$/.test(this.max) ) ? ' max="'+$.fbuilder.parseVal( this._getAttr('max'), this.thousandSeparator, this.decimalSymbol )+'" ' : '' )+' class="field '+this.dformat+((this.dformat == 'percent') ? ' number' : '')+' '+this.size+((this.required)?" required":"")+'" type="'+_type+'" value="'+$.fbuilder.htmlEncode((this.formatDynamically) ? this.getFormattedValue(this.predefined) : this.predefined)+'" '+((this.readonly)?'readonly':'')+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
74 |
},
|
75 |
after_show:function()
|
88 |
$.validator.methods.number = function(v, el)
|
89 |
{
|
90 |
var f = el.id.match(/_\d+$/),
|
91 |
+
esc = $.fbuilder.escapeSymbol,
|
92 |
e, r;
|
93 |
|
94 |
if(f) e = $.fbuilder['forms'][f[0]].getItem(el.name);
|
js/fields-public/02_fbuilder.fslider.js
CHANGED
@@ -74,26 +74,23 @@
|
|
74 |
}
|
75 |
$( '#'+me.name ).change();
|
76 |
},
|
|
|
77 |
init:function()
|
78 |
{
|
79 |
-
function _toNumber(n){return (new String(n)).replace(/[^\d\.]/g,'')*1;};
|
80 |
-
|
81 |
this.min = (/^\s*$/.test(this.min)) ? 0 : $.trim(this.min);
|
82 |
this.max = (/^\s*$/.test(this.max)) ? 100 : $.trim(this.max);
|
83 |
this.step = (/^\s*$/.test(this.step)) ? 1 : $.trim(this.step);
|
84 |
-
this.
|
85 |
-
this.
|
86 |
-
this.predefinedMax = (/^\s*$/.test(this.predefinedMax))? this.max : _toNumber(this.predefinedMax);
|
87 |
-
|
88 |
this._setHndl('min');
|
89 |
this._setHndl('max');
|
90 |
this._setHndl('step');
|
91 |
-
|
92 |
this.centSeparator = ( /^\s*$/.test( this.centSeparator )) ? '.' : $.trim( this.centSeparator );
|
93 |
},
|
94 |
show:function()
|
95 |
{
|
96 |
-
|
|
|
97 |
},
|
98 |
set_min:function(v, ignore)
|
99 |
{
|
74 |
}
|
75 |
$( '#'+me.name ).change();
|
76 |
},
|
77 |
+
_toNumber:function(n){return (new String(n)).replace(/[^\d\.]/g,'')*1;},
|
78 |
init:function()
|
79 |
{
|
|
|
|
|
80 |
this.min = (/^\s*$/.test(this.min)) ? 0 : $.trim(this.min);
|
81 |
this.max = (/^\s*$/.test(this.max)) ? 100 : $.trim(this.max);
|
82 |
this.step = (/^\s*$/.test(this.step)) ? 1 : $.trim(this.step);
|
83 |
+
this.predefinedMin = (/^\s*$/.test(this.predefinedMin))? this.min : this._toNumber(this.predefinedMin);
|
84 |
+
this.predefinedMax = (/^\s*$/.test(this.predefinedMax))? this.max : this._toNumber(this.predefinedMax);
|
|
|
|
|
85 |
this._setHndl('min');
|
86 |
this._setHndl('max');
|
87 |
this._setHndl('step');
|
|
|
88 |
this.centSeparator = ( /^\s*$/.test( this.centSeparator )) ? '.' : $.trim( this.centSeparator );
|
89 |
},
|
90 |
show:function()
|
91 |
{
|
92 |
+
this.predefined = (/^\s*$/.test(this.predefined)) ? this.min : this._toNumber(this._getAttr('predefined'));
|
93 |
+
return '<div class="fields '+this.csslayout+' '+this.name+' cff-slider-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+'</label><div class="dfield slider-container"><input id="'+this.name+'" name="'+this.name+'" class="field" type="hidden" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><div id="'+this.name+'_slider" class="slider '+this.size+'"></div><div class="corner-captions '+this.size+'"><span class="left-corner">'+this.minCaption+'</span><span class="right-corner" style="float:right;">'+this.maxCaption+'</span></div><div id="'+this.name+'_caption" class="slider-caption"></div><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
94 |
},
|
95 |
set_min:function(v, ignore)
|
96 |
{
|
js/fields-public/03_fbuilder.femail.js
CHANGED
@@ -13,6 +13,7 @@
|
|
13 |
equalTo:"",
|
14 |
show:function()
|
15 |
{
|
|
|
16 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-email-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+((this.equalTo!="")?"equalTo=\"#"+$.fbuilder.htmlEncode(this.equalTo+this.form_identifier)+"\"":"" )+' class="field email '+this.size+((this.required)?" required":"")+'" type="email" value="'+$.fbuilder.htmlEncode(this.predefined)+'" '+((this.readonly)?'readonly':'')+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
17 |
},
|
18 |
val:function(raw)
|
13 |
equalTo:"",
|
14 |
show:function()
|
15 |
{
|
16 |
+
this.predefined = this._getAttr('predefined');
|
17 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-email-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+((this.equalTo!="")?"equalTo=\"#"+$.fbuilder.htmlEncode(this.equalTo+this.form_identifier)+"\"":"" )+' class="field email '+this.size+((this.required)?" required":"")+'" type="email" value="'+$.fbuilder.htmlEncode(this.predefined)+'" '+((this.readonly)?'readonly':'')+' /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
18 |
},
|
19 |
val:function(raw)
|
js/fields-public/04_fbuilder.fdate.js
CHANGED
@@ -296,7 +296,7 @@
|
|
296 |
if( me.showDatepicker ) format_label.push(me.dformat);
|
297 |
else{ date_tag_type = 'hidden'; disabled='disabled';}
|
298 |
if( me.showTimepicker ) format_label.push('HH:mm');
|
299 |
-
|
300 |
return '<div class="fields '+me.csslayout+' '+n+' cff-date-field" id="field'+me.form_identifier+'-'+me.index+'"><label for="'+n+'_date">'+me.title+''+((me.required)?"<span class='r'>*</span>":"")+( (format_label.length) ? ' <span class="dformat">('+format_label.join(' ')+')</span>' : '' )+'</label><div class="dfield"><input id="'+n+'" name="'+n+'" type="hidden" value="'+$.fbuilder.htmlEncode(me.predefined)+'"/><input id="'+n+'_date" name="'+n+'_date" class="'+date_tag_class+' date-component" type="'+date_tag_type+'" '+attr+'="'+$.fbuilder.htmlEncode(me.predefined)+'" '+disabled+' />'+( ( me.showTimepicker ) ? ' '+me.get_hours()+me.get_minutes()+' '+me.get_ampm() : '' )+'<span class="uh">'+me.userhelp+'</span></div><div class="clearer"></div></div>';
|
301 |
},
|
302 |
after_show:function()
|
296 |
if( me.showDatepicker ) format_label.push(me.dformat);
|
297 |
else{ date_tag_type = 'hidden'; disabled='disabled';}
|
298 |
if( me.showTimepicker ) format_label.push('HH:mm');
|
299 |
+
this.predefined = this._getAttr('predefined');
|
300 |
return '<div class="fields '+me.csslayout+' '+n+' cff-date-field" id="field'+me.form_identifier+'-'+me.index+'"><label for="'+n+'_date">'+me.title+''+((me.required)?"<span class='r'>*</span>":"")+( (format_label.length) ? ' <span class="dformat">('+format_label.join(' ')+')</span>' : '' )+'</label><div class="dfield"><input id="'+n+'" name="'+n+'" type="hidden" value="'+$.fbuilder.htmlEncode(me.predefined)+'"/><input id="'+n+'_date" name="'+n+'_date" class="'+date_tag_class+' date-component" type="'+date_tag_type+'" '+attr+'="'+$.fbuilder.htmlEncode(me.predefined)+'" '+disabled+' />'+( ( me.showTimepicker ) ? ' '+me.get_hours()+me.get_minutes()+' '+me.get_ampm() : '' )+'<span class="uh">'+me.userhelp+'</span></div><div class="clearer"></div></div>';
|
301 |
},
|
302 |
after_show:function()
|
js/fields-public/05_fbuilder.ftextarea.js
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
{
|
18 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
19 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
20 |
-
|
21 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+'>'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
22 |
},
|
23 |
val:function(raw)
|
17 |
{
|
18 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
19 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
20 |
+
this.predefined = this._getAttr('predefined');
|
21 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-textarea-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+'>'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
22 |
},
|
23 |
val:function(raw)
|
js/fields-public/06_fbuilder.fcheck.js
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
|
33 |
str += '<div class="'+this.layout+'"><label for="'+this.name+'_cb'+i+'"><input name="'+this.name+'[]" id="'+this.name+'_cb'+i+'" class="field '+classDep+' group '+((this.required)?" required":"")+'" value="'+$.fbuilder.htmlEncode(this.choicesVal[i])+'" vt="'+$.fbuilder.htmlEncode((this.toSubmit == 'text') ? this.choices[i] : this.choicesVal[i])+'" type="checkbox" '+((this.choiceSelected[i])?"checked":"")+'/> <span>'+$.fbuilder.htmlDecode( this.choices[i] )+'</span></label></div>';
|
34 |
}
|
35 |
-
return '<div class="fields '+this.csslayout+' '+this.name+' cff-checkbox-field" id="field'+this.form_identifier+'-'+this.index+'"><label>'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
36 |
},
|
37 |
after_show:function()
|
38 |
{
|
32 |
|
33 |
str += '<div class="'+this.layout+'"><label for="'+this.name+'_cb'+i+'"><input name="'+this.name+'[]" id="'+this.name+'_cb'+i+'" class="field '+classDep+' group '+((this.required)?" required":"")+'" value="'+$.fbuilder.htmlEncode(this.choicesVal[i])+'" vt="'+$.fbuilder.htmlEncode((this.toSubmit == 'text') ? this.choices[i] : this.choicesVal[i])+'" type="checkbox" '+((this.choiceSelected[i])?"checked":"")+'/> <span>'+$.fbuilder.htmlDecode( this.choices[i] )+'</span></label></div>';
|
34 |
}
|
35 |
+
return '<div class="fields '+this.csslayout+' '+this.name+' cff-checkbox-field" id="field'+this.form_identifier+'-'+this.index+'"><label>'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield">'+str+'<div class="clearer"></div><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
36 |
},
|
37 |
after_show:function()
|
38 |
{
|
js/fields-public/07_fbuilder.fradio.js
CHANGED
@@ -38,7 +38,7 @@
|
|
38 |
str += '<div class="'+this.layout+'"><label for="'+this.name+'_rb'+i+'"><input name="'+this.name+'" id="'+this.name+'_rb'+i+'" class="field '+classDep+' group '+((this.required)?" required":"")+'" value="'+$.fbuilder.htmlEncode(this.choicesVal[i])+'" vt="'+$.fbuilder.htmlEncode((this.toSubmit=='text') ? this.choices[i] : this.choicesVal[i])+'" type="radio" '+((this.choices[i]+' - '+this.choicesVal[i]==this.choiceSelected)?"checked":"")+'/> <span>'+$.fbuilder.htmlDecode( this.choices[i] )+'</span></label></div>';
|
39 |
}
|
40 |
|
41 |
-
return '<div class="fields '+this.csslayout+' '+this.name+' cff-radiobutton-field" id="field'+this.form_identifier+'-'+this.index+'"><label>'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
42 |
},
|
43 |
after_show: function()
|
44 |
{
|
38 |
str += '<div class="'+this.layout+'"><label for="'+this.name+'_rb'+i+'"><input name="'+this.name+'" id="'+this.name+'_rb'+i+'" class="field '+classDep+' group '+((this.required)?" required":"")+'" value="'+$.fbuilder.htmlEncode(this.choicesVal[i])+'" vt="'+$.fbuilder.htmlEncode((this.toSubmit=='text') ? this.choices[i] : this.choicesVal[i])+'" type="radio" '+((this.choices[i]+' - '+this.choicesVal[i]==this.choiceSelected)?"checked":"")+'/> <span>'+$.fbuilder.htmlDecode( this.choices[i] )+'</span></label></div>';
|
39 |
}
|
40 |
|
41 |
+
return '<div class="fields '+this.csslayout+' '+this.name+' cff-radiobutton-field" id="field'+this.form_identifier+'-'+this.index+'"><label>'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield">'+str+'<div class="clearer"></div><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
42 |
},
|
43 |
after_show: function()
|
44 |
{
|
js/fields-public/10_fbuilder.fpassword.js
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
18 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
19 |
this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
|
20 |
-
|
21 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-password-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+((this.equalTo.length) ? ' equalTo="#'+this.equalTo+this.form_identifier+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
22 |
},
|
23 |
val:function(raw)
|
17 |
this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
|
18 |
this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
|
19 |
this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
|
20 |
+
this.predefined = this._getAttr('predefined');
|
21 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-password-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+((this.equalTo.length) ? ' equalTo="#'+this.equalTo+this.form_identifier+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
|
22 |
},
|
23 |
val:function(raw)
|
js/fields-public/11_fbuilder.fphone.js
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
predefined:"888 888 8888",
|
12 |
show:function()
|
13 |
{
|
|
|
14 |
var me = this,
|
15 |
str = "",
|
16 |
tmp = this.dformat.split(' '),
|
11 |
predefined:"888 888 8888",
|
12 |
show:function()
|
13 |
{
|
14 |
+
this.predefined = new String(this._getAttr('predefined'));
|
15 |
var me = this,
|
16 |
str = "",
|
17 |
tmp = this.dformat.split(' '),
|
js/fields-public/13_fbuilder.fhidden.js
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
predefined:"",
|
9 |
show:function()
|
10 |
{
|
|
|
11 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-hidden-field" id="field'+this.form_identifier+'-'+this.index+'" style="padding:0;margin:0;border:0;width:0;height:0;overflow:hidden;"><label for="'+this.name+'">'+this.title+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" type="hidden" value="'+$.fbuilder.htmlEncode(this.predefined)+'" class="field" /></div></div>';
|
12 |
}
|
13 |
}
|
8 |
predefined:"",
|
9 |
show:function()
|
10 |
{
|
11 |
+
this.predefined = this._getAttr('predefined');
|
12 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-hidden-field" id="field'+this.form_identifier+'-'+this.index+'" style="padding:0;margin:0;border:0;width:0;height:0;overflow:hidden;"><label for="'+this.name+'">'+this.title+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" type="hidden" value="'+$.fbuilder.htmlEncode(this.predefined)+'" class="field" /></div></div>';
|
13 |
}
|
14 |
}
|
js/fields-public/16_fbuilder.fsummary.js
CHANGED
@@ -96,8 +96,20 @@
|
|
96 |
}
|
97 |
else
|
98 |
{
|
99 |
-
var
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
}
|
103 |
}
|
96 |
}
|
97 |
else
|
98 |
{
|
99 |
+
var d = $( '[id="'+i+'_date"]' );
|
100 |
+
if(d.length)
|
101 |
+
{
|
102 |
+
if(d.is(':disabled'))
|
103 |
+
{
|
104 |
+
v.push(e.val().replace(d.val(),''));
|
105 |
+
}
|
106 |
+
else v.push(e.val());
|
107 |
+
}
|
108 |
+
else
|
109 |
+
{
|
110 |
+
var c = $( '[id="'+i+'_caption"]' );
|
111 |
+
v.push( ( c.length && !/^\s*$/.test( c.html() ) ) ? c.html() : e.val() );
|
112 |
+
}
|
113 |
}
|
114 |
}
|
115 |
}
|
js/fields-public/fbuilder.fcalculated.js
CHANGED
@@ -15,9 +15,11 @@
|
|
15 |
groupingsymbol:"",
|
16 |
dependencies:[ {'rule' : '', 'complex' : false, 'fields' : [ '' ] } ],
|
17 |
readonly:true,
|
|
|
18 |
hidefield:false,
|
19 |
show:function()
|
20 |
{
|
|
|
21 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-calculated-field" id="field'+this.form_identifier+'-'+this.index+'" style="'+((this.hidefield)? 'padding:0;margin:0;border:0;opacity:0;width:0;height:0;overflow:hidden;' : '' )+'"><label for="'+this.name+'">'+this.title+''+( ( this.required ) ? '<span class="r">*</span>' : '' )+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+((this.readonly) ? ' readonly ' : '')+' class="codepeoplecalculatedfield field '+this.size+((this.required)?" required":"")+'" type="'+( ( this.hidefield ) ? 'hidden' : 'text' )+'" value="'+this.predefined+'"/>'+( ( !this.hidefield ) ? '<span class="uh">'+this.userhelp+'</span>' : '' )+'</div><div class="clearer"></div></div>';
|
22 |
},
|
23 |
after_show:function()
|
@@ -71,7 +73,13 @@
|
|
71 |
);
|
72 |
}
|
73 |
}
|
74 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
},
|
76 |
showHideDep: function( toShow, toHide, hiddenByContainer )
|
77 |
{
|
@@ -156,8 +164,8 @@
|
|
156 |
if(raw) return $.fbuilder.parseValStr(v, raw);
|
157 |
v = $.trim( v );
|
158 |
|
159 |
-
v = v.replace( new RegExp( $.fbuilder[ '
|
160 |
-
.replace( new RegExp( $.fbuilder[ '
|
161 |
|
162 |
return $.fbuilder.parseVal( v, this.groupingsymbol, this.decimalsymbol );
|
163 |
}
|
@@ -233,24 +241,28 @@
|
|
233 |
_calculate = function( eq, suffix, __ME__ )
|
234 |
{
|
235 |
var _match,
|
236 |
-
field_regexp = new RegExp( '(fieldname\\d+'+suffix+')(_[cr]b\\d+)?(\\|
|
237 |
__ME__ = (__ME__) ? $.fbuilder['forms'][suffix].getItem( __ME__ ).val() : '';
|
238 |
|
239 |
window['getField'] = $.fbuilder['forms'][suffix].getItem;
|
240 |
-
|
241 |
$.fbuilder['currentFormId'] = $.fbuilder['forms'][suffix].formId;
|
242 |
-
|
243 |
eq = '(' + eq + ')';
|
244 |
-
|
245 |
while ( _match = field_regexp.exec( eq ) )
|
246 |
{
|
247 |
var field = $.fbuilder[ 'forms' ][ suffix ].getItem( _match[1] ),
|
248 |
v = '';
|
249 |
if( field )
|
250 |
{
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
eq = eq.replace( _match[0], v+''+_match[4] ); // Replace the variable name by value
|
256 |
}
|
@@ -518,7 +530,7 @@
|
|
518 |
unformat : function( field )
|
519 |
{
|
520 |
|
521 |
-
var
|
522 |
|
523 |
var eq = field[0].form.equations,
|
524 |
v = field.val();
|
@@ -531,24 +543,24 @@
|
|
531 |
|
532 |
if( c.prefix && !/^\s*$/.test( c.prefix ) )
|
533 |
{
|
534 |
-
v = v.replace( new RegExp( "^" +
|
535 |
}
|
536 |
|
537 |
if( c.suffix && !/^\s*$/.test( c.suffix ) )
|
538 |
{
|
539 |
-
v = v.replace( new RegExp(
|
540 |
}
|
541 |
|
542 |
if( !/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)/.test( v ) )
|
543 |
{
|
544 |
if( c.groupingsymbol && !/^\s*$/.test( c.groupingsymbol ) )
|
545 |
{
|
546 |
-
v = v.replace( new RegExp(
|
547 |
}
|
548 |
|
549 |
if( c.decimalsymbol && !/^\s*$/.test( c.decimalsymbol ) )
|
550 |
{
|
551 |
-
v = v.replace( new RegExp(
|
552 |
}
|
553 |
}
|
554 |
}
|
15 |
groupingsymbol:"",
|
16 |
dependencies:[ {'rule' : '', 'complex' : false, 'fields' : [ '' ] } ],
|
17 |
readonly:true,
|
18 |
+
formatDynamically:false,
|
19 |
hidefield:false,
|
20 |
show:function()
|
21 |
{
|
22 |
+
this.predefined = this._getAttr('predefined');
|
23 |
return '<div class="fields '+this.csslayout+' '+this.name+' cff-calculated-field" id="field'+this.form_identifier+'-'+this.index+'" style="'+((this.hidefield)? 'padding:0;margin:0;border:0;opacity:0;width:0;height:0;overflow:hidden;' : '' )+'"><label for="'+this.name+'">'+this.title+''+( ( this.required ) ? '<span class="r">*</span>' : '' )+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+((this.readonly) ? ' readonly ' : '')+' class="codepeoplecalculatedfield field '+this.size+((this.required)?" required":"")+'" type="'+( ( this.hidefield ) ? 'hidden' : 'text' )+'" value="'+this.predefined+'"/>'+( ( !this.hidefield ) ? '<span class="uh">'+this.userhelp+'</span>' : '' )+'</div><div class="clearer"></div></div>';
|
24 |
},
|
25 |
after_show:function()
|
73 |
);
|
74 |
}
|
75 |
}
|
76 |
+
).on('change', function(){
|
77 |
+
if(!me.readonly && me.formatDynamically)
|
78 |
+
{
|
79 |
+
var v = me.val();
|
80 |
+
this.value = $.fbuilder.calculator.format(v, configuration);
|
81 |
+
}
|
82 |
+
});
|
83 |
},
|
84 |
showHideDep: function( toShow, toHide, hiddenByContainer )
|
85 |
{
|
164 |
if(raw) return $.fbuilder.parseValStr(v, raw);
|
165 |
v = $.trim( v );
|
166 |
|
167 |
+
v = v.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.prefix), 'g' ), '' )
|
168 |
+
.replace( new RegExp( $.fbuilder[ 'escapeSymbol' ](this.suffix), 'g' ), '' );
|
169 |
|
170 |
return $.fbuilder.parseVal( v, this.groupingsymbol, this.decimalsymbol );
|
171 |
}
|
241 |
_calculate = function( eq, suffix, __ME__ )
|
242 |
{
|
243 |
var _match,
|
244 |
+
field_regexp = new RegExp( '(fieldname\\d+'+suffix+')(_[cr]b\\d+)?(\\|[rn])?([\\D\\b])','i'),
|
245 |
__ME__ = (__ME__) ? $.fbuilder['forms'][suffix].getItem( __ME__ ).val() : '';
|
246 |
|
247 |
window['getField'] = $.fbuilder['forms'][suffix].getItem;
|
|
|
248 |
$.fbuilder['currentFormId'] = $.fbuilder['forms'][suffix].formId;
|
|
|
249 |
eq = '(' + eq + ')';
|
|
|
250 |
while ( _match = field_regexp.exec( eq ) )
|
251 |
{
|
252 |
var field = $.fbuilder[ 'forms' ][ suffix ].getItem( _match[1] ),
|
253 |
v = '';
|
254 |
if( field )
|
255 |
{
|
256 |
+
if(_match[3] && _match[3] == '|n')
|
257 |
+
{
|
258 |
+
v = '"'+_match[1].match(/fieldname\d+/)[0]+'"';
|
259 |
+
}
|
260 |
+
else
|
261 |
+
{
|
262 |
+
v = field.val((_match[3] && _match[3] == '|r') ? true : false);
|
263 |
+
if( typeof v == 'object' && typeof window.JSON != 'undefined' ) v = JSON.stringify( v );
|
264 |
+
else if( $.isNumeric( v ) ) v = '('+v+')';
|
265 |
+
}
|
266 |
}
|
267 |
eq = eq.replace( _match[0], v+''+_match[4] ); // Replace the variable name by value
|
268 |
}
|
530 |
unformat : function( field )
|
531 |
{
|
532 |
|
533 |
+
var escapeSymbol = $.fbuilder.escapeSymbol;
|
534 |
|
535 |
var eq = field[0].form.equations,
|
536 |
v = field.val();
|
543 |
|
544 |
if( c.prefix && !/^\s*$/.test( c.prefix ) )
|
545 |
{
|
546 |
+
v = v.replace( new RegExp( "^" + escapeSymbol( c.prefix ) ), '' );
|
547 |
}
|
548 |
|
549 |
if( c.suffix && !/^\s*$/.test( c.suffix ) )
|
550 |
{
|
551 |
+
v = v.replace( new RegExp( escapeSymbol( c.suffix ) + "$" ), '' );
|
552 |
}
|
553 |
|
554 |
if( !/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)/.test( v ) )
|
555 |
{
|
556 |
if( c.groupingsymbol && !/^\s*$/.test( c.groupingsymbol ) )
|
557 |
{
|
558 |
+
v = v.replace( new RegExp( escapeSymbol( c.groupingsymbol ), 'g' ), '' );
|
559 |
}
|
560 |
|
561 |
if( c.decimalsymbol && !/^\s*$/.test( c.decimalsymbol ) )
|
562 |
{
|
563 |
+
v = v.replace( new RegExp( escapeSymbol( c.decimalsymbol ), 'g' ), '.' );
|
564 |
}
|
565 |
}
|
566 |
}
|
js/modules/01_mathematical_logical/public/01_logical.js
CHANGED
@@ -12,14 +12,14 @@
|
|
12 |
lib.cf_logical_version = '0.1';
|
13 |
|
14 |
// IF( logical_test, value_if_true, value_if_false )
|
15 |
-
lib.IF = function(
|
16 |
-
if (
|
17 |
-
return ( typeof
|
18 |
} else {
|
19 |
-
return ( typeof
|
20 |
}
|
21 |
};
|
22 |
-
|
23 |
// AND( logical1, logical2, ... )
|
24 |
lib.AND = function(){
|
25 |
for (var i = 0, h = arguments.length; i < h; i++) {
|
@@ -29,7 +29,7 @@
|
|
29 |
}
|
30 |
return true;
|
31 |
};
|
32 |
-
|
33 |
// OR( logical1, logical2, ... )
|
34 |
lib.OR = function(){
|
35 |
for (var i = 0, h = arguments.length; i < h; i++) {
|
@@ -39,12 +39,12 @@
|
|
39 |
}
|
40 |
return false;
|
41 |
};
|
42 |
-
|
43 |
// NOT( term )
|
44 |
lib.NOT = function( _term ){
|
45 |
return ( typeof _term == 'undefined' ) ? true : !_term;
|
46 |
};
|
47 |
-
|
48 |
// IN( term, values ) values can be a string or an array
|
49 |
lib.IN = function( _term, _values ){
|
50 |
function _reduce( str ){
|
@@ -58,8 +58,8 @@
|
|
58 |
}
|
59 |
return false;
|
60 |
};
|
61 |
-
|
62 |
-
|
63 |
root.CF_LOGICAL = lib;
|
64 |
-
|
65 |
})(this);
|
12 |
lib.cf_logical_version = '0.1';
|
13 |
|
14 |
// IF( logical_test, value_if_true, value_if_false )
|
15 |
+
lib.IF = function( condition, if_true, if_false ){
|
16 |
+
if ( condition ) {
|
17 |
+
return ( typeof if_true === 'undefined' ) ? true : if_true;
|
18 |
} else {
|
19 |
+
return ( typeof if_false === 'undefined' ) ? false : if_false;
|
20 |
}
|
21 |
};
|
22 |
+
|
23 |
// AND( logical1, logical2, ... )
|
24 |
lib.AND = function(){
|
25 |
for (var i = 0, h = arguments.length; i < h; i++) {
|
29 |
}
|
30 |
return true;
|
31 |
};
|
32 |
+
|
33 |
// OR( logical1, logical2, ... )
|
34 |
lib.OR = function(){
|
35 |
for (var i = 0, h = arguments.length; i < h; i++) {
|
39 |
}
|
40 |
return false;
|
41 |
};
|
42 |
+
|
43 |
// NOT( term )
|
44 |
lib.NOT = function( _term ){
|
45 |
return ( typeof _term == 'undefined' ) ? true : !_term;
|
46 |
};
|
47 |
+
|
48 |
// IN( term, values ) values can be a string or an array
|
49 |
lib.IN = function( _term, _values ){
|
50 |
function _reduce( str ){
|
58 |
}
|
59 |
return false;
|
60 |
};
|
61 |
+
|
62 |
+
|
63 |
root.CF_LOGICAL = lib;
|
64 |
+
|
65 |
})(this);
|
js/modules/01_mathematical_logical/public/module_public.js
CHANGED
@@ -6,9 +6,10 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
|
|
6 |
'prefix' : '',
|
7 |
'callback' : function()
|
8 |
{
|
9 |
-
if(Number.prototype.
|
10 |
{
|
11 |
-
|
|
|
12 |
}
|
13 |
|
14 |
function ROUNDx(operation, num, y)
|
6 |
'prefix' : '',
|
7 |
'callback' : function()
|
8 |
{
|
9 |
+
if(Number.prototype.LENGTH == undefined)
|
10 |
{
|
11 |
+
// Only LENGTH in uppercase to prevent a conflict with Lottie
|
12 |
+
Number.prototype.LENGTH = function(){return this.valueOf().toString().length;};
|
13 |
}
|
14 |
|
15 |
function ROUNDx(operation, num, y)
|
js/modules/05_managing_fields/public/05_managing_fields.js
CHANGED
@@ -31,11 +31,14 @@
|
|
31 |
if(f)
|
32 |
{
|
33 |
j = f.jQueryRef();
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
}
|
40 |
};
|
41 |
|
@@ -45,11 +48,14 @@
|
|
45 |
if(f)
|
46 |
{
|
47 |
j = f.jQueryRef();
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
}
|
54 |
};
|
55 |
|
31 |
if(f)
|
32 |
{
|
33 |
j = f.jQueryRef();
|
34 |
+
if(j.find('[id*="'+f.name+'"]').hasClass('ignore'))
|
35 |
+
{
|
36 |
+
j.add(j.find('.fields')).show();
|
37 |
+
if(f.name in $.fbuilder.forms[o].toHide) delete $.fbuilder.forms[o].toHide[f.name];
|
38 |
+
if(!(f.name in $.fbuilder.forms[o].toShow)) $.fbuilder.forms[o].toShow[f.name] = {'ref': {}};
|
39 |
+
j.find('[id*="'+f.name+'"]').removeClass('ignore').change();
|
40 |
+
$.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});
|
41 |
+
}
|
42 |
}
|
43 |
};
|
44 |
|
48 |
if(f)
|
49 |
{
|
50 |
j = f.jQueryRef();
|
51 |
+
if(!j.find('[id*="'+f.name+'"]').hasClass('ignore'))
|
52 |
+
{
|
53 |
+
j.add(j.find('.fields')).hide();
|
54 |
+
if(!(f.name in $.fbuilder.forms[o].toHide)) $.fbuilder.forms[o].toHide[f.name] = {};
|
55 |
+
if(f.name in $.fbuilder.forms[o].toShow) delete $.fbuilder.forms[o].toShow[f.name];
|
56 |
+
j.find('[id*="'+f.name+'"]').addClass('ignore').change();
|
57 |
+
$.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});
|
58 |
+
}
|
59 |
}
|
60 |
};
|
61 |
|
languages/calculated-fields-form-en_US.mo
CHANGED
Binary file
|
languages/calculated-fields-form-en_US.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date: 2020-
|
5 |
-
"PO-Revision-Date: 2020-
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
@@ -15,11 +15,11 @@ msgstr ""
|
|
15 |
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
-
#: cp_calculatedfieldsf_free.php:
|
19 |
msgid "Form Preview"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: cp_calculatedfieldsf_free.php:
|
23 |
msgid ""
|
24 |
"<div class=\"error-text\">The data cannot be stored in database because has "
|
25 |
"occurred an error with the database structure. Please, go to the plugins "
|
@@ -28,7 +28,7 @@ msgid ""
|
|
28 |
"please <a href=\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: cp_calculatedfieldsf_free.php:
|
32 |
msgid ""
|
33 |
"<div class=\"error-text\">The data cannot be stored in database because has "
|
34 |
"occurred an error with the form structure. Please, try to save the data "
|
@@ -41,7 +41,7 @@ msgstr ""
|
|
41 |
msgid "Settings saved"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: inc/cpcff_admin_int.inc.php:46 inc/cpcff_admin_int_list.inc.php:
|
45 |
#: inc/cpcff_page_builders.inc.php:155
|
46 |
#: pagebuilders/beaverbuilder/cff/cff/cff.php:9
|
47 |
#: pagebuilders/beaverbuilder/cff/cff/cff.php:11
|
@@ -219,12 +219,12 @@ msgid ""
|
|
219 |
msgstr ""
|
220 |
|
221 |
#: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
|
222 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
223 |
msgid "Request Custom Modifications"
|
224 |
msgstr ""
|
225 |
|
226 |
#: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
|
227 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
228 |
msgid "Help"
|
229 |
msgstr ""
|
230 |
|
@@ -296,7 +296,7 @@ msgstr ""
|
|
296 |
msgid "Valid until"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: inc/cpcff_admin_int.inc.php:405 inc/cpcff_admin_int_list.inc.php:
|
300 |
msgid "Add"
|
301 |
msgstr ""
|
302 |
|
@@ -536,143 +536,153 @@ msgstr ""
|
|
536 |
msgid "Duplicate/Clone Error, the form cannot be cloned"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
540 |
msgid "Troubleshoot settings updated"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
544 |
msgid "Are you sure that you want to delete this item?"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
548 |
msgid "Are you sure that you want to update these settings?"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
552 |
msgid "Form List / Items List"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
556 |
msgid "ID"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
560 |
msgid "Form Name"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
564 |
msgid "Options"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
568 |
msgid "Shortcode"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
572 |
msgid "Update"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
576 |
msgid "Settings"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
580 |
msgid "Messages"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
584 |
msgid "Clone"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
588 |
msgid "Delete"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
592 |
msgid "New Form"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
596 |
msgid "Item Name"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
600 |
msgid "Troubleshoot Area & General Settings"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
604 |
msgid ""
|
605 |
"<strong>Important!</strong>: Use this area <strong>only</strong> if you are "
|
606 |
"experiencing conflicts with third party plugins, with the theme scripts or "
|
607 |
"with the character encoding."
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
611 |
msgid "Script load method"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
615 |
msgid "Classic (Recommended)"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
619 |
msgid "Direct"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
623 |
msgid ""
|
624 |
"* Change the script load method if the form doesn't appear in the public "
|
625 |
"website."
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
629 |
msgid "Character encoding"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
633 |
msgid "Keep current charset (Recommended)"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
637 |
msgid "try this first"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
641 |
msgid "Only from MySQL 5.5"
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
645 |
msgid ""
|
646 |
"* Update the charset if you are getting problems displaying special/non-"
|
647 |
"latin characters. After updated you need to edit the special characters "
|
648 |
"again."
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
652 |
-
msgid "
|
653 |
msgstr ""
|
654 |
|
655 |
#: inc/cpcff_admin_int_list.inc.php:242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
msgid "Allows to access the forms directly"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
660 |
msgid "Allows to access the forms from amp pages"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
664 |
msgid "Do not load the forms with crawlers"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
668 |
msgid "* The forms are not loaded when website is being indexed by searchers."
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
672 |
msgid "UPDATE"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: inc/cpcff_admin_int_list.inc.php:
|
676 |
msgid "Upgrade"
|
677 |
msgstr ""
|
678 |
|
@@ -715,6 +725,15 @@ msgid ""
|
|
715 |
"and remember to purge the website cache."
|
716 |
msgstr ""
|
717 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
#: inc/cpcff_main.inc.php:221
|
719 |
msgid "Request custom changes"
|
720 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2020-07-13 01:24+0200\n"
|
5 |
+
"PO-Revision-Date: 2020-07-13 01:24+0200\n"
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
+
#: cp_calculatedfieldsf_free.php:74
|
19 |
msgid "Form Preview"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: cp_calculatedfieldsf_free.php:109
|
23 |
msgid ""
|
24 |
"<div class=\"error-text\">The data cannot be stored in database because has "
|
25 |
"occurred an error with the database structure. Please, go to the plugins "
|
28 |
"please <a href=\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: cp_calculatedfieldsf_free.php:125
|
32 |
msgid ""
|
33 |
"<div class=\"error-text\">The data cannot be stored in database because has "
|
34 |
"occurred an error with the form structure. Please, try to save the data "
|
41 |
msgid "Settings saved"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: inc/cpcff_admin_int.inc.php:46 inc/cpcff_admin_int_list.inc.php:95
|
45 |
#: inc/cpcff_page_builders.inc.php:155
|
46 |
#: pagebuilders/beaverbuilder/cff/cff/cff.php:9
|
47 |
#: pagebuilders/beaverbuilder/cff/cff/cff.php:11
|
219 |
msgstr ""
|
220 |
|
221 |
#: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
|
222 |
+
#: inc/cpcff_admin_int_list.inc.php:260
|
223 |
msgid "Request Custom Modifications"
|
224 |
msgstr ""
|
225 |
|
226 |
#: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
|
227 |
+
#: inc/cpcff_admin_int_list.inc.php:260 inc/cpcff_main.inc.php:224
|
228 |
msgid "Help"
|
229 |
msgstr ""
|
230 |
|
296 |
msgid "Valid until"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: inc/cpcff_admin_int.inc.php:405 inc/cpcff_admin_int_list.inc.php:206
|
300 |
msgid "Add"
|
301 |
msgstr ""
|
302 |
|
536 |
msgid "Duplicate/Clone Error, the form cannot be cloned"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: inc/cpcff_admin_int_list.inc.php:87
|
540 |
msgid "Troubleshoot settings updated"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: inc/cpcff_admin_int_list.inc.php:141
|
544 |
msgid "Are you sure that you want to delete this item?"
|
545 |
msgstr ""
|
546 |
|
547 |
+
#: inc/cpcff_admin_int_list.inc.php:149
|
548 |
msgid "Are you sure that you want to update these settings?"
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: inc/cpcff_admin_int_list.inc.php:165
|
552 |
msgid "Form List / Items List"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: inc/cpcff_admin_int_list.inc.php:170
|
556 |
msgid "ID"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: inc/cpcff_admin_int_list.inc.php:170
|
560 |
msgid "Form Name"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: inc/cpcff_admin_int_list.inc.php:170
|
564 |
msgid "Options"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: inc/cpcff_admin_int_list.inc.php:170
|
568 |
msgid "Shortcode"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: inc/cpcff_admin_int_list.inc.php:184
|
572 |
msgid "Update"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: inc/cpcff_admin_int_list.inc.php:185 inc/cpcff_main.inc.php:222
|
576 |
msgid "Settings"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: inc/cpcff_admin_int_list.inc.php:186
|
580 |
msgid "Messages"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: inc/cpcff_admin_int_list.inc.php:187
|
584 |
msgid "Clone"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: inc/cpcff_admin_int_list.inc.php:188
|
588 |
msgid "Delete"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: inc/cpcff_admin_int_list.inc.php:201
|
592 |
msgid "New Form"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: inc/cpcff_admin_int_list.inc.php:205
|
596 |
msgid "Item Name"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: inc/cpcff_admin_int_list.inc.php:213
|
600 |
msgid "Troubleshoot Area & General Settings"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: inc/cpcff_admin_int_list.inc.php:224
|
604 |
msgid ""
|
605 |
"<strong>Important!</strong>: Use this area <strong>only</strong> if you are "
|
606 |
"experiencing conflicts with third party plugins, with the theme scripts or "
|
607 |
"with the character encoding."
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: inc/cpcff_admin_int_list.inc.php:225
|
611 |
msgid "Script load method"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: inc/cpcff_admin_int_list.inc.php:227
|
615 |
msgid "Classic (Recommended)"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: inc/cpcff_admin_int_list.inc.php:228
|
619 |
msgid "Direct"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: inc/cpcff_admin_int_list.inc.php:230
|
623 |
msgid ""
|
624 |
"* Change the script load method if the form doesn't appear in the public "
|
625 |
"website."
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: inc/cpcff_admin_int_list.inc.php:232
|
629 |
msgid "Character encoding"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: inc/cpcff_admin_int_list.inc.php:234
|
633 |
msgid "Keep current charset (Recommended)"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: inc/cpcff_admin_int_list.inc.php:235
|
637 |
msgid "try this first"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: inc/cpcff_admin_int_list.inc.php:236
|
641 |
msgid "Only from MySQL 5.5"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: inc/cpcff_admin_int_list.inc.php:239
|
645 |
msgid ""
|
646 |
"* Update the charset if you are getting problems displaying special/non-"
|
647 |
"latin characters. After updated you need to edit the special characters "
|
648 |
"again."
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: inc/cpcff_admin_int_list.inc.php:241
|
652 |
+
msgid "There is active an optimization plugin in WordPress"
|
653 |
msgstr ""
|
654 |
|
655 |
#: inc/cpcff_admin_int_list.inc.php:242
|
656 |
+
msgid ""
|
657 |
+
"* Tick the checkbox if there is an optimization plugin active on the "
|
658 |
+
"website, and the forms are not visible."
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: inc/cpcff_admin_int_list.inc.php:245
|
662 |
+
msgid "Activate Javascript Cache"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: inc/cpcff_admin_int_list.inc.php:247
|
666 |
msgid "Allows to access the forms directly"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: inc/cpcff_admin_int_list.inc.php:249
|
670 |
msgid "Allows to access the forms from amp pages"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: inc/cpcff_admin_int_list.inc.php:251
|
674 |
msgid "Do not load the forms with crawlers"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: inc/cpcff_admin_int_list.inc.php:251
|
678 |
msgid "* The forms are not loaded when website is being indexed by searchers."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: inc/cpcff_admin_int_list.inc.php:253
|
682 |
msgid "UPDATE"
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: inc/cpcff_admin_int_list.inc.php:260 inc/cpcff_main.inc.php:223
|
686 |
msgid "Upgrade"
|
687 |
msgstr ""
|
688 |
|
725 |
"and remember to purge the website cache."
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: inc/cpcff_compatibility.inc.php:50
|
729 |
+
msgid ""
|
730 |
+
"There is active the <b>Hummingbird</b> plugin. If the forms are not visible, "
|
731 |
+
"check the <i>\"Hummingbird > Asset Optimization\"</i> options. Make sure "
|
732 |
+
"that jQuery or other required scripts are not configured to load after the "
|
733 |
+
"page loads. Remember to purge the website cache, after edit the plugin "
|
734 |
+
"settings."
|
735 |
+
msgstr ""
|
736 |
+
|
737 |
#: inc/cpcff_main.inc.php:221
|
738 |
msgid "Request custom changes"
|
739 |
msgstr ""
|
templates/07/js.js
CHANGED
@@ -1,31 +1,20 @@
|
|
1 |
fbuilderjQuery( window ).on( 'load', function(){
|
2 |
-
var
|
|
|
|
|
3 |
{
|
4 |
-
var
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
(function( f ){
|
19 |
-
return function(){
|
20 |
-
f( fbuilderjQuery(this).closest( '#fbuilder' ) );
|
21 |
-
};
|
22 |
-
})( progressBar ) );
|
23 |
-
|
24 |
-
fbuilderjQuery( '.cp_cff_minimalist .pbPrevious' ).click(
|
25 |
-
(function( f ){
|
26 |
-
return function(){
|
27 |
-
f( fbuilderjQuery(this).closest( '#fbuilder' ) );
|
28 |
-
};
|
29 |
-
})( progressBar ) );
|
30 |
-
}
|
31 |
});
|
1 |
fbuilderjQuery( window ).on( 'load', function(){
|
2 |
+
var $ = fbuilderjQuery;
|
3 |
+
$( 'form.cp_cff_minimalist' ).each(
|
4 |
+
function()
|
5 |
{
|
6 |
+
var f = $(this);
|
7 |
+
if($('.pbreak', f).length > 1)
|
8 |
+
{
|
9 |
+
var ps = $('.pbreak', f),
|
10 |
+
t = ps.length;
|
11 |
+
|
12 |
+
ps.each(function(i){
|
13 |
+
var p = $(this);
|
14 |
+
if(p.find('.wizard-progressbar').length != 0) return;
|
15 |
+
p.prepend('<div><div class="wizard-progressbar"><div class="wizard-progressbar-value" style="width:'+((i+1)/t*100)+'%"></div></div></div>');
|
16 |
+
});
|
17 |
+
}
|
18 |
+
}
|
19 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
});
|
templates/13/style.css
CHANGED
@@ -218,7 +218,6 @@
|
|
218 |
font-size: 13px;
|
219 |
line-height: 2;
|
220 |
min-height: 28px;
|
221 |
-
margin: 0;
|
222 |
padding: 0 10px;
|
223 |
cursor: pointer;
|
224 |
border-width: 1px;
|
218 |
font-size: 13px;
|
219 |
line-height: 2;
|
220 |
min-height: 28px;
|
|
|
221 |
padding: 0 10px;
|
222 |
cursor: pointer;
|
223 |
border-width: 1px;
|