Calculated Fields Form - Version 1.0.423

Version Description

  • Modifies the settings of every control to improve the user interaction.
  • Includes the NPER operation in the Financial Operations Module (Developer and Platinum versions of the plugin).
  • Modifies the Users Registration Form add-on allowing to hide the registration form for registered users (Developer and Platinum versions of the plugin).
  • Improves the code of the add-ons reducing duplication (Developer and Platinum versions of the plugin).
Download this release

Release Info

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

Code changes from version 1.0.400 to 1.0.423

Files changed (63) hide show
  1. README.txt +38 -32
  2. captcha/captcha.php +3 -3
  3. changelog.txt +126 -0
  4. config/cpcff_config.cfg.php +3 -0
  5. cp_calculatedfieldsf_free.php +2 -2
  6. css/style.css +14 -6
  7. css/stylepublic.css +20 -5
  8. inc/cpcff_admin_int.inc.php +41 -70
  9. inc/cpcff_admin_int_list.inc.php +3 -1
  10. inc/cpcff_amp.inc.php +52 -96
  11. inc/cpcff_form.inc.php +11 -2
  12. inc/cpcff_install_uninstall.inc.php +2 -2
  13. inc/cpcff_main.inc.php +22 -24
  14. js/fbuilder-pro-admin.jquery.js +13 -12
  15. js/fbuilder-pro-public.jquery.js +9 -3
  16. js/fields-admin/01_fbuilder.ftext.js +2 -2
  17. js/fields-admin/02_fbuilder.fcurrency.js +8 -8
  18. js/fields-admin/02_fbuilder.fnumber.js +3 -3
  19. js/fields-admin/02_fbuilder.fslider.js +35 -33
  20. js/fields-admin/03_fbuilder.femail.js +6 -2
  21. js/fields-admin/04_fbuilder.fdate.js +32 -27
  22. js/fields-admin/05_fbuilder.ftextarea.js +2 -2
  23. js/fields-admin/06_fbuilder.fcheck.js +6 -5
  24. js/fields-admin/07_fbuilder.fradio.js +4 -3
  25. js/fields-admin/08_fbuilder.fdropdown.js +6 -5
  26. js/fields-admin/09_fbuilder.ffile.js +2 -2
  27. js/fields-admin/10_fbuilder.fpassword.js +6 -2
  28. js/fields-admin/11_fbuilder.fphone.js +2 -2
  29. js/fields-admin/12_fbuilder.fcommentarea.js +2 -2
  30. js/fields-admin/13_fbuilder.fhidden.js +1 -1
  31. js/fields-admin/14_fbuilder.fsectionbreak.js +2 -2
  32. js/fields-admin/15_fbuilder.fpagebreak.js +2 -2
  33. js/fields-admin/16_fbuilder.fsummary.js +7 -8
  34. js/fields-admin/28_fbuilder.fcontainer.js +1 -1
  35. js/fields-admin/29_fbuilder.ffieldset.fc.js +13 -3
  36. js/fields-admin/30_fbuilder.fdiv.fc.js +1 -1
  37. js/fields-admin/31_fbuilder.fmedia.js +21 -24
  38. js/fields-admin/32_fbuilder.fbutton.js +5 -6
  39. js/fields-admin/34_fbuilder.fhtml.js +2 -2
  40. js/fields-admin/36_fbuilder.acceptance.js +6 -8
  41. js/fields-admin/fbuilder.fcalculated.js +13 -9
  42. js/fields-public/01_fbuilder.ftext.js +1 -1
  43. js/fields-public/02_fbuilder.fcurrency.js +1 -1
  44. js/fields-public/02_fbuilder.fnumber.js +1 -1
  45. js/fields-public/02_fbuilder.fslider.js +61 -6
  46. js/fields-public/03_fbuilder.femail.js +22 -1
  47. js/fields-public/04_fbuilder.fdate.js +46 -50
  48. js/fields-public/05_fbuilder.ftextarea.js +1 -1
  49. js/fields-public/06_fbuilder.fcheck.js +2 -2
  50. js/fields-public/07_fbuilder.fradio.js +2 -2
  51. js/fields-public/08_fbuilder.fdropdown.js +2 -2
  52. js/fields-public/09_fbuilder.ffile.js +1 -1
  53. js/fields-public/10_fbuilder.fpassword.js +22 -1
  54. js/fields-public/11_fbuilder.fphone.js +1 -1
  55. js/fields-public/16_fbuilder.fsummary.js +3 -1
  56. js/fields-public/29_fbuilder.ffieldset.fc.js +4 -1
  57. js/fields-public/32_fbuilder.fbutton.js +2 -0
  58. js/fields-public/36_fbuilder.acceptance.js +1 -1
  59. js/fields-public/fbuilder.fcalculated.js +12 -6
  60. js/modules/01_mathematical_logical/admin/module_admin.js +4 -1
  61. js/modules/01_mathematical_logical/public/module_public.js +76 -4
  62. languages/calculated-fields-form-en_US.mo +0 -0
  63. languages/calculated-fields-form-en_US.po +149 -141
README.txt CHANGED
@@ -949,59 +949,65 @@ This way the special characters should show correctly.
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
949
 
950
  == Changelog ==
951
 
952
+ = 1.0.423 =
953
 
954
+ * Modifies the settings of every control to improve the user interaction.
955
+ * Includes the NPER operation in the Financial Operations Module (Developer and Platinum versions of the plugin).
956
+ * Modifies the Users Registration Form add-on allowing to hide the registration form for registered users (Developer and Platinum versions of the plugin).
957
+ * Improves the code of the add-ons reducing duplication (Developer and Platinum versions of the plugin).
958
 
959
+ = 1.0.422 =
960
 
961
+ * Modifies the settings of every control to improve the user interaction.
962
+ * Fixes an issue in the CSV data-source in the DS controls (Developer and Platinum versions of the plugin).
963
+ * Modifies the Users Permissions add-on to allow the administrators to filter the data by the collected information. Furthermore, it includes a new button in the Messages section for those entries associated with registered users (Developer and Platinum versions of the plugin).
964
 
965
+ = 1.0.421 =
966
 
967
+ * Fixes an issue with the default date in the date/time fields.
968
+ * Implements the SCIENTIFICTODECIMAL operation to transform a number in scientific to decimal notation.
969
+ * Modifies the Users Permissions add-on to allow the administrators to edit the entries of other users directly through the [CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST] shortcode and the public form (Developer and Platinum versions of the plugin).
 
970
 
971
+ = 1.0.420 =
972
 
973
+ * Modifies the email controls to accept regular expressions for validation.
974
+ * Modifies the password controls to accept regular expressions for validation.
975
+ * Include minor modifications in the styles of phone controls.
976
+ * Modifies the appearance of messages table in the commercial versions of the plugin.
977
 
978
+ = 1.0.419 =
979
 
980
+ * Includes the FACTORIAL operation.
981
+ * Modifies some styles.
982
+ * Modifies the CFFCHART operation for accepting a third parameter (optional) with the field where storing the source of the generated chart as a PNG image in base64 code (Developer and Platinum versions of the plugin).
983
+ * Modifies the Users Permissions add-on to include a login form in case the form be accessible only by registered and the visitant is unregistered (Developer and Platinum versions of the plugin).
984
+ * Modifies the RecordSet DS field for accessing to more relaxed JSON objects (Developer and Platinum versions of the plugin).
985
+ * Fixes an issue in the PDF Generator add-on and the signature fields.
986
 
987
+ = 1.0.418 =
988
 
989
+ * Fixes an issue in the slider control.
 
 
990
 
991
+ = 1.0.417 =
992
 
993
+ * Improves the access to additional resources.
994
 
995
+ = 1.0.416 =
996
 
997
+ * Modifies the behaviour of the tooltip-icons to avoid putting the focus on the input tags.
998
 
999
+ = 1.0.415 =
1000
 
1001
+ * Modifies the controls to improve the accessibility including aria-label in all of them.
1002
+ * Includes new actions.
1003
+ * Modifies the Users Permissions add-on (Developer and Platinum versions of the plugin)
1004
 
1005
+ = 1.0.414 =
1006
 
1007
+ * Modifies the controls Dropdown, Checkbox, and Radio Buttons, to allow accessing from the equations to the information to submit, and not only the fields' values. For example, if fieldname1 is a dropdown field, use the modifier |v as part of the field' name in the equation to access the information to submit: fieldname1|v
1008
 
1009
  == Upgrade Notice ==
1010
 
1011
+ = 1.0.423 =
1012
 
1013
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://cff.dwbooster.com/contact-us
captcha/captcha.php CHANGED
@@ -3,12 +3,13 @@
3
  PHP Captcha by Codepeople.net
4
  http://www.codepeople.net
5
  */
 
6
  if(!defined('WP_DEBUG') || true != WP_DEBUG)
7
  {
8
  error_reporting(E_ERROR|E_PARSE);
9
  }
10
 
11
- ob_clean();
12
 
13
  if(!function_exists('cff_captcha_sanitize_key'))
14
  {
@@ -192,5 +193,4 @@ else
192
  header("Content-type: image/png");
193
  imagepng($image);
194
  imagedestroy ($image);
195
- exit;
196
- ?>
3
  PHP Captcha by Codepeople.net
4
  http://www.codepeople.net
5
  */
6
+
7
  if(!defined('WP_DEBUG') || true != WP_DEBUG)
8
  {
9
  error_reporting(E_ERROR|E_PARSE);
10
  }
11
 
12
+ if (!ini_get("zlib.output_compression")) ob_clean();
13
 
14
  if(!function_exists('cff_captcha_sanitize_key'))
15
  {
193
  header("Content-type: image/png");
194
  imagepng($image);
195
  imagedestroy ($image);
196
+ exit;
 
changelog.txt CHANGED
@@ -1,5 +1,131 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.400 =
4
 
5
  * Modifies the controls to allow using other fields in the form as their predefined values.
1
  == Changelog ==
2
 
3
+ = 1.0.423 =
4
+
5
+ * Modifies the settings of every control to improve the user interaction.
6
+ * Includes the NPER operation in the Financial Operations Module (Developer and Platinum versions of the plugin).
7
+ * Modifies the Users Registration Form add-on allowing to hide the registration form for registered users (Developer and Platinum versions of the plugin).
8
+ * Improves the code of the add-ons reducing duplication (Developer and Platinum versions of the plugin).
9
+
10
+ = 1.0.422 =
11
+
12
+ * Modifies the settings of every control to improve the user interaction.
13
+ * Fixes an issue in the CSV data-source in the DS controls (Developer and Platinum versions of the plugin).
14
+ * Modifies the Users Permissions add-on to allow the administrators to filter the data by the collected information. Furthermore, it includes a new button in the Messages section for those entries associated with registered users (Developer and Platinum versions of the plugin).
15
+
16
+ = 1.0.421 =
17
+
18
+ * Fixes an issue with the default date in the date/time fields.
19
+ * Implements the SCIENTIFICTODECIMAL operation to transform a number in scientific to decimal notation.
20
+ * Modifies the Users Permissions add-on to allow the administrators to edit the entries of other users directly through the [CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST] shortcode and the public form (Developer and Platinum versions of the plugin).
21
+
22
+ = 1.0.420 =
23
+
24
+ * Modifies the email controls to accept regular expressions for validation.
25
+ * Modifies the password controls to accept regular expressions for validation.
26
+ * Include minor modifications in the styles of phone controls.
27
+ * Modifies the appearance of messages table in the commercial versions of the plugin.
28
+
29
+ = 1.0.419 =
30
+
31
+ * Includes the FACTORIAL operation.
32
+ * Modifies some styles.
33
+ * Modifies the CFFCHART operation for accepting a third parameter (optional) with the field where storing the source of the generated chart as a PNG image in base64 code (Developer and Platinum versions of the plugin).
34
+ * Modifies the Users Permissions add-on to include a login form in case the form be accessible only by registered and the visitant is unregistered (Developer and Platinum versions of the plugin).
35
+ * Modifies the RecordSet DS field for accessing to more relaxed JSON objects (Developer and Platinum versions of the plugin).
36
+ * Fixes an issue in the PDF Generator add-on and the signature fields.
37
+
38
+ = 1.0.418 =
39
+
40
+ * Fixes an issue in the slider control.
41
+
42
+ = 1.0.417 =
43
+
44
+ * Improves the access to additional resources.
45
+
46
+ = 1.0.416 =
47
+
48
+ * Modifies the behaviour of the tooltip-icons to avoid putting the focus on the input tags.
49
+
50
+ = 1.0.415 =
51
+
52
+ * Modifies the controls to improve the accessibility including aria-label in all of them.
53
+ * Includes new actions.
54
+ * Modifies the Users Permissions add-on (Developer and Platinum versions of the plugin)
55
+
56
+ = 1.0.414 =
57
+
58
+ * Modifies the controls Dropdown, Checkbox, and Radio Buttons, to allow accessing from the equations to the information to submit, and not only the fields' values. For example, if fieldname1 is a dropdown field, use the modifier |v as part of the field' name in the equation to access the information to submit: fieldname1|v
59
+
60
+ = 1.0.413 =
61
+
62
+ * Modifies the operations: MIN, MAX, SUM and CONCATENATE for accepting arrays and not only numbers as their arguments.
63
+
64
+ = 1.0.412 =
65
+
66
+ * Fixes a conflict in the styles of the sliders' captions.
67
+ * Modifies the module that generates the captcha image.
68
+ * Modifies the reCAPTCHA add-on for supporting reCAPTCHA V3 (Developer and Platinum versions of the plugin)
69
+
70
+ = 1.0.411 =
71
+
72
+ * Modifies the Slider control to include a number component for typing the values directly, synchronizing the slider and number components.
73
+ * Fixes an issue in the summary control.
74
+ * Modifies the hooks in the Users Permissions add-on (Developer and Platinum versions of the plugin)
75
+
76
+ = 1.0.410 =
77
+
78
+ * Modifies some filters.
79
+ * Fixes an issue in the WooCommerce add-on (Developer and Platinum versions)
80
+
81
+ = 1.0.409 =
82
+
83
+ * Fixes an issue loading the revisions. It was forcing the users to load the revision twice to take effect.
84
+ * Modifies the browser's persistence feature to prevent it penalize the form's performance.
85
+ * Modify the method to load the Forms Builder resources to prevent that errors in third party plugin affect ours.
86
+
87
+ = 1.0.408 =
88
+
89
+ * Includes the AVERAGE operation to calculate the average for the numbers passed as parameter.
90
+ * Fixes an issue in the WooCommerce add-on.
91
+
92
+ = 1.0.407 =
93
+
94
+ * Transforms the fields' list to define the dependencies, to define the summary fields, and to define the equations in the calculated fields, into auto-complete lists, to improve the users' experience.
95
+ * Includes a new attribute in the DropDown DS fields to define a first choice, independent on the choices obtained from the data-sources (Ex. a - select one - choice) (Developer and Platinum versions)
96
+ * Evaluates the third-party shortcodes into the summaries defined by the Users Permissions Add-on (Developer and Platinum versions)
97
+
98
+ = 1.0.406 =
99
+
100
+ * Fixes an issue with the Reset buttons in multi-pages forms.
101
+
102
+ = 1.0.405 =
103
+
104
+ * Improves the support and integration with AMP pages, thanks to the modifications recommended by Weston Ruter (@westonruter)
105
+
106
+ = 1.0.404 =
107
+
108
+ * Modifies the Date/Time control.
109
+ * Modifies the Reset button.
110
+
111
+ = 1.0.403 =
112
+
113
+ * Modifies the fieldset field to allow makes it collapsible.
114
+ * Modifies the calculated fields to allow disabling the evaluation of the equations if the fields are editable, and their values are entered manually.
115
+ * Modifies the way the URLs are generated when the resources are loaded directly.
116
+ * Includes an attribute in the settings page to allow excluding the thank you pages from cache (Profession, Developer and Platinum versions)
117
+
118
+ = 1.0.402 =
119
+
120
+ * Improves the code that generates the forms builder.
121
+ * Includes new filter cpcff_custom_tags (Professional, Developer and Platinum versions)
122
+ * Modifies the PDF Generator add-on allowing to enter the <%pdf_generator_url%> tag into the notification emails and thank you pages. The tag would be replaced with the URL to the PDF file (Platinum versions)
123
+
124
+ = 1.0.401 =
125
+
126
+ * Modifies some database's columns to increase their sizes.
127
+ * Adds a random parameter to the thank you page's URL to prevent it be cached (Professional, Developer and Platinum versions)
128
+
129
  = 1.0.400 =
130
 
131
  * Modifies the controls to allow using other fields in the form as their predefined values.
config/cpcff_config.cfg.php CHANGED
@@ -15,6 +15,9 @@ define('CP_CALCULATEDFIELDSF_OPTIMIZATION_PLUGIN', 1);
15
  define('CP_CALCULATEDFIELDSF_AMP', 1 );
16
  define('CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', 1 );
17
 
 
 
 
18
  // Admin pages
19
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE', 'cp_calculated_fields_form');
20
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE2', 'cp_calculated_fields_form_sub2');
15
  define('CP_CALCULATEDFIELDSF_AMP', 1 );
16
  define('CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', 1 );
17
 
18
+ // Thank you page cache control
19
+ define('CP_CALCULATEDFIELDSF_TYPC', 1 );
20
+
21
  // Admin pages
22
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE', 'cp_calculated_fields_form');
23
  define('CP_CALCULATED_FIELDS_SETTINGS_PAGE2', 'cp_calculated_fields_form_sub2');
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.400
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.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 ) );
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.423
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.423' );
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 ) );
css/style.css CHANGED
@@ -8,10 +8,10 @@
8
  .ctrlsColumn .expand-shrink{float:right;margin:8px 5px 0px 0px;cursor:pointer;}
9
  .dashboardColumn{ width:calc(100% - 400px); }
10
  .width100{width:100%}
11
- .width50{width:48%}
12
  .width20{width:24%}
13
  .width40{width:40%}
14
- .width30{width:30%}
15
  .padding10{padding:10px;}
16
  .button, .form-builder .button{float:left;margin:5px 15px;}
17
  .button.n span{color:#AED0EA}
@@ -36,6 +36,7 @@
36
 
37
  .groupBox,
38
  .dependenciesBox,
 
39
  .choicesSet{border:1px dashed #888;margin:10px 0px;padding:5px;font-size:12px;}
40
  .choicesSet .t,
41
  .choicesEdit input[type=text]{width:calc( 50% - 55px );-webkit-width:calc( 50% - 55px );-moz-width:calc( 50% - 55px );width:-o-calc( 50% - 55px );}
@@ -60,6 +61,7 @@
60
  .cf_dependence_operator,.cf_dependence_value{width:calc( 50% - 50px );width:-webkit-calc( 50% - 50px );width:-moz-calc( 50% - 50px );width:-o-calc( 50% - 50px );}
61
  .showHideDependencies,.dep{float:right}
62
 
 
63
  .choicesSet.hide {display:block !important;visibility: visible !important;}
64
  .choicesSet.hide .choicesEditDep{display:none}
65
  .choicesSet.show .choicesEditDep{display:block}
@@ -88,7 +90,7 @@ input.disabled {background: #fff;color: #888;cursor: default;}
88
  label1{display:inline}
89
  input.small, select.small, textarea.small, .small{width:25%}
90
  input.medium, select.medium, textarea.medium, .medium{width:50%}
91
- input.large, select.large, textarea.large, .large{width:100%;box-sizing: border-box;-webkit-box-sizing:border-box;-moz-box-sizing: border-box;}
92
  textarea {resize: none}
93
  .form-builder .ctrlsColumn textarea{resize:vertical;}
94
  .one_column{}
@@ -135,7 +137,7 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
135
  .form-builder-error-messages .error-text{ color: #FF0000; border: 1px solid #FF0000; margin-bottom: 10px; padding:5px; }
136
  .form-builder-success-messages .success-text{ color: #46b450; border: 1px solid #46b450; margin-bottom: 10px; padding:5px; }
137
 
138
- .form-builder #tabs label{ font-size:12px !important; }
139
 
140
  .ui-state-highlight { height: 65px; line-height: 65px; }
141
 
@@ -146,6 +148,8 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
146
  .choicesEditDep,.choicesEdit,
147
  .cff-dependency-item{padding:5px 0;}
148
 
 
 
149
  @media only screen and (max-width: 640px){
150
  .cff-custom-table,
151
  .cff-custom-table thead,
@@ -158,8 +162,12 @@ a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer
158
  .cff-custom-table tr:last-child {border-bottom: 0px !important;}
159
  .cff-custom-table td {border-bottom: none !important;position: relative !important;}
160
  .cff-custom-table input[type="text"]{margin:0 !important; width:100% !important;display:block !important;}
161
- .cff-forms-list td:nth-of-type(1):before { content: "Id: " !important;}
162
- .cff-events-list td:nth-of-type(2):before { content: "Id: " !important;}
 
 
 
 
163
 
164
  .cff_form_builder .postbox select,
165
  .cff_form_builder .postbox textarea,
8
  .ctrlsColumn .expand-shrink{float:right;margin:8px 5px 0px 0px;cursor:pointer;}
9
  .dashboardColumn{ width:calc(100% - 400px); }
10
  .width100{width:100%}
11
+ .width50{width:50%}
12
  .width20{width:24%}
13
  .width40{width:40%}
14
+ .width30{width:33%}
15
  .padding10{padding:10px;}
16
  .button, .form-builder .button{float:left;margin:5px 15px;}
17
  .button.n span{color:#AED0EA}
36
 
37
  .groupBox,
38
  .dependenciesBox,
39
+ .datasourceSet,
40
  .choicesSet{border:1px dashed #888;margin:10px 0px;padding:5px;font-size:12px;}
41
  .choicesSet .t,
42
  .choicesEdit input[type=text]{width:calc( 50% - 55px );-webkit-width:calc( 50% - 55px );-moz-width:calc( 50% - 55px );width:-o-calc( 50% - 55px );}
61
  .cf_dependence_operator,.cf_dependence_value{width:calc( 50% - 50px );width:-webkit-calc( 50% - 50px );width:-moz-calc( 50% - 50px );width:-o-calc( 50% - 50px );}
62
  .showHideDependencies,.dep{float:right}
63
 
64
+ .datasourceSet.hide,
65
  .choicesSet.hide {display:block !important;visibility: visible !important;}
66
  .choicesSet.hide .choicesEditDep{display:none}
67
  .choicesSet.show .choicesEditDep{display:block}
90
  label1{display:inline}
91
  input.small, select.small, textarea.small, .small{width:25%}
92
  input.medium, select.medium, textarea.medium, .medium{width:50%}
93
+ input.large, select.large, textarea.large, .large{width:99%;box-sizing: border-box;-webkit-box-sizing:border-box;-moz-box-sizing: border-box;}
94
  textarea {resize: none}
95
  .form-builder .ctrlsColumn textarea{resize:vertical;}
96
  .one_column{}
137
  .form-builder-error-messages .error-text{ color: #FF0000; border: 1px solid #FF0000; margin-bottom: 10px; padding:5px; }
138
  .form-builder-success-messages .success-text{ color: #46b450; border: 1px solid #46b450; margin-bottom: 10px; padding:5px; }
139
 
140
+ .form-builder #tabs label{ font-size:12px !important; display:block;margin-top:10px;}
141
 
142
  .ui-state-highlight { height: 65px; line-height: 65px; }
143
 
148
  .choicesEditDep,.choicesEdit,
149
  .cff-dependency-item{padding:5px 0;}
150
 
151
+ .cff-events-list th{white-space:nowrap;}
152
+
153
  @media only screen and (max-width: 640px){
154
  .cff-custom-table,
155
  .cff-custom-table thead,
162
  .cff-custom-table tr:last-child {border-bottom: 0px !important;}
163
  .cff-custom-table td {border-bottom: none !important;position: relative !important;}
164
  .cff-custom-table input[type="text"]{margin:0 !important; width:100% !important;display:block !important;}
165
+ .cff-forms-list td:nth-of-type(1):before { content: "Id: " !important;}
166
+ .cff-events-list td:nth-of-type(2):before { content: "Id: " !important;}
167
+ .cff-events-list td:nth-of-type(3):before { content: "Form: " !important;}
168
+ .cff-events-list td:nth-of-type(4):before { content: "Date: " !important;}
169
+ .cff-events-list td:nth-of-type(5):before { content: "Email: " !important;}
170
+ .cff-events-list td:nth-of-type(6):before { content: "Message: " !important;}
171
 
172
  .cff_form_builder .postbox select,
173
  .cff_form_builder .postbox textarea,
css/stylepublic.css CHANGED
@@ -375,9 +375,11 @@
375
 
376
  #fbuilder .section_break{border-top:1px dotted #555;clear:both;}
377
 
378
- #fbuilder .uh_phone{float:left;margin:0px 5px;font-size:80%;text-align:center;position:relative;}
 
379
  *[dir="rtl"] #fbuilder .uh_phone{float:right;}
380
- #fbuilder .uh_phone input{text-align:center;font-size:100%;}
 
381
  #fbuilder .cpp_form { text-align:left;}
382
  *[dir="rtl"] #fbuilder .cpp_form { text-align:right;}
383
  #fbuilder .pbreak{display:none;}
@@ -395,6 +397,10 @@
395
  #fbuilder .ignore{display:none;}
396
  #fbuilder fieldset{border:1px solid #ccc;padding:10px;}
397
  #fbuilder legend{border:1px solid #ccc;padding:5px 10px;}
 
 
 
 
398
  #fbuilder .cpcaptchalayer,.cp_subbtn{display:none;}
399
  #fbuilder .captcha img{ cursor:pointer; }
400
 
@@ -405,8 +411,16 @@
405
  #fbuilder input[type="checkbox"]{-webkit-appearance:checkbox!important;}
406
  #fbuilder input[type="radio"]{-webkit-appearance:radio!important;}
407
 
408
- #fbuilder .dfield.slider-container{ padding-left: 10px !important; padding-right: 10px !important; padding-top:5px;}
409
- #fbuilder .dfield .slider{ margin-bottom:5px; }
 
 
 
 
 
 
 
 
410
 
411
  #fbuilder .cff-summary-title:after{ content: ': '; }
412
 
@@ -435,4 +449,5 @@
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;}
 
375
 
376
  #fbuilder .section_break{border-top:1px dotted #555;clear:both;}
377
 
378
+ #fbuilder .uh_phone{float:left;margin:0px 0px 0px 10px;text-align:center;position:relative;}
379
+ #fbuilder .uh_phone:nth-child(2){margin-left:0;}
380
  *[dir="rtl"] #fbuilder .uh_phone{float:right;}
381
+ #fbuilder .uh_phone input{text-align:center;}
382
+ #fbuilder .uh_phone .l{font-size:80%;}
383
  #fbuilder .cpp_form { text-align:left;}
384
  *[dir="rtl"] #fbuilder .cpp_form { text-align:right;}
385
  #fbuilder .pbreak{display:none;}
397
  #fbuilder .ignore{display:none;}
398
  #fbuilder fieldset{border:1px solid #ccc;padding:10px;}
399
  #fbuilder legend{border:1px solid #ccc;padding:5px 10px;}
400
+ #fbuilder .cff-collapsible.cff-collapsed>fieldset>div{display:none;}
401
+ #fbuilder .cff-collapsible.cff-collapsed>fieldset::after{content:'...';}
402
+ #fbuilder .cff-collapsible>fieldset>legend::after{content:"\2B0D";margin-left:10px;}
403
+ #fbuilder .cff-collapsible>fieldset>legend{cursor:pointer;}
404
  #fbuilder .cpcaptchalayer,.cp_subbtn{display:none;}
405
  #fbuilder .captcha img{ cursor:pointer; }
406
 
411
  #fbuilder input[type="checkbox"]{-webkit-appearance:checkbox!important;}
412
  #fbuilder input[type="radio"]{-webkit-appearance:radio!important;}
413
 
414
+ #fbuilder .slider-type-components::after{clear:both;content:'';display: block;margin-bottom: 15px;}
415
+ #fbuilder .slider-type-left-component{width:50%;padding-right:10px;clear:none;float:left;margin-left:-10px;}
416
+ #fbuilder .slider-type-right-component{width:50%;padding-left:10px;clear:none;float:right;margin-right:-10px;}
417
+ #fbuilder .slider-type-center-component{margin-left:-10px;margin-right:-10px;}
418
+ #fbuilder .dfield.slider-container{ padding-left: 10px !important; padding-right: 10px !important; padding-top:5px;}
419
+ #fbuilder .dfield .slider{ margin-bottom:5px; }
420
+ #fbuilder .corner-captions{position:relative;}
421
+ #fbuilder .corner-captions .left-corner{float:left;}
422
+ #fbuilder .corner-captions .right-corner{float:right;}
423
+ #fbuilder .slider-caption{text-align:center;width:100%;}
424
 
425
  #fbuilder .cff-summary-title:after{ content: ': '; }
426
 
449
  #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');
450
  }
451
  #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;}
452
+ #fbuilder .cff-dialog-content{width:100%;height:100%;overflow:auto;white-space:normal;}
453
+ #fbuilder #loginform label{min-width:250px;display:inline-block;}
inc/cpcff_admin_int.inc.php CHANGED
@@ -10,8 +10,12 @@ if ( !is_admin() )
10
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_templates.inc.php';
11
 
12
  check_admin_referer( 'cff-form-settings', '_cpcff_nonce' );
 
 
13
  wp_enqueue_media();
14
  if(function_exists('wp_enqueue_code_editor')) wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
 
 
15
 
16
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
17
  define ('CP_CALCULATEDFIELDSF_ID',intval($_GET["cal"]));
@@ -103,18 +107,9 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
103
  <script type="text/javascript">
104
  try
105
  {
106
- /* Flags */
107
- var calculatedFieldsForm_first = false,
108
- calculatedFieldsForm_counter = 10;
109
-
110
  function calculatedFieldsFormReady()
111
  {
112
- if(typeof $calculatedfieldsfQuery.fn['fbuilder'] == 'undefined')
113
- {
114
- calculatedFieldsFormImport(); return;
115
- }
116
-
117
- /* Revisions code */
118
  $calculatedfieldsfQuery('[name="cff_apply_revision"]').click(
119
  function(){
120
  var revision = $calculatedfieldsfQuery('[name="cff_revision_list"]').val();
@@ -128,9 +123,28 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
128
  }
129
  }
130
  );
131
- var f = $calculatedfieldsfQuery("#fbuilder").fbuilder();
132
- window['cff_form'] = f;
133
- f.fBuild.loadData( "form_structure", "templates" );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
  $calculatedfieldsfQuery(".itemForm").click(function() {
136
  f.fBuild.addItem($calculatedfieldsfQuery(this).attr("id"));
@@ -144,67 +158,22 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
144
  .find('*')
145
  .prop('disabled', true);
146
  };
147
-
148
- function calculatedFieldsFormImport()
149
- {
150
- if( typeof jQuery == 'undefined' )
151
- {
152
- if( !calculatedFieldsForm_first )
153
- {
154
- document.write ("<"+"script type='text/javascript' src='<?php print CP_SCHEME; ?>ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></"+"script>");
155
- document.write ("<"+"script type='text/javascript' src='<?php print CP_SCHEME; ?>ajax.googleapis.com/ajax/libs/jqueryui/1.8.20/jquery-ui.min.js'></"+"script>");
156
- }
157
- if( calculatedFieldsForm_counter )
158
- {
159
- calculatedFieldsForm_counter--;
160
- setTimeout( calculatedFieldsFormImport, 500 );
161
- }
162
- }
163
- else
164
- {
165
- $calculatedfieldsfQuery = jQuery.noConflict();
166
- window.jQuery = window.$ = jQuery;
167
- var getScript = $calculatedfieldsfQuery.getScript;
168
- $calculatedfieldsfQuery.getScript = function( resources, callback ) {
169
-
170
- var /* reference declaration & localization */
171
- length = resources.length,
172
- handler = function() { counter++; },
173
- deferreds = [],
174
- counter = 0,
175
- idx = 0;
176
-
177
- for ( ; idx < length; idx++ ) {
178
- deferreds.push(
179
- getScript( resources[ idx ], handler )
180
- );
181
- }
182
-
183
- $calculatedfieldsfQuery.when.apply( null, deferreds ).then(function() {
184
- callback && callback();
185
- });
186
- };
187
-
188
- $calculatedfieldsfQuery.getScript(
189
- [
190
- '<?php echo plugins_url('/js/jQuery.stringify.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>',
191
- '<?php echo plugins_url('/js/jquery.validate.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>',
192
- '<?php echo plugins_url('/js/jquery.caret.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>',
193
- '<?php echo CPCFF_AUXILIARY::wp_url().'/?cp_cff_resources=admin'; ?>'
194
- ],
195
- function()
196
- {
197
- $calculatedfieldsfQuery(document).ready( calculatedFieldsFormReady ).ready();
198
- }
199
- );
200
- }
201
- };
202
  }
203
  catch( err ){}
204
  try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {}
205
  if (typeof $calculatedfieldsfQuery == 'undefined')
206
  {
207
- calculatedFieldsFormImport();
 
 
 
 
 
 
 
 
 
 
208
  }
209
  else
210
  {
@@ -642,7 +611,9 @@ $cpcff_texts_array = CPCFF_AUXILIARY::array_replace_recursive(
642
  </table>
643
  </div>
644
  </div>
645
-
 
 
646
  </div>
647
 
648
 
10
  require_once CP_CALCULATEDFIELDSF_BASE_PATH.'/inc/cpcff_templates.inc.php';
11
 
12
  check_admin_referer( 'cff-form-settings', '_cpcff_nonce' );
13
+
14
+ // Load resources
15
  wp_enqueue_media();
16
  if(function_exists('wp_enqueue_code_editor')) wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
17
+ wp_enqueue_style('cff-chosen-css', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.min.css');
18
+ wp_enqueue_script('cff-chosen-js', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.jquery.min.js',array("jquery"));
19
 
20
  if (!defined('CP_CALCULATEDFIELDSF_ID'))
21
  define ('CP_CALCULATEDFIELDSF_ID',intval($_GET["cal"]));
107
  <script type="text/javascript">
108
  try
109
  {
 
 
 
 
110
  function calculatedFieldsFormReady()
111
  {
112
+ /* Revisions code */
 
 
 
 
 
113
  $calculatedfieldsfQuery('[name="cff_apply_revision"]').click(
114
  function(){
115
  var revision = $calculatedfieldsfQuery('[name="cff_revision_list"]').val();
123
  }
124
  }
125
  );
126
+
127
+ // Form builder code
128
+
129
+ var f;
130
+ function run_fbuilder($)
131
+ {
132
+ f = $("#fbuilder").fbuilder();
133
+ window['cff_form'] = f;
134
+ f.fBuild.loadData( "form_structure", "templates" );
135
+ };
136
+
137
+ if(!('fbuilder' in $calculatedfieldsfQuery.fn))
138
+ {
139
+ $calculatedfieldsfQuery.getScript(
140
+ location.protocol + '//' + location.host + location.pathname+'?page=cp_calculated_fields_form&cp_cff_resources=admin',
141
+ function(){run_fbuilder(fbuilderjQuery);}
142
+ );
143
+ }
144
+ else
145
+ {
146
+ run_fbuilder($calculatedfieldsfQuery);
147
+ }
148
 
149
  $calculatedfieldsfQuery(".itemForm").click(function() {
150
  f.fBuild.addItem($calculatedfieldsfQuery(this).attr("id"));
158
  .find('*')
159
  .prop('disabled', true);
160
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  }
162
  catch( err ){}
163
  try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {}
164
  if (typeof $calculatedfieldsfQuery == 'undefined')
165
  {
166
+ if(window.addEventListener){
167
+ window.addEventListener('load', function(){
168
+ try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {return;}
169
+ calculatedFieldsFormReady();
170
+ });
171
+ }else{
172
+ window.attachEvent('onload', function(){
173
+ try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {return;}
174
+ calculatedFieldsFormReady();
175
+ });
176
+ }
177
  }
178
  else
179
  {
611
  </table>
612
  </div>
613
  </div>
614
+ <?php
615
+ do_action('cpcff_form_settings', CP_CALCULATEDFIELDSF_ID);
616
+ ?>
617
  </div>
618
 
619
 
inc/cpcff_admin_int_list.inc.php CHANGED
@@ -208,7 +208,9 @@ if ($message) echo "<div id='setting-error-settings_updated' class='updated sett
208
  </form>
209
  </div>
210
  </div>
211
-
 
 
212
  <div id="metabox_basic_settings" class="postbox" >
213
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
214
  <div class="inside">
208
  </form>
209
  </div>
210
  </div>
211
+ <div style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;margin:10px 0;font-size:1.3em;">
212
+ <?php _e('For additional resources visit the plugin\'s', 'calculated-fields-form')?> <a href="https://cff-bundles.dwbooster.com" target="_blank" style="font-weight:bold;"><?php _e('Marketplace', 'calculated-fields-form'); ?></a>
213
+ </div>
214
  <div id="metabox_basic_settings" class="postbox" >
215
  <h3 class='hndle' style="padding:5px;"><span><?php _e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
216
  <div class="inside">
inc/cpcff_amp.inc.php CHANGED
@@ -39,97 +39,60 @@ if(!class_exists('CPCFF_AMP'))
39
  )
40
  {
41
  $atts = $this->_params_to_attrs();
42
- // The AMP page has not been redirected so it is redirected from the server side
43
- if(
44
- !headers_sent() &&
45
- empty($_GET['cff-amp-redirected'])
46
- )
 
 
 
 
 
 
47
  {
48
- $host = $_SERVER['HTTP_HOST'];
49
- if(preg_match('/^www\./i',$host)) $host = preg_replace('/^www\./i','',$host);
50
- else $host = "www.$host";
51
-
52
- $request_uri = $_SERVER['REQUEST_URI'];
53
- $request_uri .= (strpos($request_uri,'?') === false) ? '?' : '&';
54
- $request_uri .= 'cff-amp-redirected=1';
55
 
56
- wp_redirect( "https://$host$request_uri" );
57
- remove_all_actions('shutdown');
58
- exit;
 
 
 
 
59
  }
60
- else
 
 
 
61
  {
62
- $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
63
- print '<!DOCTYPE html><html '.
64
- ((function_exists( 'is_rtl' ) && is_rtl()) ? 'dir="rtl"' : '').
65
- '>'.
66
- '<head>'.
67
- '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.
68
- '<meta name="viewport" content="width=device-width">'.
69
- '<title>'.esc_html($page_title).'</title>';
70
-
71
- // Patch for editor preview
72
- if(empty($_GET['cff-editor-preview']))
73
- {
74
- print '<style>'.
75
- 'body{background:#FFF;overflow:hidden;margin:0;}'.
76
- 'html, body {height:100%;position:relative;min-height:100%;display:block;}'.
77
- '#fbuilder{overflow-x:hidden;overflow-y:auto;height:'.$this->_get_height().'px;padding:5px 32px 5px 5px;box-sizing:border-box!important;}'.
78
- '</style>';
79
- }
80
-
81
- // The AMP page has not been redirected
82
- // and redirects it with javascript
83
- if(empty($_GET['cff-amp-redirected']))
84
- {
85
- print '<script>'.
86
- 'var current_url = document.location.href;'.
87
- 'if(/^https:\/\/www\./i.test(current_url)) current_url = current_url.replace(/^https:\/\/www\./i, "https://");'.
88
- 'else current_url = current_url.replace(/^https:\/\//i, "https://www.");'.
89
- 'current_url += (current_url.indexOf("?") == -1) ? "?" : "&"'.
90
- 'document.location.href=current_url+"cff-amp-redirected=1";'.
91
- '</script>';
92
- }
93
- else
94
- {
95
- global $wp_styles, $wp_scripts;
96
- if(!empty($wp_scripts)) $wp_scripts->reset();
97
- $message = $this->_main_obj->public_form($atts);
98
- // Patch for editor preview
99
- if(empty($_GET['cff-editor-preview']))
100
- {
101
- $message = preg_replace('/<form\s+/i', '<form target="_parent" ', $message, 1);
102
- }
103
- ob_start();
104
- if(!empty($wp_styles)) $wp_styles->do_items();
105
- if(!empty($wp_scripts)) $wp_scripts->do_items();
106
- if(class_exists('Error'))
107
- {
108
- try{ wp_footer(); } catch(Error $err) {}
109
- }
110
- $message .= ob_get_contents();
111
- ob_end_clean();
112
-
113
- // Patch for editor preview
114
- if(!empty($_GET['cff-editor-preview']))
115
- {
116
- $message .= '<script type="text/javascript">
117
- fbuilderjQuery(window).on( "load", function(){
118
- var frameEl = window.frameElement;
119
- if(frameEl) frameEl.height = fbuilderjQuery("form").outerHeight(true) + 25;
120
- });
121
- </script>';
122
- }
123
- }
124
 
125
- print '</head>'.
126
- '<body>'.
127
- $message.
128
- '</body>'.
129
- '</html>';
130
- remove_all_actions('shutdown');
131
- exit;
 
 
132
  }
 
 
 
 
 
 
 
133
  }
134
  } // End amp_init
135
 
@@ -148,12 +111,9 @@ if(!class_exists('CPCFF_AMP'))
148
  if(empty($_GET['non-amp']))
149
  {
150
  if( function_exists('ampforwp_is_amp_endpoint') ) return ampforwp_is_amp_endpoint();
151
- elseif( function_exists('is_amp_endpoint') )
152
- {
153
- if(defined('AMP_QUERY_VAR')) return is_amp_endpoint();
154
- }
155
- }
156
- return false;
157
  } // End is_amp
158
 
159
  /**
@@ -178,14 +138,10 @@ if(!class_exists('CPCFF_AMP'))
178
 
179
  $url .= '&cff-form-height='.$height.'&non-amp=1';
180
 
181
- // Fixing the isseu with the origin policy in the amp-iframes
182
- if(preg_match('/^https:\/\/www\./i', $url)) $url = preg_replace('/^https:\/\/www\./i', 'https://', $url);
183
- else $url = preg_replace('/^https:\/\//i', 'https://www.', $url);
184
-
185
  add_action('amp_post_template_css', array($this, 'amp_css') );
186
  add_filter( 'amp_post_template_data', array($this, 'amp_iframe') );
187
 
188
- return '<amp-iframe id="cff-form-iframe" src="'.esc_attr( esc_url($url)).'" layout="fixed-height" sandbox="allow-popups allow-forms allow-top-navigation allow-modals allow-scripts allow-same-origin" height="'.esc_attr($height).'"><amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBpZD0ic3ZnOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMTMuMjI5MTY3IDEzLjIyOTE2NyIgaGVpZ2h0PSI1MCIgd2lkdGg9IjUwIj48ZGVmcyBpZD0iZGVmczIiIC8+PG1ldGFkYXRhIGlkPSJtZXRhZGF0YTUiPjxyZGY6UkRGPjxjYzpXb3JrIHJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPjxkYzp0aXRsZT48L2RjOnRpdGxlPjwvY2M6V29yaz48L3JkZjpSREY+PC9tZXRhZGF0YT48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLC0yODMuNzcwODMpIiBpZD0ibGF5ZXIxIiAvPjwvc3ZnPg==" placeholder layout="responsive" width="50" height="50" /></amp-iframe>';
189
  }
190
 
191
  /**
39
  )
40
  {
41
  $atts = $this->_params_to_attrs();
42
+ $page_title = (!empty($atts['page_title'])) ? $atts['page_title'] : '';
43
+ print '<!DOCTYPE html><html '.
44
+ ((function_exists( 'is_rtl' ) && is_rtl()) ? 'dir="rtl"' : '').
45
+ '>'.
46
+ '<head>'.
47
+ '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.
48
+ '<meta name="viewport" content="width=device-width">'.
49
+ '<title>'.esc_html($page_title).'</title>';
50
+
51
+ // Patch for editor preview
52
+ if(empty($_GET['cff-editor-preview']))
53
  {
54
+ print '<style>'.
55
+ 'body{background:#FFF;overflow:hidden;margin:0;}'.
56
+ 'html, body {height:100%;position:relative;min-height:100%;display:block;}'.
57
+ '#fbuilder{overflow-x:hidden;overflow-y:auto;height:'.$this->_get_height().'px;padding:5px 32px 5px 5px;box-sizing:border-box!important;}'.
58
+ '</style>';
59
+ }
 
60
 
61
+ global $wp_styles, $wp_scripts;
62
+ if(!empty($wp_scripts)) $wp_scripts->reset();
63
+ $message = $this->_main_obj->public_form($atts);
64
+ // Patch for editor preview
65
+ if(empty($_GET['cff-editor-preview']))
66
+ {
67
+ $message = preg_replace('/<form\s+/i', '<form target="_parent" ', $message, 1);
68
  }
69
+ ob_start();
70
+ if(!empty($wp_styles)) $wp_styles->do_items();
71
+ if(!empty($wp_scripts)) $wp_scripts->do_items();
72
+ if(class_exists('Error'))
73
  {
74
+ try{ wp_footer(); } catch(Error $err) {}
75
+ }
76
+ $message .= ob_get_contents();
77
+ ob_end_clean();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
+ // Patch for editor preview
80
+ if(!empty($_GET['cff-editor-preview']))
81
+ {
82
+ $message .= '<script type="text/javascript">
83
+ fbuilderjQuery(window).on( "load", function(){
84
+ var frameEl = window.frameElement;
85
+ if(frameEl) frameEl.height = fbuilderjQuery("form").outerHeight(true) + 25;
86
+ });
87
+ </script>';
88
  }
89
+ print '</head>'.
90
+ '<body>'.
91
+ $message.
92
+ '</body>'.
93
+ '</html>';
94
+ remove_all_actions('shutdown');
95
+ exit;
96
  }
97
  } // End amp_init
98
 
111
  if(empty($_GET['non-amp']))
112
  {
113
  if( function_exists('ampforwp_is_amp_endpoint') ) return ampforwp_is_amp_endpoint();
114
+ elseif( function_exists('is_amp_endpoint') ) return is_amp_endpoint();
115
+ }
116
+ return false;
 
 
 
117
  } // End is_amp
118
 
119
  /**
138
 
139
  $url .= '&cff-form-height='.$height.'&non-amp=1';
140
 
 
 
 
 
141
  add_action('amp_post_template_css', array($this, 'amp_css') );
142
  add_filter( 'amp_post_template_data', array($this, 'amp_iframe') );
143
 
144
+ return '<amp-iframe id="cff-form-iframe" src="'.esc_attr( esc_url($url)).'" layout="fixed-height" sandbox="allow-popups allow-forms allow-top-navigation allow-modals allow-scripts" height="'.esc_attr($height).'"><amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBpZD0ic3ZnOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMTMuMjI5MTY3IDEzLjIyOTE2NyIgaGVpZ2h0PSI1MCIgd2lkdGg9IjUwIj48ZGVmcyBpZD0iZGVmczIiIC8+PG1ldGFkYXRhIGlkPSJtZXRhZGF0YTUiPjxyZGY6UkRGPjxjYzpXb3JrIHJkZjphYm91dD0iIj48ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD48ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPjxkYzp0aXRsZT48L2RjOnRpdGxlPjwvY2M6V29yaz48L3JkZjpSREY+PC9tZXRhZGF0YT48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLC0yODMuNzcwODMpIiBpZD0ibGF5ZXIxIiAvPjwvc3ZnPg==" placeholder layout="responsive" width="50" height="50" /></amp-iframe>';
145
  }
146
 
147
  /**
inc/cpcff_form.inc.php CHANGED
@@ -199,6 +199,15 @@ if(!class_exists('CPCFF_FORM'))
199
  $value = $this->_settings['form_structure'] = $form_data;
200
  }
201
  }
 
 
 
 
 
 
 
 
 
202
  // If the texts where not defined previously or the thank you page is empty populate them with the default values
203
  elseif (
204
  (
@@ -216,7 +225,7 @@ if(!class_exists('CPCFF_FORM'))
216
  * use three parameters: The value of option, the name of option and the form's id
217
  * returns the new option's value
218
  */
219
- $value = apply_filters( 'cpcff_get_option', $value, $option, $this->_id );
220
 
221
  return $value;
222
  } // End get_option
@@ -348,6 +357,7 @@ if(!class_exists('CPCFF_FORM'))
348
  {
349
  $this->_get_settings();
350
  $revision_data = $this->_revisions_obj->data($revision_id);
 
351
  $this->_settings = CPCFF_AUXILIARY::array_replace_recursive($this->_settings,$revision_data);
352
  } // End apply_revision
353
 
@@ -397,7 +407,6 @@ if(!class_exists('CPCFF_FORM'))
397
  */
398
  private function _get_settings()
399
  {
400
- global $wpdb;
401
  if(empty($this->_settings))
402
  {
403
  $row = $this->get_raw_data();
199
  $value = $this->_settings['form_structure'] = $form_data;
200
  }
201
  }
202
+ // Adds to the thank you page URL a random attribute to prevent the page be cached
203
+ elseif(
204
+ $option == 'fp_return_page' &&
205
+ !is_admin() &&
206
+ get_option( 'CP_CALCULATEDFIELDSF_TYPC', CP_CALCULATEDFIELDSF_TYPC )
207
+ )
208
+ {
209
+ if(!empty($value)) $value .= (strpos($value, '?') === false ? '?' : '&').'cff_no_cache='.time();
210
+ }
211
  // If the texts where not defined previously or the thank you page is empty populate them with the default values
212
  elseif (
213
  (
225
  * use three parameters: The value of option, the name of option and the form's id
226
  * returns the new option's value
227
  */
228
+ if(!is_admin()) $value = apply_filters( 'cpcff_get_option', $value, $option, $this->_id );
229
 
230
  return $value;
231
  } // End get_option
357
  {
358
  $this->_get_settings();
359
  $revision_data = $this->_revisions_obj->data($revision_id);
360
+ $this->_fields = array();
361
  $this->_settings = CPCFF_AUXILIARY::array_replace_recursive($this->_settings,$revision_data);
362
  } // End apply_revision
363
 
407
  */
408
  private function _get_settings()
409
  {
 
410
  if(empty($this->_settings))
411
  {
412
  $row = $this->get_raw_data();
inc/cpcff_install_uninstall.inc.php CHANGED
@@ -128,14 +128,14 @@ if(!class_exists('CPCFF_INSTALLER'))
128
  form_structure mediumtext,
129
  fp_from_email VARCHAR(250) DEFAULT '' NOT NULL,
130
  fp_destination_emails TEXT,
131
- fp_subject VARCHAR(250) DEFAULT '' NOT NULL,
132
  fp_inc_additional_info VARCHAR(10) DEFAULT '' NOT NULL,
133
  fp_return_page VARCHAR(250) DEFAULT '' NOT NULL,
134
  fp_message mediumtext,
135
  fp_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
136
  cu_enable_copy_to_user VARCHAR(10) DEFAULT '' NOT NULL,
137
  cu_user_email_field TEXT DEFAULT '' NOT NULL,
138
- cu_subject VARCHAR(250) DEFAULT '' NOT NULL,
139
  cu_message mediumtext,
140
  cu_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
141
  fp_emailfrommethod VARCHAR(10) DEFAULT '' NOT NULL,
128
  form_structure mediumtext,
129
  fp_from_email VARCHAR(250) DEFAULT '' NOT NULL,
130
  fp_destination_emails TEXT,
131
+ fp_subject TEXT,
132
  fp_inc_additional_info VARCHAR(10) DEFAULT '' NOT NULL,
133
  fp_return_page VARCHAR(250) DEFAULT '' NOT NULL,
134
  fp_message mediumtext,
135
  fp_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
136
  cu_enable_copy_to_user VARCHAR(10) DEFAULT '' NOT NULL,
137
  cu_user_email_field TEXT DEFAULT '' NOT NULL,
138
+ cu_subject TEXT,
139
  cu_message mediumtext,
140
  cu_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
141
  fp_emailfrommethod VARCHAR(10) DEFAULT '' NOT NULL,
inc/cpcff_main.inc.php CHANGED
@@ -183,11 +183,7 @@ if(!class_exists('CPCFF_MAIN'))
183
  // Loads the admin resources
184
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_resources' ), 1 );
185
  }
186
- else // Initializes the public modules.
187
- {
188
- $this->_define_shortcodes();
189
- }
190
-
191
  } // End init
192
 
193
  /**
@@ -255,12 +251,13 @@ if(!class_exists('CPCFF_MAIN'))
255
  add_menu_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array($this, 'admin_pages') );
256
 
257
  // Submenu options
258
- add_submenu_page( 'cp_calculated_fields_form', 'Documentation', 'Documentation', 'manage_options', "cp_calculated_fields_form_sub2", array($this, 'admin_pages') );
259
 
260
- add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', "cp_calculated_fields_form_sub4", array($this, 'admin_pages') );
261
 
262
- add_submenu_page( 'cp_calculated_fields_form', 'Upgrade', 'Upgrade', 'manage_options', "cp_calculated_fields_form_sub3", array($this, 'admin_pages') );
263
 
 
264
  } // End admin_menu
265
 
266
  /**
@@ -331,7 +328,7 @@ if(!class_exists('CPCFF_MAIN'))
331
  $admin_resources = admin_url( "admin.php?page=cp_calculated_fields_form&cp_cff_resources=admin" );
332
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script', $admin_resources, array("jquery","jquery-ui-core","jquery-ui-sortable","jquery-ui-tabs","jquery-ui-droppable","jquery-ui-button", "jquery-ui-accordion","jquery-ui-datepicker","query-stringify") );
333
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script_caret', plugins_url('/js/jquery.caret.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH),array("jquery"));
334
- wp_enqueue_style('cp_calculatedfieldsf_builder_style', plugins_url('/css/style.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
335
  wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
336
  }
337
  // Checks if it is to an external page
@@ -341,7 +338,8 @@ if(!class_exists('CPCFF_MAIN'))
341
  array(
342
  'cp_calculated_fields_form_sub2',
343
  'cp_calculated_fields_form_sub3',
344
- 'cp_calculated_fields_form_sub4'
 
345
  )
346
  )
347
  )
@@ -358,6 +356,9 @@ if(!class_exists('CPCFF_MAIN'))
358
  case 'cp_calculated_fields_form_sub4':
359
  $cpcff_redirect['url'] = 'https://wordpress.org/support/plugin/calculated-fields-form#new-post';
360
  break;
 
 
 
361
  }
362
  wp_enqueue_script('cp_calculatedfieldsf_redirect_script', plugins_url('/js/redirect_script.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
363
  wp_localize_script(
@@ -804,30 +805,27 @@ if(!class_exists('CPCFF_MAIN'))
804
  {
805
  $this->_are_resources_loaded = true; // Resources loaded
806
 
807
- $plugin_url = plugins_url('', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH);
808
 
809
- $prefix_ui = ''; // Used for compatibility with old versions of WordPress
810
- if ( @file_exists( CP_CALCULATEDFIELDSF_BASE_PATH.'/../../../wp-includes/js/jquery/ui/jquery.ui.core.min.js' ) )
811
- {
812
- $prefix_ui = 'jquery.ui.';
813
- }
814
 
815
  if(!wp_script_is('jquery', 'done'))
816
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/jquery.js"></script>';
817
  if(!wp_script_is('jquery-ui-core', 'done'))
818
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'core.min.js"></script>';
819
  if(!wp_script_is('jquery-ui-datepicker', 'done'))
820
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'datepicker.min.js"></script>';
821
  if(!wp_script_is('jquery-ui-widget', 'done'))
822
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'widget.min.js"></script>';
823
  if(!wp_script_is('jquery-ui-position', 'done'))
824
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'position.min.js"></script>';
825
  if(!wp_script_is('jquery-ui-tooltip', 'done'))
826
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'tooltip.min.js"></script>';
827
  if(!wp_script_is('jquery-ui-mouse', 'done'))
828
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'mouse.min.js"></script>';
829
  if(!wp_script_is('jquery-ui-slider', 'done'))
830
- print '<script type="text/javascript" src="'.$plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'slider.min.js"></script>';
831
  ?>
832
  <script>if( typeof fbuilderjQuery == 'undefined') var fbuilderjQuery = jQuery.noConflict( );</script>
833
  <script type='text/javascript' src='<?php echo plugins_url('js/jquery.validate.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>'></script>
183
  // Loads the admin resources
184
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_resources' ), 1 );
185
  }
186
+ $this->_define_shortcodes();
 
 
 
 
187
  } // End init
188
 
189
  /**
251
  add_menu_page( 'Calculated Fields Form Options', 'Calculated Fields Form', 'manage_options', 'cp_calculated_fields_form', array($this, 'admin_pages') );
252
 
253
  // Submenu options
254
+ add_submenu_page( 'cp_calculated_fields_form', 'Upgrade', 'Upgrade', 'manage_options', "cp_calculated_fields_form_sub3", array($this, 'admin_pages') );
255
 
256
+ add_submenu_page( 'cp_calculated_fields_form', 'Marketplace', 'Marketplace', 'manage_options', "cp_calculated_fields_form_sub5", array($this, 'admin_pages') );
257
 
258
+ add_submenu_page( 'cp_calculated_fields_form', 'Documentation', 'Documentation', 'manage_options', "cp_calculated_fields_form_sub2", array($this, 'admin_pages') );
259
 
260
+ add_submenu_page( 'cp_calculated_fields_form', 'Online Help', 'Online Help', 'manage_options', "cp_calculated_fields_form_sub4", array($this, 'admin_pages') );
261
  } // End admin_menu
262
 
263
  /**
328
  $admin_resources = admin_url( "admin.php?page=cp_calculated_fields_form&cp_cff_resources=admin" );
329
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script', $admin_resources, array("jquery","jquery-ui-core","jquery-ui-sortable","jquery-ui-tabs","jquery-ui-droppable","jquery-ui-button", "jquery-ui-accordion","jquery-ui-datepicker","query-stringify") );
330
  wp_enqueue_script( 'cp_calculatedfieldsf_builder_script_caret', plugins_url('/js/jquery.caret.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH),array("jquery"));
331
+ wp_enqueue_style('cp_calculatedfieldsf_builder_style', plugins_url('/css/style.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH), array(), CP_CALCULATEDFIELDSF_VERSION);
332
  wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
333
  }
334
  // Checks if it is to an external page
338
  array(
339
  'cp_calculated_fields_form_sub2',
340
  'cp_calculated_fields_form_sub3',
341
+ 'cp_calculated_fields_form_sub4',
342
+ 'cp_calculated_fields_form_sub5'
343
  )
344
  )
345
  )
356
  case 'cp_calculated_fields_form_sub4':
357
  $cpcff_redirect['url'] = 'https://wordpress.org/support/plugin/calculated-fields-form#new-post';
358
  break;
359
+ case 'cp_calculated_fields_form_sub5':
360
+ $cpcff_redirect['url'] = 'https://cff-bundles.dwbooster.com';
361
+ break;
362
  }
363
  wp_enqueue_script('cp_calculatedfieldsf_redirect_script', plugins_url('/js/redirect_script.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH));
364
  wp_localize_script(
805
  {
806
  $this->_are_resources_loaded = true; // Resources loaded
807
 
808
+ $includes_url = includes_url();
809
 
810
+ // Used for compatibility with old versions of WordPress
811
+ $prefix_ui = (@file_exists(CP_CALCULATEDFIELDSF_BASE_PATH.'/../../../wp-includes/js/jquery/ui/jquery.ui.core.min.js')) ? 'jquery.ui.' : '';
 
 
 
812
 
813
  if(!wp_script_is('jquery', 'done'))
814
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/jquery.js"></script>';
815
  if(!wp_script_is('jquery-ui-core', 'done'))
816
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'core.min.js"></script>';
817
  if(!wp_script_is('jquery-ui-datepicker', 'done'))
818
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'datepicker.min.js"></script>';
819
  if(!wp_script_is('jquery-ui-widget', 'done'))
820
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'widget.min.js"></script>';
821
  if(!wp_script_is('jquery-ui-position', 'done'))
822
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'position.min.js"></script>';
823
  if(!wp_script_is('jquery-ui-tooltip', 'done'))
824
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'tooltip.min.js"></script>';
825
  if(!wp_script_is('jquery-ui-mouse', 'done'))
826
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'mouse.min.js"></script>';
827
  if(!wp_script_is('jquery-ui-slider', 'done'))
828
+ print '<script type="text/javascript" src="'.$includes_url.'js/jquery/ui/'.$prefix_ui.'slider.min.js"></script>';
829
  ?>
830
  <script>if( typeof fbuilderjQuery == 'undefined') var fbuilderjQuery = jQuery.noConflict( );</script>
831
  <script type='text/javascript' src='<?php echo plugins_url('js/jquery.validate.js', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH); ?>'></script>
js/fbuilder-pro-admin.jquery.js CHANGED
@@ -135,6 +135,7 @@
135
  $('#tabs-2').html( items[id].showAllSettings() );
136
  } catch (e) {}
137
  items[id].editItemEvents();
 
138
  };
139
 
140
  $.fbuilder[ 'removeItem' ] = function( index )
@@ -575,16 +576,16 @@
575
  template += '<option value="'+$.fbuilder.showSettings.formTemplateDic[i].prefix+'" ' + selected + '>'+$.fbuilder.showSettings.formTemplateDic[i].title+'</option>';
576
  }
577
 
578
- str += '<div><label>Form Name</label><input class="large" name="fTitle" id="fTitle" value="'+$.fbuilder.htmlEncode(this.title)+'" /></div><div><label>Description</label><textarea class="large" name="fDescription" id="fDescription">'+this.description+'</textarea></div><div><label>Label Placement</label><br /><select name="fLayout" id="fLayout" class="large">'+layout+'</select></div><div><label><input type="checkbox" name="fAutocomplete" id="fAutocomplete" '+( ( this.autocomplete ) ? 'CHECKED' : '' )+' /> Enable autocompletion</label></div><div><label><input type="checkbox" name="fPersistence" id="fPersistence" '+( ( this.persistence ) ? 'CHECKED' : '' )+' /> Enable the browser\'s persistence (the data are stored locally on browser)</label></div>';
579
 
580
  if(typeof $.fbuilder.controls[ 'fCalculated' ] != 'undefined')
581
  {
582
  str += '<div><label><input type="checkbox" name="fEvalEquations" id="fEvalEquations" '+( ( this.evalequations ) ? 'CHECKED' : '' )+' /> Eval dynamically the equations associated to the calculated fields</label></div>';
583
 
584
- str += '<div class="groupBox"><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="1" '+( ( this.evalequationsevent == 1 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange events</label><br /><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="2" '+( ( 'undefined' == typeof this.evalequationsevent || this.evalequationsevent == 2 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange and keyup events</label></div>';
585
  }
586
 
587
- str += '<div><label>Form Template</label><br /><select name="fTemplate" id="fTemplate" class="large">'+template+'</select></div><br /><div style="text-align:center"><span id="fTemplateThumbnail">'+thumbnail+'</span><div></div><span id="fTemplateDescription">'+description+'</span></div><div class="cff-editor-container"><label style="display:block;"><div class="cff-editor-extend-shrink"></div>Customize Form Design <i>(Enter the CSS rules. <a href="http://cff.dwbooster.com/faq#q82" target="_blank">More information</a>)</i></label><br /><textarea id="fCustomStyles" style="width:100%;height:150px;">'+this.customstyles+'</textarea></div>' ;
588
 
589
  return str;
590
  }
@@ -819,7 +820,7 @@
819
  formTemplateDic: {}, // Form Template dictionary
820
  showFieldType: function( v )
821
  {
822
- return '<label>Field Type: '+$.fbuilder[ 'getNameByIdFromType' ]( v )+'</label><br /><br />';
823
  },
824
  showTitle: function(v)
825
  {
@@ -836,23 +837,23 @@
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
  {
843
- return '<div><label>Equal to [<a class="helpfbuilder" text="Use this field to create password confirmation field or email confirmation fields.\n\nSpecify this setting ONLY into the confirmation field, not in the original field.">help?</a>]</label><br /><select class="equalTo" name="sEqualTo" id="sEqualTo" dvalue="'+v+'" dname="'+name+'"></select></div>';
844
  },
845
  showRequired: function(v)
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>';
856
  },
857
  showSize: function(v)
858
  {
@@ -861,7 +862,7 @@
861
  {
862
  str += '<option value="'+this.sizeList[i].id+'" '+((this.sizeList[i].id==v)?"selected":"")+'>'+this.sizeList[i].name+'</option>';
863
  }
864
- return '<label>Field Size</label><br /><select name="sSize" id="sSize">'+str+'</select>';
865
  },
866
  showLayout: function(v)
867
  {
@@ -870,11 +871,11 @@
870
  {
871
  str += '<option value="'+this.layoutList[i].id+'" '+((this.layoutList[i].id==v)?"selected":"")+'>'+this.layoutList[i].name+'</option>';
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
  {
135
  $('#tabs-2').html( items[id].showAllSettings() );
136
  } catch (e) {}
137
  items[id].editItemEvents();
138
+ setTimeout(function(){try{$('#tabs-2 .choicesSet select:visible, #tabs-2 .cf_dependence_field:visible, #tabs-2 #sSelectedField, #tabs-2 #sFieldList').chosen();}catch(e){}}, 50);
139
  };
140
 
141
  $.fbuilder[ 'removeItem' ] = function( index )
576
  template += '<option value="'+$.fbuilder.showSettings.formTemplateDic[i].prefix+'" ' + selected + '>'+$.fbuilder.showSettings.formTemplateDic[i].title+'</option>';
577
  }
578
 
579
+ str += '<div><label>Form Name</label><input class="large" name="fTitle" id="fTitle" value="'+$.fbuilder.htmlEncode(this.title)+'" /></div><div><label>Description</label><textarea class="large" name="fDescription" id="fDescription">'+this.description+'</textarea></div><div><label>Label Placement</label><select name="fLayout" id="fLayout" class="large">'+layout+'</select></div><div><label><input type="checkbox" name="fAutocomplete" id="fAutocomplete" '+( ( this.autocomplete ) ? 'CHECKED' : '' )+' /> Enable autocompletion</label></div><div><label><input type="checkbox" name="fPersistence" id="fPersistence" '+( ( this.persistence ) ? 'CHECKED' : '' )+' /> Enable the browser\'s persistence (the data are stored locally on browser)</label></div>';
580
 
581
  if(typeof $.fbuilder.controls[ 'fCalculated' ] != 'undefined')
582
  {
583
  str += '<div><label><input type="checkbox" name="fEvalEquations" id="fEvalEquations" '+( ( this.evalequations ) ? 'CHECKED' : '' )+' /> Eval dynamically the equations associated to the calculated fields</label></div>';
584
 
585
+ str += '<div class="groupBox"><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="1" '+( ( this.evalequationsevent == 1 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange events</label><label><input type="radio" name="fEvalEquationsEvent" name="fEvalEquationsEvent" value="2" '+( ( 'undefined' == typeof this.evalequationsevent || this.evalequationsevent == 2 ) ? 'CHECKED' : '' )+' /> Eval the equations in the onchange and keyup events</label></div>';
586
  }
587
 
588
+ str += '<div><label>Form Template</label><select name="fTemplate" id="fTemplate" class="large">'+template+'</select></div><div style="text-align:center;padding:10px 0;"><span id="fTemplateThumbnail">'+thumbnail+'</span><div></div><span id="fTemplateDescription">'+description+'</span></div><div class="cff-editor-container"><label><div class="cff-editor-extend-shrink"></div>Customize Form Design <i>(Enter the CSS rules. <a href="http://cff.dwbooster.com/faq#q82" target="_blank">More information</a>)</i></label><textarea id="fCustomStyles" style="width:100%;height:150px;">'+this.customstyles+'</textarea></div>' ;
589
 
590
  return str;
591
  }
820
  formTemplateDic: {}, // Form Template dictionary
821
  showFieldType: function( v )
822
  {
823
+ return '<label><b>Field Type: '+$.fbuilder[ 'getNameByIdFromType' ]( v )+'</b></label>';
824
  },
825
  showTitle: function(v)
826
  {
837
  },
838
  showPredefined: function(v,c)
839
  {
840
+ 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><label><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+((c)?"checked":"")+' value="1" > Use predefined value as placeholder.</label></div>';
841
  },
842
  showEqualTo: function(v,name)
843
  {
844
+ return '<div><label>Equal to [<a class="helpfbuilder" text="Use this field to create password confirmation field or email confirmation fields.\n\nSpecify this setting ONLY into the confirmation field, not in the original field.">help?</a>]</label><select class="equalTo" name="sEqualTo" id="sEqualTo" dvalue="'+v+'" dname="'+name+'"></select></div>';
845
  },
846
  showRequired: function(v)
847
  {
848
+ return '<label><input type="checkbox" name="sRequired" id="sRequired" '+((v)?"checked":"")+'>Required</label>';
849
  },
850
  showExclude: function(v)
851
  {
852
+ return '<label><input type="checkbox" name="sExclude" id="sExclude" '+((v)?"checked":"")+'>Exclude from submission</label>';
853
  },
854
  showReadonly: function(v)
855
  {
856
+ return '<label><input type="checkbox" name="sReadonly" id="sReadonly" '+((v)?"checked":"")+'>Read Only</label>';
857
  },
858
  showSize: function(v)
859
  {
862
  {
863
  str += '<option value="'+this.sizeList[i].id+'" '+((this.sizeList[i].id==v)?"selected":"")+'>'+this.sizeList[i].name+'</option>';
864
  }
865
+ return '<label>Field Size</label><select name="sSize" id="sSize">'+str+'</select>';
866
  },
867
  showLayout: function(v)
868
  {
871
  {
872
  str += '<option value="'+this.layoutList[i].id+'" '+((this.layoutList[i].id==v)?"selected":"")+'>'+this.layoutList[i].name+'</option>';
873
  }
874
+ return '<label>Field Layout</label><select name="sLayout" id="sLayout">'+str+'</select>';
875
  },
876
  showUserhelp: function(v,c,i)
877
  {
878
+ return '<label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+v+'</textarea><label class="column"><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+((c)?"checked":"")+' value="1" > Show as floating tooltip&nbsp;&nbsp;</label><label class="column"><input type="checkbox" name="sTooltipIcon" id="sTooltipIcon" '+((i)?"checked":"")+' value="1" > Display on icon</label><div class="clearer"></div>';
879
  },
880
  showCsslayout: function(v)
881
  {
js/fbuilder-pro-public.jquery.js CHANGED
@@ -204,14 +204,15 @@
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);
@@ -219,6 +220,7 @@
219
  catch(err){}
220
  }
221
 
 
222
  $.fbuilder.showHideDep({'formIdentifier' : o.identifier});
223
  }
224
  }
@@ -404,7 +406,10 @@
404
  $.post( url, data, function( data ){ if(typeof console != 'undefined' )console.log( data ); } );
405
  }
406
 
407
- // Set Captcha Event
 
 
 
408
  $( document ).on( 'click', '#fbuilder .captcha img', function(){ var e = $( this ); e.attr( 'src', e.attr( 'src' ).replace( /&\d+$/, '' ) + '&' + Math.floor( Math.random()*1000 ) ); } );
409
  $( form_tag ).find( '.captcha img' ).click();
410
 
@@ -531,6 +536,7 @@
531
  theForm = new fform();
532
  theForm = $.extend(theForm,d[1][0]);
533
 
 
534
  opt.cached = (typeof d[ 1 ][ 'cached' ] != 'undefined' && d[ 1 ][ 'cached' ] ) ? true : false;
535
  opt.setCache = (!this.cached && typeof d[ 1 ][ 'setCache' ] != 'undefined' && d[ 1 ][ 'setCache' ]) ? true : false;
536
 
204
  {
205
  var $ = fbuilderjQuery,
206
  id = o.identifier.replace(/[^\d]/g, ''),
207
+ item, data, formObj, f;
208
 
209
  if(id in cpcff_default)
210
  {
211
  data = cpcff_default[id];
212
  id = '_'+id;
213
  formObj = $.fbuilder['forms'][id];
214
+ f = $('#'+formObj['formId']);
215
+ f.attr('data-evalequations',0);
216
  for( var fieldId in data )
217
  {
218
  item = formObj.getItem(fieldId+id);
220
  catch(err){}
221
  }
222
 
223
+ f.attr('data-evalequations',o.evalequations);
224
  $.fbuilder.showHideDep({'formIdentifier' : o.identifier});
225
  }
226
  }
406
  $.post( url, data, function( data ){ if(typeof console != 'undefined' )console.log( data ); } );
407
  }
408
 
409
+ // Set icon event
410
+ jQuery(document).on('click', '.cff-help-icon', function(evt){evt.stopPropagation(); evt.preventDefault();});
411
+
412
+ // Set Captcha Event
413
  $( document ).on( 'click', '#fbuilder .captcha img', function(){ var e = $( this ); e.attr( 'src', e.attr( 'src' ).replace( /&\d+$/, '' ) + '&' + Math.floor( Math.random()*1000 ) ); } );
414
  $( form_tag ).find( '.captcha img' ).click();
415
 
536
  theForm = new fform();
537
  theForm = $.extend(theForm,d[1][0]);
538
 
539
+ opt.evalequations = d[1][0][ 'evalequations' ];
540
  opt.cached = (typeof d[ 1 ][ 'cached' ] != 'undefined' && d[ 1 ][ 'cached' ] ) ? true : false;
541
  opt.setCache = (!this.cached && typeof d[ 1 ][ 'setCache' ] != 'undefined' && d[ 1 ][ 'setCache' ]) ? true : false;
542
 
js/fields-admin/01_fbuilder.ftext.js CHANGED
@@ -25,7 +25,7 @@
25
  regExpMssg:"",
26
  display:function()
27
  {
28
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
29
  },
30
  editItemEvents:function()
31
  {
@@ -56,6 +56,6 @@
56
  },
57
  showSpecialDataInstance: function()
58
  {
59
- return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /></div><div><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" /></div>';
60
  }
61
  });
25
  regExpMssg:"",
26
  display:function()
27
  {
28
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
29
  },
30
  editItemEvents:function()
31
  {
56
  },
57
  showSpecialDataInstance: function()
58
  {
59
+ return '<div class="column"><label>Min length/characters</label><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer" /><div><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /></div><div><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" /></div>';
60
  }
61
  });
js/fields-admin/02_fbuilder.fcurrency.js CHANGED
@@ -71,7 +71,7 @@
71
  },
72
  display:function()
73
  {
74
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.getPredefinedValue())+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
75
  },
76
  editItemEvents:function()
77
  {
@@ -96,16 +96,16 @@
96
  },
97
  showCurrencyFormat: function()
98
  {
99
- var str = '<div><label>Currency Symbol</label><br /><input type="text" name="sCurrencySymbol" id="sCurrencySymbol" value="'+$.fbuilder.htmlEncode(this.currencySymbol)+'" class="large"></div>';
100
- str += '<div><label>Currency</label><br /><input type="text" name="sCurrencyText" id="sCurrencyText" value="'+$.fbuilder.htmlEncode(this.currencyText)+'" class="large"></div>';
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()
108
  {
109
- return '<div class="clearer"></div><div class="column"><label>Min</label><br /><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div class="clearer" style="margin-bottom:10px;">Enter the min/max values as numbers, and not as currencies.<br /><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
110
  }
111
  });
71
  },
72
  display:function()
73
  {
74
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.getPredefinedValue())+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
75
  },
76
  editItemEvents:function()
77
  {
96
  },
97
  showCurrencyFormat: function()
98
  {
99
+ var str = '<label>Currency Symbol</label><input type="text" name="sCurrencySymbol" id="sCurrencySymbol" value="'+$.fbuilder.htmlEncode(this.currencySymbol)+'" class="large">';
100
+ str += '<label>Currency</label><input type="text" name="sCurrencyText" id="sCurrencyText" value="'+$.fbuilder.htmlEncode(this.currencyText)+'" class="large">';
101
+ str += '<label>Thousands Separator</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" value="'+$.fbuilder.htmlEncode(this.thousandSeparator)+'" class="large">';
102
+ str += '<label>Cents Separator</label><input type="text" name="sCentSeparator" id="sCentSeparator" value="'+$.fbuilder.htmlEncode(this.centSeparator)+'" class="large">';
103
+ str += '<label><input type="checkbox" name="sNoCents" id="sNoCents" '+( (this.noCents) ? 'CHECKED' : '')+'> Do Not Allow Cents</label>';
104
+ str += '<label class="column width50"><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+( (this.formatDynamically) ? 'CHECKED' : '')+'> Format Dynamically to&nbsp;</label><label class="column width50"><input type="checkbox" name="sTwoDecimals" id="sTwoDecimals" '+( (this.twoDecimals) ? 'CHECKED' : '')+'> two decimal places</label><div class="clearer" />';
105
  return str;
106
  },
107
  showRangeIntance: function()
108
  {
109
+ return '<div><div class="column width50"><label>Min</label><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" class="large"></div><div class="column width50"><label>Max</label><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" class="large"></div><div class="clearer" style="margin-bottom:10px;">Enter the min/max values as numbers, and not as currencies.<br /><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div></div>';
110
  }
111
  });
js/fields-admin/02_fbuilder.fnumber.js CHANGED
@@ -27,7 +27,7 @@
27
  formats:new Array("digits","number", "percent"),
28
  display:function()
29
  {
30
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
31
  },
32
  editItemEvents:function()
33
  {
@@ -55,10 +55,10 @@
55
 
56
  str += '<option value="'+this.formats[i]+'" '+((this.formats[i]==this.dformat)?"selected":"")+'>'+this.formats[i]+'</option>';
57
  }
58
- return '<div><label>Number Format</label><br /><select name="sFormat" id="sFormat">'+str+'</select></div><div class="fnumber-symbols" '+( (this.dformat == 'digits') ? 'style="display:none;"' : '' )+'><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(this.decimalSymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode(this.thousandSeparator)+'" /><label>Format Dynamically</label><br /><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+( (this.formatDynamically) ? 'CHECKED' : '')+'></div>';
59
  },
60
  showRangeIntance: function()
61
  {
62
- return '<div class="column"><label>Min</label><br /><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'"></div><div class="column"><label>Max</label><br /><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'"></div><div style="margin-bottom:10px;" class="clearer"><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
63
  }
64
  });
27
  formats:new Array("digits","number", "percent"),
28
  display:function()
29
  {
30
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
31
  },
32
  editItemEvents:function()
33
  {
55
 
56
  str += '<option value="'+this.formats[i]+'" '+((this.formats[i]==this.dformat)?"selected":"")+'>'+this.formats[i]+'</option>';
57
  }
58
+ return '<div><label>Number Format</label><select name="sFormat" id="sFormat">'+str+'</select></div><div class="fnumber-symbols" '+( (this.dformat == 'digits') ? 'style="display:none;"' : '' )+'><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(this.decimalSymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode(this.thousandSeparator)+'" /><label><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+( (this.formatDynamically) ? 'CHECKED' : '')+'> Format Dynamically</label></div>';
59
  },
60
  showRangeIntance: function()
61
  {
62
+ return '<div class="column width50"><label>Min</label><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" class="large"></div><div class="column width50"><label>Max</label><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" class="large"></div><div class="clearer"><i>It is possible to associate other fields in the form to the attributes "min" and "max". Ex: fieldname1</i></div>';
63
  }
64
  });
js/fields-admin/02_fbuilder.fslider.js CHANGED
@@ -20,6 +20,7 @@
20
  size:"small",
21
  thousandSeparator:",",
22
  centSeparator:".",
 
23
  min:0,
24
  max:100,
25
  step:1,
@@ -28,40 +29,41 @@
28
  minCaption:"",
29
  maxCaption:"",
30
  display:function()
31
- {
32
- 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><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+( ( !this.range ) ? $.fbuilder.htmlEncode( this.predefined ) : $.fbuilder.htmlEncode( '['+this.predefinedMin+','+this.predefinedMax+']' ) )+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
33
- },
34
  editItemEvents:function()
35
- {
36
- var evt = [
37
- {s:"#sSize",e:"change", l:"size"},
38
- {s:"#sMin",e:"change keyup", l:"min"},
39
- {s:"#sMax",e:"change keyup", l:"max"},
40
- {s:"#sStep",e:"change keyup", l:"step"},
41
- {s:"#sRange",e:"change", l:"range", f:function(el){
42
- var v = el.is(':checked');
43
- $( 'div.range' )[ ( v ) ? 'show' : 'hide' ]();
44
- $( 'div.no-range' )[ ( v ) ? 'hide' : 'show' ]();
45
- return v;
46
- }
47
- },
48
- {s:"#sCaption",e:"change keyup", l:"caption"},
49
- {s:"#sMinCaption",e:"change keyup", l:"minCaption"},
50
- {s:"#sMaxCaption",e:"change keyup", l:"maxCaption"},
51
- {s:"#sPredefinedMin",e:"change keyup", l:"predefinedMin"},
52
- {s:"#sPredefinedMax",e:"change keyup", l:"predefinedMax"},
53
- {s:"#sThousandSeparator",e:"change keyup", l:"thousandSeparator"},
54
- {s:"#sCentSeparator",e:"change keyup", l:"centSeparator"}
55
- ];
56
- $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this, evt);
57
- },
58
- showRequired: function(){ return ''; },
 
59
  showPredefined: function()
60
- {
61
- return '<div class="no-range" style="display:'+( ( this.range ) ? 'none' : 'block')+';"><label>Predefined Value</label><input type="text" class="large" name="sPredefined" id="sPredefined" value="'+$.fbuilder.htmlEncode( this.predefined )+'"></div><div class="range" style="display:'+( ( this.range ) ? 'block' : 'none')+';"><div class="column"><label>Predefined Min</label><br /><input type="text" name="sPredefinedMin" id="sPredefinedMin" value="'+$.fbuilder.htmlEncode( this.predefinedMin )+'" style="width:95%;"></div><div class="column"><label>Predefined Max</label><br /><input type="text" name="sPredefinedMax" id="sPredefinedMax" value="'+$.fbuilder.htmlEncode( this.predefinedMax )+'" style="width:95%;"></div><div class="clearer"></div></div>';
62
- },
63
  showRangeIntance: function()
64
- {
65
- return '<div><div class="column" style="width:30%;"><label>Min</label><br /><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" placeholder="0 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Max</label><br /><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" placeholder="100 by default" style="width:95%;"></div><div class="column" style="width:30%;"><label>Step</label><br /><input type="text" name="sStep" id="sStep" value="'+$.fbuilder.htmlEncode(this.step)+'" placeholder="1 by default" style="width:95%;"></div><div class="clearer"></div></div><div style="margin-bottom:10px;"><i>It is possible to associate other fields in the form with the attributes "min", "max" and "step". Ex: fieldname1</i></div><div><input type="checkbox" name="sRange" id="sRange" '+( ( this.range ) ? 'CHECKED' : '' )+' /> Range slider </div><div><label>Field Caption</label><br /><input class="large" type="text" name="sCaption" id="sCaption" value="'+$.fbuilder.htmlEncode( this.caption )+'"></div><div><label>Min Corner Caption</label><br /><input class="large" type="text" name="sMinCaption" id="sMinCaption" value="'+$.fbuilder.htmlEncode( this.minCaption )+'"></div><div><label>Max Corner Caption</label><br /><input class="large" type="text" name="sMaxCaption" id="sMaxCaption" value="'+$.fbuilder.htmlEncode( this.maxCaption )+'"></div><div><label>Symbol for grouping thousands in the field\'s caption(Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.thousandSeparator )+'" /></div><div><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sCentSeparator" id="sCentSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.centSeparator )+'" /></div>';
66
- }
67
  });
20
  size:"small",
21
  thousandSeparator:",",
22
  centSeparator:".",
23
+ typeValues:false,
24
  min:0,
25
  max:100,
26
  step:1,
29
  minCaption:"",
30
  maxCaption:"",
31
  display:function()
32
+ {
33
+ 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><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+( ( !this.range ) ? $.fbuilder.htmlEncode( this.predefined ) : $.fbuilder.htmlEncode( '['+this.predefinedMin+','+this.predefinedMax+']' ) )+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
34
+ },
35
  editItemEvents:function()
36
+ {
37
+ var evt = [
38
+ {s:"#sSize",e:"change", l:"size"},
39
+ {s:"#sTypeValues",e:"click", l:"typeValues", f:function(el){return el.is(':checked');}},
40
+ {s:"#sMin",e:"change keyup", l:"min"},
41
+ {s:"#sMax",e:"change keyup", l:"max"},
42
+ {s:"#sStep",e:"change keyup", l:"step"},
43
+ {s:"#sRange",e:"change", l:"range", f:function(el){
44
+ var v = el.is(':checked');
45
+ $( 'div.range' )[ ( v ) ? 'show' : 'hide' ]();
46
+ $( 'div.no-range' )[ ( v ) ? 'hide' : 'show' ]();
47
+ return v;
48
+ }
49
+ },
50
+ {s:"#sCaption",e:"change keyup", l:"caption"},
51
+ {s:"#sMinCaption",e:"change keyup", l:"minCaption"},
52
+ {s:"#sMaxCaption",e:"change keyup", l:"maxCaption"},
53
+ {s:"#sPredefinedMin",e:"change keyup", l:"predefinedMin"},
54
+ {s:"#sPredefinedMax",e:"change keyup", l:"predefinedMax"},
55
+ {s:"#sThousandSeparator",e:"change keyup", l:"thousandSeparator"},
56
+ {s:"#sCentSeparator",e:"change keyup", l:"centSeparator"}
57
+ ];
58
+ $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this, evt);
59
+ },
60
+ showRequired: function(){ return '<label><input type="checkbox" name="sTypeValues" id="sTypeValues" '+( (this.typeValues) ? 'CHECKED' : '')+'> Allow to type the values</label>'; },
61
  showPredefined: function()
62
+ {
63
+ return '<div class="no-range" style="display:'+( ( this.range ) ? 'none' : 'block')+';"><label>Predefined Value</label><input type="text" class="large" name="sPredefined" id="sPredefined" value="'+$.fbuilder.htmlEncode( this.predefined )+'"></div><div class="range" style="display:'+( ( this.range ) ? 'block' : 'none')+';"><div class="column width50"><label>Predefined Min</label><input type="text" name="sPredefinedMin" id="sPredefinedMin" value="'+$.fbuilder.htmlEncode( this.predefinedMin )+'" class="large"></div><div class="column width50"><label>Predefined Max</label><input type="text" name="sPredefinedMax" id="sPredefinedMax" value="'+$.fbuilder.htmlEncode( this.predefinedMax )+'" class="large"></div></div><div class="clearer" />';
64
+ },
65
  showRangeIntance: function()
66
+ {
67
+ return '<div><div class="column width30"><label>Min</label><input type="text" name="sMin" id="sMin" value="'+$.fbuilder.htmlEncode(this.min)+'" placeholder="0 by default" class="large"></div><div class="column width30"><label>Max</label><input type="text" name="sMax" id="sMax" value="'+$.fbuilder.htmlEncode(this.max)+'" placeholder="100 by default" class="large"></div><div class="column width30"><label>Step</label><input type="text" name="sStep" id="sStep" value="'+$.fbuilder.htmlEncode(this.step)+'" placeholder="1 by default" class="large"></div><div class="clearer" /></div><div style="margin-bottom:10px;"><i>It is possible to associate other fields in the form with the attributes "min", "max" and "step". Ex: fieldname1</i></div><div><input type="checkbox" name="sRange" id="sRange" '+( ( this.range ) ? 'CHECKED' : '' )+' /> Range slider </div><div><label>Field Caption</label><input class="large" type="text" name="sCaption" id="sCaption" value="'+$.fbuilder.htmlEncode( this.caption )+'"></div><div><label>Min Corner Caption</label><input class="large" type="text" name="sMinCaption" id="sMinCaption" value="'+$.fbuilder.htmlEncode( this.minCaption )+'"></div><div><label>Max Corner Caption</label><input class="large" type="text" name="sMaxCaption" id="sMaxCaption" value="'+$.fbuilder.htmlEncode( this.maxCaption )+'"></div><div><label>Symbol for grouping thousands in the field\'s caption(Ex: 3,000,000)</label><input type="text" name="sThousandSeparator" id="sThousandSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.thousandSeparator )+'" /></div><div><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sCentSeparator" id="sCentSeparator" class="large" value="'+$.fbuilder.htmlEncode( this.centSeparator )+'" /></div>';
68
+ }
69
  });
js/fields-admin/03_fbuilder.femail.js CHANGED
@@ -19,14 +19,18 @@
19
  readonly:false,
20
  size:"medium",
21
  equalTo:"",
 
 
22
  display:function()
23
  {
24
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
25
  },
26
  editItemEvents:function()
27
  {
28
  var evt = [
29
  {s:"#sSize",e:"change", l:"size"},
 
 
30
  {s:"#sEqualTo",e:"change", l:"equalTo"}
31
  ],
32
  items = this.fBuild.getItems();
@@ -49,7 +53,7 @@
49
  },
50
  showSpecialDataInstance: function()
51
  {
52
- var str = "";
53
  return str;
54
  }
55
  });
19
  readonly:false,
20
  size:"medium",
21
  equalTo:"",
22
+ regExp:"",
23
+ regExpMssg:"",
24
  display:function()
25
  {
26
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
27
  },
28
  editItemEvents:function()
29
  {
30
  var evt = [
31
  {s:"#sSize",e:"change", l:"size"},
32
+ {s:"#sRegExp",e:"change keyup", l:"regExp"},
33
+ {s:"#sRegExpMssg",e:"change keyup", l:"regExpMssg"},
34
  {s:"#sEqualTo",e:"change", l:"equalTo"}
35
  ],
36
  items = this.fBuild.getItems();
53
  },
54
  showSpecialDataInstance: function()
55
  {
56
+ var str = '<div><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /></div><div><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" /></div>';
57
  return str;
58
  }
59
  });
js/fields-admin/04_fbuilder.fdate.js CHANGED
@@ -52,7 +52,7 @@
52
  {
53
  var me = this,
54
  dformat = me.dformat.replace(/\//g, me.dseparator);
55
- return '<div class="fields '+me.name+'" id="field'+me.form_identifier+'-'+me.index+'" title="'+me.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>'+me.title+''+((me.required)?"*":"")+' ('+dformat+')</label><div class="dfield"><input class="field disabled '+me.size+'" type="text" value="'+$.fbuilder.htmlEncode(me.predefined)+'"/><span class="uh">'+me.userhelp+'</span></div><div class="clearer"></div></div>';
56
  },
57
  editItemEvents:function()
58
  {
@@ -108,36 +108,41 @@
108
  for (var i in me.separators)
109
  separatorOpts += '<option value="'+me.separators[i]+'" '+((me.separators[i]==me.dseparator)?"selected":"")+'>'+me.separators[i]+'</option>';
110
 
111
- return '<hr></hr><div><input type="checkbox" name="sShowDatepicker" id="sShowDatepicker" '+( ( me.showDatepicker ) ? 'CHECKED' : '' )+' > <label>Show input field for the date</label></div><div class="width50 column"><label>Date Format</label><br /><select name="sFormat" id="sFormat" class="width100">'+formatOpts+'</select></div><div class="width50 columnr"><label>Parts separator</label><br /><select name="sSeparator" id="sSeparator" class="width100">'+separatorOpts+'</select></div>';
112
  },
113
  showSpecialDataInstance: function()
114
  {
115
- var str = "";
116
- str += '<div><label>Default date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: Leave empty for current date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sDefaultDate" id="sDefaultDate" value="'+$.fbuilder.htmlEncode(this.defaultDate)+'" /></div>';
117
- str += '<div><label>Min date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No min Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sMinDate" id="sMinDate" value="'+$.fbuilder.htmlEncode(this.minDate)+'" /></div>';
118
- str += '<div><label>Max date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No max Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><br /><input type="text" class="large" name="sMaxDate" id="sMaxDate" value="'+$.fbuilder.htmlEncode(this.maxDate)+'" /></div>';
119
- str += '<div><label>Invalid Dates [<a class="helpfbuilder" text="To define some dates as invalid, enter the dates with the format: mm/dd/yyyy separated by comma; for example: 12/31/2014,02/20/2014 or by hyphen for intervals; for example: 12/20/2014-12/28/2014 ">help?</a>]</label><br /><input type="text" class="large" name="sInvalidDates" id="sInvalidDates" value="'+$.fbuilder.htmlEncode(this.invalidDates)+'" /></div>';
120
- str += '<div><input type="checkbox" name="sShowDropdown" id="sShowDropdown" '+((this.showDropdown)?"checked":"")+'/><label>Show Dropdown Year and Month</label><div id="divdropdownRange" style="display:'+((this.showDropdown)?"":"none")+'">Year Range [<a class="helpfbuilder" text="The range of years displayed in the year drop-down: either relative to today\'s year (&quot;-nn:+nn&quot;), absolute (&quot;nnnn:nnnn&quot;), or combinations of these formats (&quot;nnnn:-nn&quot;)">help?</a>]: <input type="text" name="sDropdownRange" id="sDropdownRange" value="'+$.fbuilder.htmlEncode(this.dropdownRange)+'"/></div></div>';
121
- str += '<div class="working_dates"><label>Selectable dates </label><br /><input name="sWD0" id="sWD0" value="0" type="checkbox" '+((this.working_dates[0])?"checked":"")+'/>Su<input name="sWD1" id="sWD1" value="1" type="checkbox" '+((this.working_dates[1])?"checked":"")+'/>Mo<input name="sWD2" id="sWD2" value="2" type="checkbox" '+((this.working_dates[2])?"checked":"")+'/>Tu<input name="sWD3" id="sWD3" value="3" type="checkbox" '+((this.working_dates[3])?"checked":"")+'/>We<input name="sWD4" id="sWD4" value="4" type="checkbox" '+((this.working_dates[4])?"checked":"")+'/>Th<input name="sWD5" id="sWD5" value="5" type="checkbox" '+((this.working_dates[5])?"checked":"")+'/>Fr<input name="sWD6" id="sWD6" value="6" type="checkbox" '+((this.working_dates[6])?"checked":"")+'/>Sa</div>';
 
 
 
 
122
 
123
  // Fields for timepicker
124
- str += '<hr></hr>'
125
- str += '<div><input type="checkbox" name="sShowTimepicker" id="sShowTimepicker" '+( ( this.showTimepicker ) ? 'CHECKED' : '' )+' > <label>Include time</label></div>';
126
- str += '<div class="time-options" '+( ( !this.showTimepicker ) ? 'style="display:none;"': '' )+'>';
127
- str += '<div><label>Time Format</label><br /><label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="24" '+( ( this.tformat == 24 ) ? 'CHECKED' : '' )+' /> 24 hours</label> <label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="12" '+( ( this.tformat == 12 ) ? 'CHECKED' : '' )+' /> 12 hours</label></div>';
128
- str += '<div><label>Default Time HH:mm</label><br /><input type="text" class="large" name="sDefaultTime" id="sDefaultTime" value="'+$.fbuilder.htmlEncode(this.defaultTime)+'" /></div>';
129
- str += '<div class="width50 column"><label>Min Hour</label><br /><input type="text" class="large" name="sMinHour" id="sMinHour" value="'+$.fbuilder.htmlEncode(this.minHour)+'" /></div>';
130
- str += '<div class="width50 columnr"><label>Min Minutes</label><br /><input type="text" class="large" name="sMinMinute" id="sMinMinute" value="'+$.fbuilder.htmlEncode(this.minMinute)+'" /></div>';
131
- str += '<div class="width50 column"><label>Max Hour</label><br /><input type="text" class="large" name="sMaxHour" id="sMaxHour" value="'+$.fbuilder.htmlEncode(this.maxHour)+'" /></div>';
132
- str += '<div class="width50 columnr"><label>Max Minutes</label><br /><input type="text" class="large" name="sMaxMinute" id="sMaxMinute" value="'+$.fbuilder.htmlEncode(this.maxMinute)+'" /></div>';
133
-
134
- str += '<div><label>Steps for hours</label><br /><input type="text" class="large" name="sStepHour" id="sStepHour" value="'+$.fbuilder.htmlEncode(this.stepHour)+'" /></div>';
135
- str += '<div><label>Steps for minutes</label><br /><input type="text" class="large" name="sStepMinute" id="sStepMinute" value="'+$.fbuilder.htmlEncode(this.stepMinute)+'" /></div>';
136
- str += '<div><label>Label for hours in screen readers</label><br /><input type="text" class="large" name="sAriaHourLabel" id="sAriaHourLabel" value="'+$.fbuilder.htmlEncode(this.ariaHourLabel)+'" /></div>';
137
- str += '<div><label>Label for minutes in screen readers</label><br /><input type="text" class="large" name="sAriaMinuteLabel" id="sAriaMinuteLabel" value="'+$.fbuilder.htmlEncode(this.ariaMinuteLabel)+'" /></div>';
138
- str += '<div><label>Label for am/pm component in screen readers</label><br /><input type="text" class="large" name="sAriaAMPMLabel" id="sAriaAMPMLabel" value="'+$.fbuilder.htmlEncode(this.ariaAMPMLabel)+'" /></div>';
139
- str += '</div>';
140
- str += '<hr></hr>';
141
- return str;
 
142
  }
143
  });
52
  {
53
  var me = this,
54
  dformat = me.dformat.replace(/\//g, me.dseparator);
55
+ return '<div class="fields '+me.name+'" id="field'+me.form_identifier+'-'+me.index+'" title="'+me.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>'+me.title+''+((me.required)?"*":"")+' ('+dformat+')</label><div class="dfield"><input class="field disabled '+me.size+'" type="text" value="'+$.fbuilder.htmlEncode(me.predefined)+'"/><span class="uh">'+me.userhelp+'</span></div><div class="clearer" /></div>';
56
  },
57
  editItemEvents:function()
58
  {
108
  for (var i in me.separators)
109
  separatorOpts += '<option value="'+me.separators[i]+'" '+((me.separators[i]==me.dseparator)?"selected":"")+'>'+me.separators[i]+'</option>';
110
 
111
+ return '<hr></hr><label><input type="checkbox" name="sShowDatepicker" id="sShowDatepicker" '+( ( me.showDatepicker ) ? 'CHECKED' : '' )+' > Show input field for the date</label><div class="width50 column"><label>Date Format</label><select name="sFormat" id="sFormat" class="large">'+formatOpts+'</select></div><div class="width50 column"><label>Parts separator</label><select name="sSeparator" id="sSeparator" class="large">'+separatorOpts+'</select></div><div class="clearer" />';
112
  },
113
  showSpecialDataInstance: function()
114
  {
115
+ return '<label>Default date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: Leave empty for current date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><input type="text" class="large" name="sDefaultDate" id="sDefaultDate" value="'+$.fbuilder.htmlEncode(this.defaultDate)+'" />'+
116
+
117
+ '<label>Min date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No min Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><input type="text" class="large" name="sMinDate" id="sMinDate" value="'+$.fbuilder.htmlEncode(this.minDate)+'" />'+
118
+
119
+ '<label>Max date [<a class="helpfbuilder" text="You can put one of the following type of values into this field:\n\nEmpty: No max Date.\n\nDate: A Fixed date with the same date format indicated in the &quot;Date Format&quot; drop-down field.\n\nField Name: the name of another date field, Ex: fieldname1\n\nNumber: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.\n\nString: A smart text indicating a relative date. Relative dates must contain value (number) and period pairs; valid periods are &quot;y&quot; for years, &quot;m&quot; for months, &quot;w&quot; for weeks, and &quot;d&quot; for days. For example, &quot;+1m +7d&quot; represents one month and seven days from today.">help?</a>]</label><input type="text" class="large" name="sMaxDate" id="sMaxDate" value="'+$.fbuilder.htmlEncode(this.maxDate)+'" />'+
120
+
121
+ '<label>Invalid Dates [<a class="helpfbuilder" text="To define some dates as invalid, enter the dates with the format: mm/dd/yyyy separated by comma; for example: 12/31/2014,02/20/2014 or by hyphen for intervals; for example: 12/20/2014-12/28/2014 ">help?</a>]</label><input type="text" class="large" name="sInvalidDates" id="sInvalidDates" value="'+$.fbuilder.htmlEncode(this.invalidDates)+'" />'+
122
+
123
+ '<label><input type="checkbox" name="sShowDropdown" id="sShowDropdown" '+((this.showDropdown)?"checked":"")+'/> Show Dropdown Year and Month</label><div id="divdropdownRange" style="display:'+((this.showDropdown)?"":"none")+'">Year Range [<a class="helpfbuilder" text="The range of years displayed in the year drop-down: either relative to today\'s year (&quot;-nn:+nn&quot;), absolute (&quot;nnnn:nnnn&quot;), or combinations of these formats (&quot;nnnn:-nn&quot;)">help?</a>]: <input type="text" name="sDropdownRange" id="sDropdownRange" value="'+$.fbuilder.htmlEncode(this.dropdownRange)+'"/></div>'+
124
+
125
+ '<div class="working_dates"><label>Selectable dates </label><input name="sWD0" id="sWD0" value="0" type="checkbox" '+((this.working_dates[0])?"checked":"")+'/>Su<input name="sWD1" id="sWD1" value="1" type="checkbox" '+((this.working_dates[1])?"checked":"")+'/>Mo<input name="sWD2" id="sWD2" value="2" type="checkbox" '+((this.working_dates[2])?"checked":"")+'/>Tu<input name="sWD3" id="sWD3" value="3" type="checkbox" '+((this.working_dates[3])?"checked":"")+'/>We<input name="sWD4" id="sWD4" value="4" type="checkbox" '+((this.working_dates[4])?"checked":"")+'/>Th<input name="sWD5" id="sWD5" value="5" type="checkbox" '+((this.working_dates[5])?"checked":"")+'/>Fr<input name="sWD6" id="sWD6" value="6" type="checkbox" '+((this.working_dates[6])?"checked":"")+'/>Sa</div>'+
126
 
127
  // Fields for timepicker
128
+ '<hr></hr>'+
129
+ '<label><input type="checkbox" name="sShowTimepicker" id="sShowTimepicker" '+( ( this.showTimepicker ) ? 'CHECKED' : '' )+' > Include time</label>'+
130
+ '<div class="time-options" '+( ( !this.showTimepicker ) ? 'style="display:none;"': '' )+'>'+
131
+
132
+ '<label>Time Format</label><label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="24" '+( ( this.tformat == 24 ) ? 'CHECKED' : '' )+' /> 24 hours</label> <label><input type="radio" name="sTimeFormat" id="sTimeFormat" value="12" '+( ( this.tformat == 12 ) ? 'CHECKED' : '' )+' /> 12 hours</label>'+
133
+
134
+ '<label>Default Time HH:mm</label><input type="text" class="large" name="sDefaultTime" id="sDefaultTime" value="'+$.fbuilder.htmlEncode(this.defaultTime)+'" />'+
135
+ '<div class="width50 column"><label>Min Hour</label><input type="text" class="large" name="sMinHour" id="sMinHour" value="'+$.fbuilder.htmlEncode(this.minHour)+'" /></div>'+
136
+ '<div class="width50 columnr"><label>Min Minutes</label><input type="text" class="large" name="sMinMinute" id="sMinMinute" value="'+$.fbuilder.htmlEncode(this.minMinute)+'" /></div>'+
137
+ '<div class="width50 column"><label>Max Hour</label><input type="text" class="large" name="sMaxHour" id="sMaxHour" value="'+$.fbuilder.htmlEncode(this.maxHour)+'" /></div>'+
138
+ '<div class="width50 columnr"><label>Max Minutes</label><input type="text" class="large" name="sMaxMinute" id="sMaxMinute" value="'+$.fbuilder.htmlEncode(this.maxMinute)+'" /></div>'+
139
+
140
+ '<label>Steps for hours</label><input type="text" class="large" name="sStepHour" id="sStepHour" value="'+$.fbuilder.htmlEncode(this.stepHour)+'" />'+
141
+ '<label>Steps for minutes</label><input type="text" class="large" name="sStepMinute" id="sStepMinute" value="'+$.fbuilder.htmlEncode(this.stepMinute)+'" />'+
142
+ '<label>Label for hours in screen readers</label><input type="text" class="large" name="sAriaHourLabel" id="sAriaHourLabel" value="'+$.fbuilder.htmlEncode(this.ariaHourLabel)+'" />'+
143
+ '<label>Label for minutes in screen readers</label><input type="text" class="large" name="sAriaMinuteLabel" id="sAriaMinuteLabel" value="'+$.fbuilder.htmlEncode(this.ariaMinuteLabel)+'" />'+
144
+ '<label>Label for am/pm component in screen readers</label><input type="text" class="large" name="sAriaAMPMLabel" id="sAriaAMPMLabel" value="'+$.fbuilder.htmlEncode(this.ariaAMPMLabel)+'" />'+
145
+ '</div>'+
146
+ '<hr></hr>';
147
  }
148
  });
js/fields-admin/05_fbuilder.ftextarea.js CHANGED
@@ -23,7 +23,7 @@
23
  rows:4,
24
  display:function()
25
  {
26
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' class="field disabled '+this.size+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
27
  },
28
  editItemEvents:function()
29
  {
@@ -37,6 +37,6 @@
37
  },
38
  showSpecialDataInstance: function()
39
  {
40
- return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div><div><label>Number of rows</label><br><input type="text" name="sRows" id="sRows" value="'+$.fbuilder.htmlEncode(this.rows)+'" /></div><div class="clearer"></div>';
41
  }
42
  });
23
  rows:4,
24
  display:function()
25
  {
26
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><textarea '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' class="field disabled '+this.size+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
27
  },
28
  editItemEvents:function()
29
  {
37
  },
38
  showSpecialDataInstance: function()
39
  {
40
+ return '<div class="column width50"><label>Min length/characters</label><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'" class="large"></div><div class="column width50"><label>Max length/characters</label><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'" class="large"></div><div class="clearer" /><label>Number of rows</label><input type="text" name="sRows" id="sRows" value="'+$.fbuilder.htmlEncode(this.rows)+'" />';
41
  }
42
  });
js/fields-admin/06_fbuilder.fcheck.js CHANGED
@@ -35,7 +35,7 @@
35
  {
36
  str += '<div class="'+this.layout+'"><input class="field" disabled="true" type="checkbox" '+((this.choiceSelected[i])?"checked":"")+'/> '+$.fbuilder.htmlDecode(this.choices[i])+'</div>';
37
  }
38
- 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
39
  },
40
  editItemEvents:function()
41
  {
@@ -171,6 +171,7 @@
171
  $(this).html("Hide Dependencies");
172
  e.data.obj.showDep = true;
173
  }
 
174
  return false;
175
  });
176
  $('.dependencies').bind("change", {obj: this}, function(e)
@@ -206,12 +207,12 @@
206
  },
207
  attributeToSubmit: function()
208
  {
209
- return '<div class="choicesSet"><label>Value to Submit</label><br /><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer"></div></div>';
210
  },
211
  maxChoices: function()
212
  {
213
- return '<div><input type="number" name="sMax" value="'+(($.isNumeric(this.max) && 0<=this.max) ? this.max : '')+'" style="max-width:60px;" min="1" /> Maximum number of choices to be ticked.</div>'+
214
- '<div><input type="text" name="sMaxError" style="width:100%" value="'+$.fbuilder.htmlEncode($.fbuilder.htmlDecode(this.maxError))+'" placeholder="Max choices error messages" /></div>';
215
  },
216
  showChoiceIntance: function()
217
  {
@@ -247,6 +248,6 @@
247
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
248
  }
249
  }
250
- return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.maxChoices()+'</div>';
251
  }
252
  });
35
  {
36
  str += '<div class="'+this.layout+'"><input class="field" disabled="true" type="checkbox" '+((this.choiceSelected[i])?"checked":"")+'/> '+$.fbuilder.htmlDecode(this.choices[i])+'</div>';
37
  }
38
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
39
  },
40
  editItemEvents:function()
41
  {
171
  $(this).html("Hide Dependencies");
172
  e.data.obj.showDep = true;
173
  }
174
+ $.fbuilder.editItem(e.data.obj.index);
175
  return false;
176
  });
177
  $('.dependencies').bind("change", {obj: this}, function(e)
207
  },
208
  attributeToSubmit: function()
209
  {
210
+ return '<div class="choicesSet"><label>Value to Submit</label><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer" /></div>';
211
  },
212
  maxChoices: function()
213
  {
214
+ return '<label style="margin-bottom:10px;"><input type="number" name="sMax" value="'+(($.isNumeric(this.max) && 0<=this.max) ? this.max : '')+'" style="max-width:60px;" min="1" /> Maximum number of choices to be ticked.</label>'+
215
+ '<input type="text" name="sMaxError" class="large" value="'+$.fbuilder.htmlEncode($.fbuilder.htmlDecode(this.maxError))+'" placeholder="Max choices error messages" />';
216
  },
217
  showChoiceIntance: function()
218
  {
248
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
249
  }
250
  }
251
+ return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices<a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a></label><div><div class="t">Text</div><div class="t">Value</div><div class="clearer" /></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.maxChoices()+'</div>';
252
  }
253
  });
js/fields-admin/07_fbuilder.fradio.js CHANGED
@@ -33,7 +33,7 @@
33
  {
34
  str += '<div class="'+this.layout+'"><input class="field" disabled="true" type="radio" i="'+i+'" '+(( this.choices[i]+' - '+this.choicesVal[i]==this.choiceSelected)?"checked":"")+'/> '+$.fbuilder.htmlDecode( this.choices[i] )+'</div>';
35
  }
36
- 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
37
  },
38
  editItemEvents:function()
39
  {
@@ -161,6 +161,7 @@
161
  $(this).html("Hide Dependencies");
162
  e.data.obj.showDep = true;
163
  }
 
164
  return false;
165
  });
166
  $('.dependencies').bind("change", {obj: this}, function(e)
@@ -188,7 +189,7 @@
188
  },
189
  attributeToSubmit: function()
190
  {
191
- return '<div class="choicesSet"><label>Value to Submit</label><br /><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer"></div></div>';
192
  },
193
  allowUntick: function()
194
  {
@@ -227,6 +228,6 @@
227
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
228
  }
229
  }
230
- return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+str+this.attributeToSubmit()+this.allowUntick()+'</div>';
231
  }
232
  });
33
  {
34
  str += '<div class="'+this.layout+'"><input class="field" disabled="true" type="radio" i="'+i+'" '+(( this.choices[i]+' - '+this.choicesVal[i]==this.choiceSelected)?"checked":"")+'/> '+$.fbuilder.htmlDecode( this.choices[i] )+'</div>';
35
  }
36
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
37
  },
38
  editItemEvents:function()
39
  {
161
  $(this).html("Hide Dependencies");
162
  e.data.obj.showDep = true;
163
  }
164
+ $.fbuilder.editItem(e.data.obj.index);
165
  return false;
166
  });
167
  $('.dependencies').bind("change", {obj: this}, function(e)
189
  },
190
  attributeToSubmit: function()
191
  {
192
+ return '<div class="choicesSet"><label>Value to Submit</label><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer" /></div>';
193
  },
194
  allowUntick: function()
195
  {
228
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
229
  }
230
  }
231
+ return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a></label><div><div class="t">Text</div><div class="t">Value</div><div class="clearer" /></div>'+str+this.attributeToSubmit()+this.allowUntick()+'</div>';
232
  }
233
  });
js/fields-admin/08_fbuilder.fdropdown.js CHANGED
@@ -31,7 +31,7 @@
31
  display:function()
32
  {
33
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
34
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><select class="field disabled '+this.size+'" ><option>'+this.choiceSelected+'</option></select><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
35
  },
36
  editItemEvents:function()
37
  {
@@ -168,6 +168,7 @@
168
  $(this).html("Hide Dependencies");
169
  e.data.obj.showDep = true;
170
  }
 
171
  return false;
172
  });
173
  $('.dependencies').bind("change", {obj: this}, function(e)
@@ -208,12 +209,12 @@
208
  },
209
  attributeToSubmit: function()
210
  {
211
- return '<div class="choicesSet"><label>Value to Submit</label><br /><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer"></div></div>';
212
  },
213
  multipleSelection: function()
214
  {
215
- return '<div><input type="checkbox" name="sMultiple" '+((typeof this.multiple != 'undefined' && this.multiple) ? ' CHECKED ' : '')+' /> Allows to select multiple choices.</div>'+
216
- '<div><input type="number" name="sVChoices" value="'+(($.isNumeric(this.vChoices) && this.vChoices) ? this.vChoices : 1)+'" style="max-width:60px;" min="1" /> Number of visual choices.</div>';
217
  },
218
  showChoiceIntance: function()
219
  {
@@ -253,6 +254,6 @@
253
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
254
  }
255
  }
256
- return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div>optgroup</div><div class="clearer"></div></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.multipleSelection()+'</div>';
257
  }
258
  });
31
  display:function()
32
  {
33
  this.choicesVal = ((typeof(this.choicesVal) != "undefined" && this.choicesVal !== null)?this.choicesVal:this.choices.slice(0));
34
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><select class="field disabled '+this.size+'" ><option>'+this.choiceSelected+'</option></select><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
35
  },
36
  editItemEvents:function()
37
  {
168
  $(this).html("Hide Dependencies");
169
  e.data.obj.showDep = true;
170
  }
171
+ $.fbuilder.editItem(e.data.obj.index);
172
  return false;
173
  });
174
  $('.dependencies').bind("change", {obj: this}, function(e)
209
  },
210
  attributeToSubmit: function()
211
  {
212
+ return '<div class="choicesSet"><label>Value to Submit</label><div class="column width50"><label><input type="radio" name="sToSubmit" value="text" '+((this.toSubmit == 'text') ? ' CHECKED ' : '')+'/> Choice Text</label></div><div class="column width50"><label><input type="radio" name="sToSubmit" value="value" '+((this.toSubmit == 'value') ? ' CHECKED ' : '')+'/> Choice Value</label></div><div class="clearer" /></div>';
213
  },
214
  multipleSelection: function()
215
  {
216
+ return '<label style="margin-bottom"><input type="checkbox" name="sMultiple" '+((typeof this.multiple != 'undefined' && this.multiple) ? ' CHECKED ' : '')+' /> Allows to select multiple choices.</label>'+
217
+ '<label><input type="number" name="sVChoices" value="'+(($.isNumeric(this.vChoices) && this.vChoices) ? this.vChoices : 1)+'" style="max-width:60px;" min="1" /> Number of visual choices.</label>';
218
  },
219
  showChoiceIntance: function()
220
  {
254
  str += '<div class="choicesEditDep"><span>If selected show:</span> <select class="dependencies" i="'+i+'" j="'+j+'" dname="'+this.name+'" dvalue="" ></select><div class="choice-ctrls"><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
255
  }
256
  }
257
+ return '<div class="choicesSet '+((this.showDep)?"show":"hide")+'"><label>Choices <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+((this.showDep)?"Hide":"Show")+' Dependencies</a></label><div><div class="t">Text</div><div class="t">Value</div><div>optgroup</div><div class="clearer" /></div>'+str+this.mergeValues()+this.attributeToSubmit()+this.multipleSelection()+'</div>';
258
  }
259
  });
js/fields-admin/09_fbuilder.ffile.js CHANGED
@@ -23,7 +23,7 @@
23
  thumb_height: '',
24
  display:function()
25
  {
26
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input type="file" disabled class="field '+this.size+'" /><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
27
  },
28
  editItemEvents:function()
29
  {
@@ -40,6 +40,6 @@
40
  },
41
  showSpecialDataInstance: function()
42
  {
43
- return '<div><label>Accept these file extensions [<a class="helpfbuilder" text="Extensions comma separated and without the dot.\n\nExample: jpg,png,gif,pdf">help?</a>]</label><br /><input type="text" name="sAccept" id="sAccept" value="'+$.fbuilder.htmlEncode(this.accept)+'" class="large"></div><div><label>Maximum upload size in kB [<a class="helpfbuilder" text="1024 kB = 1 MB.\n\nThe support for this HTML5 feature may be partially available or not available in some browsers.">help?</a>]</label><br /><input type="text" name="sUpload_size" id="sUpload_size" value="'+$.fbuilder.htmlEncode(this.upload_size)+'" class="large"></div><div><label><input type="checkbox" id="sMultiple" name="sMultiple" '+( ( typeof this.multiple != 'undefined' && this.multiple ) ? 'CHECKED' : '' )+' /> Upload multiple files</label></div><hr /><div><label><input type="checkbox" id="sPreview" name="sPreview" '+( ( typeof this.preview != 'undefined' && this.preview ) ? 'CHECKED' : '' )+' /> Show preview of images</label></div><div><label>Thumbnail width</label><input type="text" id="sThumbWidth" name="sThumbWidth" value="'+$.fbuilder.htmlEncode(this.thumb_width)+'" class="large" /></div><div><label>Thumbnail height</label><input type="text" id="sThumbHeight" name="sThumbHeight" value="'+$.fbuilder.htmlEncode(this.thumb_height)+'" class="large" /></div><hr /><div class="clearer"></div>';
44
  }
45
  });
23
  thumb_height: '',
24
  display:function()
25
  {
26
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input type="file" disabled class="field '+this.size+'" /><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
27
  },
28
  editItemEvents:function()
29
  {
40
  },
41
  showSpecialDataInstance: function()
42
  {
43
+ return '<label>Accept these file extensions [<a class="helpfbuilder" text="Extensions comma separated and without the dot.\n\nExample: jpg,png,gif,pdf">help?</a>]</label><input type="text" name="sAccept" id="sAccept" value="'+$.fbuilder.htmlEncode(this.accept)+'" class="large"><label>Maximum upload size in kB [<a class="helpfbuilder" text="1024 kB = 1 MB.\n\nThe support for this HTML5 feature may be partially available or not available in some browsers.">help?</a>]</label><input type="text" name="sUpload_size" id="sUpload_size" value="'+$.fbuilder.htmlEncode(this.upload_size)+'" class="large"><label><input type="checkbox" id="sMultiple" name="sMultiple" '+( ( typeof this.multiple != 'undefined' && this.multiple ) ? 'CHECKED' : '' )+' /> Upload multiple files</label><hr /><label><input type="checkbox" id="sPreview" name="sPreview" '+( ( typeof this.preview != 'undefined' && this.preview ) ? 'CHECKED' : '' )+' /> Show preview of images</label><label>Thumbnail width</label><input type="text" id="sThumbWidth" name="sThumbWidth" value="'+$.fbuilder.htmlEncode(this.thumb_width)+'" class="large" /><label>Thumbnail height</label><input type="text" id="sThumbHeight" name="sThumbHeight" value="'+$.fbuilder.htmlEncode(this.thumb_height)+'" class="large" /><hr />';
44
  }
45
  });
js/fields-admin/10_fbuilder.fpassword.js CHANGED
@@ -20,9 +20,11 @@
20
  minlength:"",
21
  maxlength:"",
22
  equalTo:"",
 
 
23
  display:function()
24
  {
25
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
26
  },
27
  editItemEvents:function()
28
  {
@@ -30,6 +32,8 @@
30
  {s:"#sSize",e:"change", l:"size"},
31
  {s:"#sMinlength",e:"change keyup", l:"minlength"},
32
  {s:"#sMaxlength",e:"change keyup", l:"maxlength"},
 
 
33
  {s:"#sEqualTo",e:"change", l:"equalTo"}
34
  ],
35
  items = this.fBuild.getItems();
@@ -52,6 +56,6 @@
52
  },
53
  showSpecialDataInstance: function()
54
  {
55
- return '<div class="column"><label>Min length/characters</label><br /><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'"></div><div class="column"><label>Max length/characters</label><br /><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'"></div><div class="clearer"></div>';
56
  }
57
  });
20
  minlength:"",
21
  maxlength:"",
22
  equalTo:"",
23
+ regExp:"",
24
+ regExpMssg:"",
25
  display:function()
26
  {
27
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="password" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
28
  },
29
  editItemEvents:function()
30
  {
32
  {s:"#sSize",e:"change", l:"size"},
33
  {s:"#sMinlength",e:"change keyup", l:"minlength"},
34
  {s:"#sMaxlength",e:"change keyup", l:"maxlength"},
35
+ {s:"#sRegExp",e:"change keyup", l:"regExp"},
36
+ {s:"#sRegExpMssg",e:"change keyup", l:"regExpMssg"},
37
  {s:"#sEqualTo",e:"change", l:"equalTo"}
38
  ],
39
  items = this.fBuild.getItems();
56
  },
57
  showSpecialDataInstance: function()
58
  {
59
+ return '<div class="column width50"><label>Min length/characters</label><input type="text" name="sMinlength" id="sMinlength" value="'+$.fbuilder.htmlEncode(this.minlength)+'" class="large"></div><div class="column width50"><label>Max length/characters</label><input type="text" name="sMaxlength" id="sMaxlength" value="'+$.fbuilder.htmlEncode(this.maxlength)+'" class="large"></div><div class="clearer" /><label>Validate against a regular expression</label><input type="text" name="sRegExp" id="sRegExp" value="'+$.fbuilder.htmlEncode(this.regExp)+'" class="large" /><label>Error message when the regular expression fails</label><input type="text" name="sRegExpMssg" id="sRegExpMssg" value="'+$.fbuilder.htmlEncode(this.regExpMssg)+'" class="large" />';
60
  }
61
  });
js/fields-admin/11_fbuilder.fphone.js CHANGED
@@ -36,7 +36,7 @@
36
  str += '<div class="uh_phone" ><input type="text" class="field disabled" style="width:'+(15*$.trim(tmp[i]).length)+'px" value="'+((tmpv[i])?tmpv[i]:"")+'" maxlength="'+$.trim(tmp[i]).length+'" /><div class="l">'+$.trim(tmp[i])+'</div></div>';
37
  }
38
  }
39
- 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
40
  },
41
  editItemEvents:function()
42
  {
@@ -45,6 +45,6 @@
45
  },
46
  showFormatIntance: function()
47
  {
48
- return '<div><label>Number Format</label><br /><input type="text" name="sFormat" id="sFormat" value="'+$.fbuilder.htmlEncode(this.dformat)+'" class="large" /></div>';
49
  }
50
  });
36
  str += '<div class="uh_phone" ><input type="text" class="field disabled" style="width:'+(15*$.trim(tmp[i]).length)+'px" value="'+((tmpv[i])?tmpv[i]:"")+'" maxlength="'+$.trim(tmp[i]).length+'" /><div class="l">'+$.trim(tmp[i])+'</div></div>';
37
  }
38
  }
39
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
40
  },
41
  editItemEvents:function()
42
  {
45
  },
46
  showFormatIntance: function()
47
  {
48
+ return '<label>Number Format</label><input type="text" name="sFormat" id="sFormat" value="'+$.fbuilder.htmlEncode(this.dformat)+'" class="large" />';
49
  }
50
  });
js/fields-admin/12_fbuilder.fcommentarea.js CHANGED
@@ -15,10 +15,10 @@
15
  userhelp:"A description of the section goes here.",
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.userhelp+'</span><div class="clearer"></div></div>';
19
  },
20
  editItemEvents:function()
21
- {
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
23
  }
24
  });
15
  userhelp:"A description of the section goes here.",
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.userhelp+'</span><div class="clearer" /></div>';
19
  },
20
  editItemEvents:function()
21
+ {
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
23
  }
24
  });
js/fields-admin/13_fbuilder.fhidden.js CHANGED
@@ -16,7 +16,7 @@
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
  {
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>';
20
  },
21
  editItemEvents:function()
22
  {
js/fields-admin/14_fbuilder.fsectionbreak.js CHANGED
@@ -15,10 +15,10 @@
15
  userhelp:"A description of the section goes here.",
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><div class="section_break"></div><label>'+this.title+'</label><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
19
  },
20
  editItemEvents:function()
21
- {
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
23
  }
24
  });
15
  userhelp:"A description of the section goes here.",
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><div class="section_break"></div><label>'+this.title+'</label><span class="uh">'+this.userhelp+'</span><div class="clearer" /></div>';
19
  },
20
  editItemEvents:function()
21
+ {
22
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
23
  }
24
  });
js/fields-admin/15_fbuilder.fpagebreak.js CHANGED
@@ -14,10 +14,10 @@
14
  ftype:"fPageBreak",
15
  display:function()
16
  {
17
- 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><div class="section_break"></div><label>'+this.title+'</label><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
18
  },
19
  editItemEvents:function()
20
- {
21
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
22
  },
23
  showTitle: function(){ return ''; },
14
  ftype:"fPageBreak",
15
  display:function()
16
  {
17
+ 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><div class="section_break"></div><label>'+this.title+'</label><span class="uh">'+this.userhelp+'</span><div class="clearer" /></div>';
18
  },
19
  editItemEvents:function()
20
+ {
21
  $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this);
22
  },
23
  showTitle: function(){ return ''; },
js/fields-admin/16_fbuilder.fsummary.js CHANGED
@@ -17,7 +17,7 @@
17
  valueClassname:"summary-field-value",
18
  display:function()
19
  {
20
- return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this.title+''+((this.required)?"*":"")+'</label><div class="dfield"><span class="field">'+this.fields+'</span></div><div class="clearer"></div></div>';
21
  },
22
  editItemEvents:function()
23
  {
@@ -46,17 +46,16 @@
46
  var str = '',
47
  items = this.fBuild.getItems();
48
 
49
- str += '<div><label>Fields to display on summary</label><br /><input type="text" name="sFields" id="sFields" class="large" value="'+$.fbuilder.htmlEncode(this.fields)+'"></div><div class="clearer"></div>';
 
50
 
51
- str += '<div><label>Select field and press the plus button</label><br /><select name="sSelectedField" id="sSelectedField" style="width:80%;">';
52
- for ( var i=0; i<items.length; i++ )
53
  {
54
  str += '<option value="'+items[i].name+'">'+( ( typeof items[i].title != 'undefined' ) ? items[i].title : '' )+'('+items[i].name+')'+'</option>';
55
  }
56
- str += '</select><input type="button" value="+" name="sPlusBtn" id="sPlusBtn" style="padding:3px 10px;" /></div><div class="clearer"></div>';
57
-
58
- str += '<div><label>Classname for fields titles</label><br /><input type="text" class="large" name="sTitleClassname" id="sTitleClassname" value="'+$.fbuilder.htmlEncode(this.titleClassname)+'"></div><div class="clearer"></div>';
59
- str += '<div><label>Classname for fields values</label><br /><input type="text" class="large" name="sValueClassname" id="sValueClassname" value="'+$.fbuilder.htmlEncode(this.valueClassname)+'"></div><div class="clearer"></div>';
60
 
61
  return str;
62
  }
17
  valueClassname:"summary-field-value",
18
  display:function()
19
  {
20
+ return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this.title+''+((this.required)?"*":"")+'</label><div class="dfield"><span class="field">'+this.fields+'</span></div><div class="clearer" /></div>';
21
  },
22
  editItemEvents:function()
23
  {
46
  var str = '',
47
  items = this.fBuild.getItems();
48
 
49
+ str += '<label>Fields to display on summary</label><input type="text" name="sFields" id="sFields" class="large" value="'+$.fbuilder.htmlEncode(this.fields)+'">'+
50
+ '<label>Select field and press the plus button</label><select name="sSelectedField" id="sSelectedField" class="large">';
51
 
52
+ for(var i=0; i<items.length; i++)
 
53
  {
54
  str += '<option value="'+items[i].name+'">'+( ( typeof items[i].title != 'undefined' ) ? items[i].title : '' )+'('+items[i].name+')'+'</option>';
55
  }
56
+ str += '</select><div style="margin-top:10px;"><input type="button" value="+" name="sPlusBtn" id="sPlusBtn" style="padding:3px 10px;" /></div>'+
57
+ '<label>Classname for fields titles</label><input type="text" class="large" name="sTitleClassname" id="sTitleClassname" value="'+$.fbuilder.htmlEncode(this.titleClassname)+'">'+
58
+ '<label>Classname for fields values</label><input type="text" class="large" name="sValueClassname" id="sValueClassname" value="'+$.fbuilder.htmlEncode(this.valueClassname)+'">';
 
59
 
60
  return str;
61
  }
js/fields-admin/28_fbuilder.fcontainer.js CHANGED
@@ -24,7 +24,7 @@
24
  {
25
  cStr += '<option value="'+columns[ i ]+'" '+( ( this.columns == columns[ i ] ) ? 'SELECTED' : '' )+'>'+columns[ i ]+' column'+( ( i ) ? 's' : '' )+'</option>';
26
  }
27
- return '<div><label>Columns</label><br /><select name="sColumns" id="sColumns">' + cStr + '</select><div class="clearer"><span class="uh">Shown in columns the fields into the container.</span></div></div>'+
28
  '<div><label><input name="sRearrange" id="sRearrange" type="checkbox" '+((this.rearrange) ? 'CHECKED' : '')+'> Rearrange</label> <span class="uh">Rearrange the fields in the container.</span></div>';
29
  },
30
  remove : function()
24
  {
25
  cStr += '<option value="'+columns[ i ]+'" '+( ( this.columns == columns[ i ] ) ? 'SELECTED' : '' )+'>'+columns[ i ]+' column'+( ( i ) ? 's' : '' )+'</option>';
26
  }
27
+ return '<div><label>Columns</label><select name="sColumns" id="sColumns">' + cStr + '</select><div class="clearer"><span class="uh">Shown in columns the fields into the container.</span></div></div>'+
28
  '<div><label><input name="sRearrange" id="sRearrange" type="checkbox" '+((this.rearrange) ? 'CHECKED' : '')+'> Rearrange</label> <span class="uh">Rearrange the fields in the container.</span></div>';
29
  },
30
  remove : function()
js/fields-admin/29_fbuilder.ffieldset.fc.js CHANGED
@@ -15,14 +15,16 @@
15
  fields:[],
16
  columns:1,
17
  rearrange: 0,
18
- collapsed:false,
 
19
  display:function()
20
  {
21
- return '<div class="fields '+this.name+((this.collapsed) ? ' collapsed' : '')+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Collapse" class="collapse ui-icon ui-icon-folder-collapsed "></div><div title="Uncollapse" class="uncollapse ui-icon ui-icon-folder-open "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><div class="dfield"><FIELDSET class="fcontainer">'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'<label class="collapsed-label">Collapsed ['+this.name+']</label><div class="fieldscontainer"></div></FIELDSET></div><div class="clearer"></div></div>';
22
  },
23
  editItemEvents:function()
24
  {
25
  $.fbuilder.controls[ 'fcontainer' ].prototype.editItemEvents.call(this);
 
26
  },
27
  remove : function()
28
  {
@@ -35,5 +37,13 @@
35
  after_show:function()
36
  {
37
  return $.fbuilder.controls[ 'fcontainer' ].prototype.after_show.call(this);
38
- }
 
 
 
 
 
 
 
 
39
  });
15
  fields:[],
16
  columns:1,
17
  rearrange: 0,
18
+ collapsible:false, // Public
19
+ collapsed:false, // Admin
20
  display:function()
21
  {
22
+ return '<div class="fields '+this.name+((this.collapsed) ? ' collapsed' : '')+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Collapse" class="collapse ui-icon ui-icon-folder-collapsed "></div><div title="Uncollapse" class="uncollapse ui-icon ui-icon-folder-open "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><div class="dfield"><FIELDSET class="fcontainer">'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'<label class="collapsed-label">Collapsed ['+this.name+']</label><div class="fieldscontainer"></div></FIELDSET></div><div class="clearer" /></div>';
23
  },
24
  editItemEvents:function()
25
  {
26
  $.fbuilder.controls[ 'fcontainer' ].prototype.editItemEvents.call(this);
27
+ $.fbuilder.controls[ 'ffields' ].prototype.editItemEvents.call(this, [{s:"#sCollapsible",e:"click", l:"collapsible", f:function(el){return el.is(':checked');}}]);
28
  },
29
  remove : function()
30
  {
37
  after_show:function()
38
  {
39
  return $.fbuilder.controls[ 'fcontainer' ].prototype.after_show.call(this);
40
+ },
41
+ showCollapsible:function()
42
+ {
43
+ return '<label><input type="checkbox" name="sCollapsible" id="sCollapsible" '+((this.collapsible)?"checked":"")+'> Make it collapsible (collapsed by default)</label>';
44
+ },
45
+ showSpecialDataInstance: function()
46
+ {
47
+ return $.fbuilder.controls[ 'fcontainer' ].prototype.showSpecialDataInstance.call(this) + this.showCollapsible();
48
+ }
49
  });
js/fields-admin/30_fbuilder.fdiv.fc.js CHANGED
@@ -18,7 +18,7 @@
18
  collapsed:false,
19
  display:function()
20
  {
21
- return '<div class="fields '+this.name+((this.collapsed) ? ' collapsed' : '')+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Collapse" class="collapse ui-icon ui-icon-folder-collapsed "></div><div title="Uncollapse" class="uncollapse ui-icon ui-icon-folder-open "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><div class="dfield"><div class="fcontainer"><label class="collapsed-label">Collapsed ['+this.name+']</label><div class="fieldscontainer"></div></div></div><div class="clearer"></div></div>';
22
  },
23
  showTitle:function(){ return ''; },
24
  editItemEvents:function()
18
  collapsed:false,
19
  display:function()
20
  {
21
+ return '<div class="fields '+this.name+((this.collapsed) ? ' collapsed' : '')+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Collapse" class="collapse ui-icon ui-icon-folder-collapsed "></div><div title="Uncollapse" class="uncollapse ui-icon ui-icon-folder-open "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><div class="dfield"><div class="fcontainer"><label class="collapsed-label">Collapsed ['+this.name+']</label><div class="fieldscontainer"></div></div></div><div class="clearer" /></div>';
22
  },
23
  showTitle:function(){ return ''; },
24
  editItemEvents:function()
js/fields-admin/31_fbuilder.fmedia.js CHANGED
@@ -108,7 +108,7 @@
108
  },
109
  display:function()
110
  {
111
- return '<div class="fields fmark '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this[ '_display_' + this.sMediaType ]()+'</label><span class="uh">'+this.data[ this.sMediaType ][ 'sFigcaption' ]+'</span><div class="clearer"></div></div>';
112
  },
113
  editItemEvents:function()
114
  {
@@ -156,9 +156,9 @@
156
  for( var i = 0, h = l.length; i < h; i++ )
157
  {
158
  v = l[ i ];
159
- r += '<label style="margin-right:10px;"><input type="radio" name="sMediaType" value="' + v + '" ' + ( ( this.sMediaType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
160
  }
161
- return '<div><label>Select media type</label><br/>' + r + '</div>';
162
  },
163
  _loadMedia: function( f, type )
164
  {
@@ -192,21 +192,18 @@
192
  },
193
  _showSettings_image: function( d )
194
  {
195
- var r = '',
196
- esc = $.fbuilder.htmlEncode;
197
- r = '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">';
198
- r += '<label>Height</label><input type="text" class="large" name="sHeight" id="sHeight" value="'+esc(d.sHeight)+'">';
199
- r += '<label>Source</label><div><input type="text" style="width:70%;" name="sSrc" id="sSrc" value="'+esc(d.sSrc)+'"><input id="sMediaBtn" type="button" value="Browse" style="width:28%;" /></div>';
200
- r += '<label>Alternate</label><input type="text" class="large" name="sAlt" id="sAlt" value="'+esc(d.sAlt)+'">';
201
- r += '<label>Figcaption</label><input type="text" class="large" name="sFigcaption" id="sFigcaption" value="'+esc(d.sFigcaption)+'">';
202
- r += '<label>Link</label><input type="text" class="large" name="sLink" id="sLink" value="'+esc(d.sLink)+'">';
203
- r += '<label>Target</label><input type="text" class="large" name="sTarget" id="sTarget" value="'+esc(d.sTarget)+'" /><span class="uh">_blank, _new, _parent, _self, _top</span>';
204
- return r;
205
  },
206
  _showSettings_audio_video: function( d, isV )
207
  {
208
- var r = '',
209
- esc = $.fbuilder.htmlEncode;
210
  r = '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">';
211
 
212
  if( isV )
@@ -217,21 +214,21 @@
217
  if( isV )
218
  r += '<label>Poster</label><div><input type="text" style="width:70%;" name="sPoster" id="sPoster" value="'+esc(d.sPoster)+'"><input id="sPosterBtn" type="button" value="Browse" style="width:28%;" /></div>';
219
 
220
- r += '<label>Alternative Source</label><div><input type="text" style="width:70%;" name="sSrcAlt" id="sSrcAlt" value="'+esc(d.sSrcAlt)+'"><input id="sMediaAltBtn" type="button" value="Browse" style="width:28%;" /></div>';
221
- r += '<input type="checkbox" name="sControls" id="sControls" value="1" '+( ( d.sControls ) ? 'CHECKED' : '')+'><label>Controls</label><br />';
222
- r += '<input type="checkbox" name="sLoop" id="sLoop" value="1" '+( ( d.sLoop ) ? 'CHECKED' : '')+'><label>Loop</label><br />';
223
- r += '<input type="checkbox" name="sAutoplay" id="sAutoplay" value="1" '+( ( d.sAutoplay ) ? 'CHECKED' : '')+'><label>Autoplay</label><br />';
224
- r += '<input type="checkbox" name="sMuted" id="sMuted" value="1" '+( ( d.sMuted ) ? 'CHECKED' : '')+'><label>Muted</label><br />';
225
- r += '<input type="checkbox" name="sHideDownload" id="sHideDownload" value="1" '+( ( d.sHideDownload ) ? 'CHECKED' : '')+'><label>Hide the download file control</label><br />';
226
  var s = '',
227
  l = [ 'none', 'auto', 'metadata' ];
228
  for( var i = 0; i < 3; i++ )
229
  {
230
  s += '<option value="' + l[ i ] + '" ' + ( ( l[ i ] == d.sPreload ) ? 'SELECTED' : '' ) + '>' + l[ i ] + '</option>';
231
  }
232
- r += '<label>Preload</label><select class="large" name="sPreload" id="sPreload">'+s+'</select>';
233
- r += '<label>Fallback Text</label><input type="text" class="large" name="sFallback" id="sFallback" value="'+esc(d.sFallback)+'">';
234
- r += '<label>Figcaption</label><input type="text" class="large" name="sFigcaption" id="sFigcaption" value="'+esc(d.sFigcaption)+'">';
235
  return r;
236
  },
237
  _showSettings_audio: function( d )
108
  },
109
  display:function()
110
  {
111
+ return '<div class="fields fmark '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><label>'+this[ '_display_' + this.sMediaType ]()+'</label><span class="uh">'+this.data[ this.sMediaType ][ 'sFigcaption' ]+'</span><div class="clearer" /></div>';
112
  },
113
  editItemEvents:function()
114
  {
156
  for( var i = 0, h = l.length; i < h; i++ )
157
  {
158
  v = l[ i ];
159
+ r += '<label class="column width30"><input type="radio" name="sMediaType" value="' + v + '" ' + ( ( this.sMediaType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
160
  }
161
+ return '<label>Select media type</label>'+r+'<div class="clearer" />';
162
  },
163
  _loadMedia: function( f, type )
164
  {
192
  },
193
  _showSettings_image: function( d )
194
  {
195
+ var esc = $.fbuilder.htmlEncode;
196
+ return '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">'+
197
+ '<label>Height</label><input type="text" class="large" name="sHeight" id="sHeight" value="'+esc(d.sHeight)+'">'+
198
+ '<label>Source</label><div><input type="text" style="width:70%;" name="sSrc" id="sSrc" value="'+esc(d.sSrc)+'"><input id="sMediaBtn" type="button" value="Browse" style="width:28%;" /></div>'+
199
+ '<label>Alternate</label><input type="text" class="large" name="sAlt" id="sAlt" value="'+esc(d.sAlt)+'">'+
200
+ '<label>Figcaption</label><input type="text" class="large" name="sFigcaption" id="sFigcaption" value="'+esc(d.sFigcaption)+'">'+
201
+ '<label>Link</label><input type="text" class="large" name="sLink" id="sLink" value="'+esc(d.sLink)+'">'+
202
+ '<label>Target</label><input type="text" class="large" name="sTarget" id="sTarget" value="'+esc(d.sTarget)+'" /><span class="uh">_blank, _new, _parent, _self, _top</span>';
 
 
203
  },
204
  _showSettings_audio_video: function( d, isV )
205
  {
206
+ var esc = $.fbuilder.htmlEncode,
 
207
  r = '<label>Width</label><input type="text" class="large" name="sWidth" id="sWidth" value="'+esc(d.sWidth)+'">';
208
 
209
  if( isV )
214
  if( isV )
215
  r += '<label>Poster</label><div><input type="text" style="width:70%;" name="sPoster" id="sPoster" value="'+esc(d.sPoster)+'"><input id="sPosterBtn" type="button" value="Browse" style="width:28%;" /></div>';
216
 
217
+ r += '<label>Alternative Source</label><div><input type="text" style="width:70%;" name="sSrcAlt" id="sSrcAlt" value="'+esc(d.sSrcAlt)+'"><input id="sMediaAltBtn" type="button" value="Browse" style="width:28%;" /></div>'+
218
+ '<label><input type="checkbox" name="sControls" id="sControls" value="1" '+( ( d.sControls ) ? 'CHECKED' : '')+'> Controls</label>'+
219
+ '<label><input type="checkbox" name="sLoop" id="sLoop" value="1" '+( ( d.sLoop ) ? 'CHECKED' : '')+'> Loop</label>'+
220
+ '<label><input type="checkbox" name="sAutoplay" id="sAutoplay" value="1" '+( ( d.sAutoplay ) ? 'CHECKED' : '')+'> Autoplay</label>'+
221
+ '<label><input type="checkbox" name="sMuted" id="sMuted" value="1" '+( ( d.sMuted ) ? 'CHECKED' : '')+'> Muted</label>'+
222
+ '<label><input type="checkbox" name="sHideDownload" id="sHideDownload" value="1" '+( ( d.sHideDownload ) ? 'CHECKED' : '')+'> Hide the download file control</label>';
223
  var s = '',
224
  l = [ 'none', 'auto', 'metadata' ];
225
  for( var i = 0; i < 3; i++ )
226
  {
227
  s += '<option value="' + l[ i ] + '" ' + ( ( l[ i ] == d.sPreload ) ? 'SELECTED' : '' ) + '>' + l[ i ] + '</option>';
228
  }
229
+ r += '<label>Preload</label><select class="large" name="sPreload" id="sPreload">'+s+'</select>'+
230
+ '<label>Fallback Text</label><input type="text" class="large" name="sFallback" id="sFallback" value="'+esc(d.sFallback)+'">'+
231
+ '<label>Figcaption</label><input type="text" class="large" name="sFigcaption" id="sFigcaption" value="'+esc(d.sFigcaption)+'">';
232
  return r;
233
  },
234
  _showSettings_audio: function( d )
js/fields-admin/32_fbuilder.fbutton.js CHANGED
@@ -18,7 +18,7 @@
18
  userhelp:"A description of the section goes here.",
19
  display:function()
20
  {
21
- return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><input type="button" disabled value="'+$.fbuilder.htmlEncode(this.sValue)+'"><span class="uh">'+this.userhelp+'</span><div class="clearer"></div></div>';
22
  },
23
  editItemEvents:function()
24
  {
@@ -49,15 +49,14 @@
49
  {
50
  var l = [ 'calculate', 'reset', 'button' ],
51
  r = "", v;
52
- r += '<div>';
53
- for( var i = 0, h = l.length; i < h; i++ )
54
  {
55
  v = l[ i ];
56
- r += '<label style="margin-right:10px;"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
57
  }
58
- r += '</div>';
59
  r += '<div '+((this.sType != 'calculate') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sLoading" ' + ((this.sLoading) ? 'CHECKED' : '') + ' >display "calculation in progress" indicator</label></div>';
60
- return '<div><label>Select button type</label><br/>' + r + '</div>';
61
  },
62
  _showValueSettings: function()
63
  {
18
  userhelp:"A description of the section goes here.",
19
  display:function()
20
  {
21
+ return '<div class="fields '+this.name+'" id="field'+this.form_identifier+'-'+this.index+'" title="'+this.name+'"><div class="arrow ui-icon ui-icon-play "></div><div title="Delete" class="remove ui-icon ui-icon-trash "></div><div title="Duplicate" class="copy ui-icon ui-icon-copy "></div><input type="button" disabled value="'+$.fbuilder.htmlEncode(this.sValue)+'"><span class="uh">'+this.userhelp+'</span><div class="clearer" /></div>';
22
  },
23
  editItemEvents:function()
24
  {
49
  {
50
  var l = [ 'calculate', 'reset', 'button' ],
51
  r = "", v;
52
+ for( var i = 0, h = l.length; i < h; i++ )
 
53
  {
54
  v = l[ i ];
55
+ r += '<label class="column width30"><input type="radio" name="sType" value="' + v + '" ' + ( ( this.sType == v ) ? 'CHECKED' : '' ) + ' >' + v + '</label>';
56
  }
57
+ r += '<div class="clear"></div>';
58
  r += '<div '+((this.sType != 'calculate') ? 'style="display:none;"' : '')+'><label><input type="checkbox" id="sLoading" ' + ((this.sLoading) ? 'CHECKED' : '') + ' >display "calculation in progress" indicator</label></div>';
59
+ return '<label>Select button type</label>'+r+'<div class="clearer" />';
60
  },
61
  _showValueSettings: function()
62
  {
js/fields-admin/34_fbuilder.fhtml.js CHANGED
@@ -14,7 +14,7 @@
14
  fcontent: "",
15
  display:function()
16
  {
17
- return '<div class="fields '+this.name+' fhtml" 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/>' ).html( this.fcontent ).find( 'script,style' ).remove().end().html()+'<div class="clearer"></div></div>';
18
  },
19
  editItemEvents:function()
20
  {
@@ -48,7 +48,7 @@
48
  },
49
  showContent:function()
50
  {
51
- return '<br><div class="cff-editor-container"><label style="display:block;"><div class="cff-editor-extend-shrink"></div>HTML Content</label><br><textarea class="large" name="sContent" id="sContent" style="height:150px;">'+$( '<div/>' ).text( this.fcontent ).html()+'</textarea></div><br>';
52
  },
53
  showAllSettings:function()
54
  {
14
  fcontent: "",
15
  display:function()
16
  {
17
+ return '<div class="fields '+this.name+' fhtml" 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/>' ).html( this.fcontent ).find( 'script,style' ).remove().end().html()+'<div class="clearer" /></div>';
18
  },
19
  editItemEvents:function()
20
  {
48
  },
49
  showContent:function()
50
  {
51
+ return '<div class="cff-editor-container"><label style="display:block;"><div class="cff-editor-extend-shrink"></div>HTML Content</label><textarea class="large" name="sContent" id="sContent" style="height:150px;">'+$( '<div/>' ).text( this.fcontent ).html()+'</textarea></div>';
52
  },
53
  showAllSettings:function()
54
  {
js/fields-admin/36_fbuilder.acceptance.js CHANGED
@@ -20,7 +20,7 @@
20
  display:function()
21
  {
22
  var str = '<div class="one_column"><input class="field" disabled="true" type="checkbox"/> '+this.title+((this.required)?"*":"")+'</div>';
23
- 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><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
24
  },
25
  editItemEvents:function()
26
  {
@@ -34,26 +34,24 @@
34
  },
35
  showRequired: function(v)
36
  {
37
- return '<div><input type="checkbox" checked disabled><label>Acceptance fields are always required</label></div>';
38
  },
39
  showUserhelp: function(){ return ''; },
40
  showValue:function()
41
  {
42
- return '<div><label>Value</label><input class="large" type="text" name="sValue" id="sValue" value="'+$.fbuilder.htmlEncode(this.value)+'"></div>';
43
  },
44
  showURL:function()
45
  {
46
- return '<div><label>URL to the Consent and Acknowledgement page</label><input class="large" type="text" name="sURL" id="sURL" value="'+$.fbuilder.htmlEncode(this.url)+'"></div>';
47
  },
48
  showMessage:function()
49
  {
50
- return '<div><label>- or - enter the Consent and Acknowledgement text</label><textarea class="large" name="sMessage" id="sMessage" style="height:150px;">'+this.message+'</textarea></div>';
51
  },
52
  showCsslayout:function()
53
  {
54
- var str = '<div style="color: #666;border: 1px solid #EF7E59;display: block;padding: 5px;background: #FBF0EC;border-radius: 4px;text-align: center;margin-top:20px;">The Acceptance control helps to make the form comply with one of requirements of the General Data Protection Regulation (GDPR)</div>';
55
-
56
- return $.fbuilder.controls[ 'ffields' ].prototype.showCsslayout.call(this)+str;
57
  },
58
  showSpecialDataInstance: function()
59
  {
20
  display:function()
21
  {
22
  var str = '<div class="one_column"><input class="field" disabled="true" type="checkbox"/> '+this.title+((this.required)?"*":"")+'</div>';
23
+ 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><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
24
  },
25
  editItemEvents:function()
26
  {
34
  },
35
  showRequired: function(v)
36
  {
37
+ return '<label><input type="checkbox" checked disabled>Acceptance fields are always required</label>';
38
  },
39
  showUserhelp: function(){ return ''; },
40
  showValue:function()
41
  {
42
+ return '<label>Value</label><input class="large" type="text" name="sValue" id="sValue" value="'+$.fbuilder.htmlEncode(this.value)+'">';
43
  },
44
  showURL:function()
45
  {
46
+ return '<label>URL to the Consent and Acknowledgement page</label><input class="large" type="text" name="sURL" id="sURL" value="'+$.fbuilder.htmlEncode(this.url)+'">';
47
  },
48
  showMessage:function()
49
  {
50
+ return '<label>- or - enter the Consent and Acknowledgement text</label><textarea class="large" name="sMessage" id="sMessage" style="height:150px;">'+this.message+'</textarea>';
51
  },
52
  showCsslayout:function()
53
  {
54
+ return $.fbuilder.controls[ 'ffields' ].prototype.showCsslayout.call(this)+'<div style="color: #666;border: 1px solid #EF7E59;display: block;padding: 5px;background: #FBF0EC;border-radius: 4px;text-align: center;margin-top:20px;">The Acceptance control helps to make the form comply with one of requirements of the General Data Protection Regulation (GDPR)</div>';
 
 
55
  },
56
  showSpecialDataInstance: function()
57
  {
js/fields-admin/fbuilder.fcalculated.js CHANGED
@@ -22,6 +22,7 @@
22
  decimalsymbol:".",
23
  groupingsymbol:"",
24
  readonly:true,
 
25
  formatDynamically:false,
26
  hidefield:false,
27
  init:function()
@@ -33,7 +34,7 @@
33
  display:function()
34
  {
35
  this.init();
36
- 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
37
  },
38
  editItemEvents:function()
39
  {
@@ -44,6 +45,7 @@
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,7 +190,7 @@
188
  },
189
  showSpecialDataInstance: function()
190
  {
191
- return this.showFormatDynamically()+this.showHideField()+this.showEqEditor()+this.showDependencies();
192
  },
193
  showDependencies : function()
194
  {
@@ -239,7 +241,6 @@
239
 
240
  r += '<div class="cff-dependency-rule"><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" >'+setOperator( i, operator )+' <input type="text" i="'+i+'" class="cf_dependence_value" value="'+value.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;"><a i="'+i+'" class="displayComplexRule" href="#">Edit rule manually</a></div></div>';
241
  }
242
-
243
  r += '<div>';
244
  $.each( o.fields, function( j, v )
245
  {
@@ -254,19 +255,22 @@
254
  }
255
  r += '<div style="position:relative;" class="cff-dependency-item"><span>If rule is valid show:</span> <select class="cf_dependence_field" i="'+i+'" j="'+j+'" >'+opt+'</select><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
256
  });
257
- r += '</div>';
258
- r += '</div>';
259
  });
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>';
270
  },
271
  showEqEditor:function(eq)
272
  {
@@ -357,7 +361,7 @@
357
 
358
  var out = '<label>Set Equation</label><textarea class="large" name="sEq" id="sEq" style="height:150px;">'+me.eq+'</textarea>'+
359
  '<div id="sAdvancedEditor" title="The Advance Editor is still in experimental state">Advanced Equation\'s Editor</div>'+
360
- '<label>Operands</label><div style="float:right;"><a href="javascript:window.open(\'http://wordpress.dwbooster.com/includes/calculated-field/equations.html\', \'_blak\');">Read an equation tutorial</a></div><div class="groupBox"><select id="sFieldList">';
361
 
362
  var items = this.fBuild.getItems(),
363
  invalidFields = { 'fSectionBreak':1, 'fPageBreak':1, 'fsummary':1, 'ffieldset':1, 'fdiv':1, 'fMedia':1, 'fButton':1, 'fhtml':1, 'ffile':1 };
@@ -376,7 +380,7 @@
376
  out += '<option value="' + fName + '">'+item[ 'name' ] + ( ( item[ 'title' ] && !/^\s*$/.test( item[ 'title' ] ) ) ? '('+item[ 'title' ] + ')' : '' ) + '</option>';
377
  }
378
  }
379
- out += ' </select><input type="button" value="+" class="eq_btn" onclick="'+tools+'.setField();" /></div><label>Operators</label><div style="text-align:center;" class="groupBox"><div style="text-align:left;">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbarList()+'<span id="sEqModuleTutorial">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadTutorial( default_toolbar )+'</span></div><div id="sEqButtonsContainer">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbar( default_toolbar )+'</div><div id="sEqTipsContainer" style="background-color:#DFEFFF;border:1px solid #C2D7EF;padding:5px;margin:5px;display:none;text-align:left;"></div></div><label>Symbol to display at beginning of calculated field</label><input type="text" name="sPrefix" id="sPrefix" class="large" value="'+$.fbuilder.htmlEncode(me.prefix)+'" /><label>Symbol to display at the end of calculated field</label><input type="text" name="sSuffix" id="sSuffix" class="large" value="'+$.fbuilder.htmlEncode(me.suffix)+'" /><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.decimalsymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sGroupingSymbol" id="sGroupingSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.groupingsymbol)+'" />';
380
 
381
  return out;
382
  }
22
  decimalsymbol:".",
23
  groupingsymbol:"",
24
  readonly:true,
25
+ noEvalIfManual:true,
26
  formatDynamically:false,
27
  hidefield:false,
28
  init:function()
34
  display:function()
35
  {
36
  this.init();
37
+ 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+''+((this.required)?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+$.fbuilder.htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer" /></div>';
38
  },
39
  editItemEvents:function()
40
  {
45
  {s:"#sGroupingSymbol",e:"change keyup", l:"groupingsymbol"},
46
  {s:"#sHideField",e:"click", l:"hidefield", f:function(el){return el.is(':checked');}},
47
  {s:"#sFormatDynamically",e:"click", l:"formatDynamically", f:function(el){return el.is(':checked');}},
48
+ {s:"#sNoEvalIfManual",e:"click", l:"noEvalIfManual", f:function(el){return el.is(':checked');}},
49
  {s:"#sSize",e:"change", l:"size"}
50
  ];
51
  $("#sEq").bind("change keyup", {obj: this}, function(e)
190
  },
191
  showSpecialDataInstance: function()
192
  {
193
+ return this.showNoEvalIfManual()+this.showFormatDynamically()+this.showHideField()+this.showEqEditor()+this.showDependencies();
194
  },
195
  showDependencies : function()
196
  {
241
 
242
  r += '<div class="cff-dependency-rule"><div style="position:relative;"><span style="font-weight:bold;">If value is</span><span class="cf_dependence_edition" i="'+i+'" >'+setOperator( i, operator )+' <input type="text" i="'+i+'" class="cf_dependence_value" value="'+value.replace(/"/g, '&quot;')+'" /></span><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" title="Delete this dependency."></a></div><div style="text-align:right;"><a i="'+i+'" class="displayComplexRule" href="#">Edit rule manually</a></div></div>';
243
  }
 
244
  r += '<div>';
245
  $.each( o.fields, function( j, v )
246
  {
255
  }
256
  r += '<div style="position:relative;" class="cff-dependency-item"><span>If rule is valid show:</span> <select class="cf_dependence_field" i="'+i+'" j="'+j+'" >'+opt+'</select><div class="choice-ctrls"><a class="addDep ui-icon ui-icon-circle-plus" i="'+i+'" j="'+j+'" title="Add another dependency."></a><a class="removeDep ui-icon ui-icon-circle-minus" i="'+i+'" j="'+j+'" title="Delete this dependency."></a></div></div>';
257
  });
258
+ r += '</div></div>';
 
259
  });
260
 
261
  return '<label>Define dependencies</label><div class="dependenciesBox">'+r+'</div>';
262
  },
263
+ showNoEvalIfManual:function()
264
+ {
265
+ return '<label><input type="checkbox" name="sNoEvalIfManual" id="sNoEvalIfManual" '+((this.noEvalIfManual)?"checked":"")+'> If value entered manually, no evaluate equation</label>';
266
+ },
267
  showFormatDynamically:function()
268
  {
269
+ return '<label><input type="checkbox" name="sFormatDynamically" id="sFormatDynamically" '+((this.hidefield)?"checked":"")+'> If editable, format dynamically</label>';
270
  },
271
  showHideField:function()
272
  {
273
+ return '<label><input type="checkbox" name="sHideField" id="sHideField" '+((this.hidefield)?"checked":"")+'> Hide Field From Public Page</label>';
274
  },
275
  showEqEditor:function(eq)
276
  {
361
 
362
  var out = '<label>Set Equation</label><textarea class="large" name="sEq" id="sEq" style="height:150px;">'+me.eq+'</textarea>'+
363
  '<div id="sAdvancedEditor" title="The Advance Editor is still in experimental state">Advanced Equation\'s Editor</div>'+
364
+ '<label>Operands <div style="float:right;"><a href="javascript:window.open(\'http://wordpress.dwbooster.com/includes/calculated-field/equations.html\', \'_blak\');">Read an equation tutorial</a></div></label><div class="groupBox"><select id="sFieldList">';
365
 
366
  var items = this.fBuild.getItems(),
367
  invalidFields = { 'fSectionBreak':1, 'fPageBreak':1, 'fsummary':1, 'ffieldset':1, 'fdiv':1, 'fMedia':1, 'fButton':1, 'fhtml':1, 'ffile':1 };
380
  out += '<option value="' + fName + '">'+item[ 'name' ] + ( ( item[ 'title' ] && !/^\s*$/.test( item[ 'title' ] ) ) ? '('+item[ 'title' ] + ')' : '' ) + '</option>';
381
  }
382
  }
383
+ out += ' </select><input type="button" value="+" class="eq_btn" onclick="'+tools+'.setField();" /></div><label>Operators</label><div style="text-align:center;" class="groupBox"><div style="text-align:left;">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbarList()+'<span id="sEqModuleTutorial">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadTutorial( default_toolbar )+'</span></div><div id="sEqButtonsContainer" style="margin-top:10px;">'+$.fbuilder.controls[ 'fCalculated' ][ 'tools' ].loadToolbar( default_toolbar )+'</div><div id="sEqTipsContainer" style="background-color:#DFEFFF;border:1px solid #C2D7EF;padding:5px;margin:5px;display:none;text-align:left;"></div></div><label>Symbol to display at beginning of calculated field</label><input type="text" name="sPrefix" id="sPrefix" class="large" value="'+$.fbuilder.htmlEncode(me.prefix)+'" /><label>Symbol to display at the end of calculated field</label><input type="text" name="sSuffix" id="sSuffix" class="large" value="'+$.fbuilder.htmlEncode(me.suffix)+'" /><label>Decimals separator symbol (Ex: 25.20)</label><input type="text" name="sDecimalSymbol" id="sDecimalSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.decimalsymbol)+'" /><label>Symbol for grouping thousands (Ex: 3,000,000)</label><input type="text" name="sGroupingSymbol" id="sGroupingSymbol" class="large" value="'+$.fbuilder.htmlEncode(me.groupingsymbol)+'" />';
384
 
385
  return out;
386
  }
js/fields-public/01_fbuilder.ftext.js CHANGED
@@ -21,7 +21,7 @@
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()
27
  {
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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" 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()
27
  {
js/fields-public/02_fbuilder.fcurrency.js CHANGED
@@ -81,7 +81,7 @@
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()
87
  {
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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" '+(( 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()
87
  {
js/fields-public/02_fbuilder.fnumber.js CHANGED
@@ -70,7 +70,7 @@
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()
76
  {
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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" 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()
76
  {
js/fields-public/02_fbuilder.fslider.js CHANGED
@@ -12,6 +12,7 @@
12
  size:"small",
13
  thousandSeparator:",",
14
  centSeparator:".",
 
15
  min:0,
16
  max:100,
17
  step:1,
@@ -56,8 +57,10 @@
56
  if( me.range )
57
  {
58
  var values = $( '#'+me.name+'_slider' ).slider( 'values' );
59
- $( '#'+me.name ).val( '[' + values[ 0 ] + ',' + values[ 1 ] + ']' );
60
- $( '#'+me.name+'_caption' ).html(
 
 
61
  me.caption
62
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 0 ] ) )
63
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 1 ] ) )
@@ -66,8 +69,9 @@
66
  else
67
  {
68
  var value = $( '#'+me.name+'_slider' ).slider( 'value' );
69
- $( '#'+me.name ).val( value );
70
- $( '#'+me.name+'_caption' ).html(
 
71
  me.caption
72
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( value ) )
73
  );
@@ -89,8 +93,59 @@
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
  {
12
  size:"small",
13
  thousandSeparator:",",
14
  centSeparator:".",
15
+ typeValues:false,
16
  min:0,
17
  max:100,
18
  step:1,
57
  if( me.range )
58
  {
59
  var values = $( '#'+me.name+'_slider' ).slider( 'values' );
60
+ $('#'+me.name+'_component_left').val(values[0]);
61
+ $('#'+me.name+'_component_right').val(values[1]);
62
+ $('#'+me.name ).val( '[' + values[ 0 ] + ',' + values[ 1 ] + ']' );
63
+ $('#'+me.name+'_caption' ).html(
64
  me.caption
65
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 0 ] ) )
66
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( values[ 1 ] ) )
69
  else
70
  {
71
  var value = $( '#'+me.name+'_slider' ).slider( 'value' );
72
+ $('#'+me.name ).val( value );
73
+ $('#'+me.name+'_component_center').val(value);
74
+ $('#'+me.name+'_caption' ).html(
75
  me.caption
76
  .replace( /\{\s*0\s*\}/, me._setThousandsSeparator( value ) )
77
  );
93
  },
94
  show:function()
95
  {
96
+ var me = this;
97
+ function typeValuesComponents()
98
+ {
99
+ function component(c)
100
+ {
101
+ var min = $.fbuilder.htmlEncode(me.min),
102
+ max = $.fbuilder.htmlEncode(me.max),
103
+ step = $.fbuilder.htmlEncode(me.step),
104
+ predefined = $.fbuilder.htmlEncode(
105
+ (c == 'left') ? me.predefinedMin :
106
+ ((c == 'right') ? me.predefinedMax : me.predefined)
107
+ ),
108
+ timeoutId;
109
+
110
+ $(document).on('keyup change', '#'+me.name+'_component_'+c, function(){
111
+ var v = $('#'+me.name+'_component_center').val(),
112
+ v1 = $('#'+me.name+'_component_left').val(),
113
+ v2 = $('#'+me.name+'_component_right').val();
114
+ clearTimeout(timeoutId);
115
+ timeoutId = setTimeout(function(){
116
+ $('#'+me.name+'_slider').slider(
117
+ ((v != undefined) ? 'value' : 'values'),
118
+ ((v != undefined) ? v*1 : [Math.min(v1*1,v2*1), Math.max(v1*1,v2*1)])
119
+ );
120
+ me._setFieldValue();}, 500);
121
+ });
122
+ return '<div class="slider-type-'+c+'-component"><input aria-label="'+$.fbuilder.htmlEncode(me.title)+'" id="'+me.name+'_component_'+c+'" class="large" type="number" value="'+predefined+'" min="'+min+'" max="'+max+'" step="'+step+'" /></div>';
123
+ };
124
+
125
+ var str = '';
126
+ if(me.typeValues)
127
+ str += '<div class="slider-type-components '+me.size+'">'+
128
+ ((me.range) ? component('left')+component('right') : component('center'))+
129
+ '</div>';
130
+ return str;
131
+ };
132
+ me.predefined = (/^\s*$/.test(me.predefined)) ? me.min : me._toNumber(me._getAttr('predefined'));
133
+ return '<div class="fields '+me.csslayout+' '+me.name+' cff-slider-field" id="field'+me.form_identifier+'-'+me.index+'">'+
134
+ '<label for="'+me.name+'">'+me.title+'</label>'+
135
+ '<div class="dfield slider-container">'+
136
+ typeValuesComponents()+
137
+ '<input id="'+me.name+'" name="'+me.name+'" class="field" type="hidden" value="'+$.fbuilder.htmlEncode(me.predefined)+'"/>'+
138
+ '<div id="'+me.name+'_slider" class="slider '+me.size+'"></div>'+
139
+ '<div class="corner-captions '+me.size+'">'+
140
+ '<span class="left-corner">'+me.minCaption+'</span>'+
141
+ '<span class="right-corner">'+me.maxCaption+'</span>'+
142
+ '<div id="'+me.name+'_caption" class="slider-caption"></div>'+
143
+ '<div class="clearer"></div>'+
144
+ '</div>'+
145
+ '<span class="uh">'+me.userhelp+'</span>'+
146
+ '</div>'+
147
+ '<div class="clearer"></div>'+
148
+ '</div>';
149
  },
150
  set_min:function(v, ignore)
151
  {
js/fields-public/03_fbuilder.femail.js CHANGED
@@ -11,10 +11,31 @@
11
  readonly:false,
12
  size:"medium",
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)
20
  {
11
  readonly:false,
12
  size:"medium",
13
  equalTo:"",
14
+ regExp:"",
15
+ regExpMssg:"",
16
  show:function()
17
  {
18
  this.predefined = this._getAttr('predefined');
19
+ 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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" 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>';
20
+ },
21
+ after_show:function()
22
+ {
23
+ if( this.regExp != "" && typeof $[ 'validator' ] != 'undefined' )
24
+ {
25
+ var parts = this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);
26
+ this.regExp = ( parts === null ) ? new RegExp(this.regExp) : new RegExp(parts[2],parts[4].toLowerCase());
27
+
28
+ if(!('pattern' in $.validator.methods))
29
+ $.validator.addMethod( 'pattern', function( value, element, param )
30
+ {
31
+ try{
32
+ return this.optional(element) || param.test( value );
33
+ }
34
+ catch(err){return true;}
35
+ }
36
+ );
37
+ $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
38
+ }
39
  },
40
  val:function(raw)
41
  {
js/fields-public/04_fbuilder.fdate.js CHANGED
@@ -9,33 +9,35 @@
9
  predefinedClick:false,
10
  size:"medium",
11
  required:false,
 
 
 
12
  dformat:"mm/dd/yyyy",
13
  dseparator:"/",
14
- tformat:"24",
15
  showDropdown:false,
16
  dropdownRange:"-10:+10",
 
 
17
  minDate:"",
18
  maxDate:"",
19
- invalidDates:"",
 
 
 
 
20
  minHour:0,
21
  maxHour:23,
22
  minMinute:0,
23
  maxMinute:59,
24
-
25
  stepHour: 1,
26
  stepMinute: 1,
 
27
 
28
- showDatepicker: true,
29
- showTimepicker: false,
30
-
31
  ariaHourLabel: 'hours',
32
  ariaMinuteLabel: 'minutes',
33
  ariaAMPMLabel: 'am or pm',
34
 
35
- defaultDate:"",
36
- defaultTime:"",
37
- working_dates:[true,true,true,true,true,true,true],
38
-
39
  _set_Events : function()
40
  {
41
  var me = this,
@@ -51,9 +53,15 @@
51
 
52
  $( '#cp_calculatedfieldsf_pform'+me.form_identifier ).bind( 'reset', function(){ setTimeout( function(){ me.set_DefaultDate(); me.set_DefaultTime(); me.set_dateTime(); }, 500 ); } );
53
  },
54
- _validateDate: function( d, w, i )
55
  {
56
  try{
 
 
 
 
 
 
57
  if( d === null || !w[ d.getDay()] ) return false;
58
  if( i !== null )
59
  {
@@ -62,21 +70,30 @@
62
  if( d.getDate() == i[ j ].getDate() && d.getMonth() == i[ j ].getMonth() && d.getFullYear() == i[ j ].getFullYear() ) return false;
63
  }
64
  }
 
 
 
 
 
 
 
65
  }
66
- catch( _err ){}
67
  return true;
68
  },
69
- _validateTime : function( e, i )
70
  {
 
71
  if( i.showTimepicker )
72
  {
73
- var base = e.name.replace( '_date', '' ),
74
- h = $('#'+base+'_hours').val(),
75
- m = $('#'+base+'_minutes').val();
76
  if( i.tformat == 12 )
77
  {
78
- if( $('#'+base+'_ampm').val() == 'pm' && h != 12 ) h = h*1 + 12;
79
- if( $('#'+base+'_ampm').val() == 'am' && h == 12 ) h = 0;
 
80
  }
81
  if(
82
  h < i.minHour ||
@@ -143,8 +160,8 @@
143
  me.maxHour = _checkValue( me.maxHour, 0, 23 );
144
  me.minMinute = _checkValue( me.minMinute, 0, 59 );
145
  me.maxMinute = _checkValue( me.maxMinute, 0, 59 );
146
- me.stepHour = _checkValue( me.stepHour, 1, Math.max( 1, me.maxHour - me.minHour ) );
147
- me.stepMinute = _checkValue( me.stepMinute, 1, Math.max( 1, me.maxMinute - me.minMinute ) );
148
 
149
  // Set handles
150
  me._setHndl('minDate');
@@ -236,11 +253,11 @@
236
 
237
  dp.click( function(){ $(document).click(); $(this).focus(); } );
238
  if(me.showDropdown ) p = $.extend(p,{changeMonth: true,changeYear: true,yearRange: me.dropdownRange});
239
- p = $.extend(p, {beforeShowDay:(function(w,i) { return function(d){return [me._validateDate(d, w, i), ""];};})(me.working_dates, me.invalidDates)});
240
-
241
  dp.datepicker(p);
242
  if(!me.predefinedClick) dp.datepicker( "setDate", dd);
243
- if(!me._validateDate(dp.datepicker("getDate"), me.working_dates, me.invalidDates)) dp.datepicker( "setDate", '');
244
  },
245
  set_DefaultTime : function()
246
  {
@@ -297,7 +314,7 @@
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()
303
  {
@@ -305,31 +322,12 @@
305
  date_format = 'date'+me.dformat.replace(/[^a-z]/ig,""),
306
  validator = function( v, e )
307
  {
308
-
309
  try
310
  {
311
- var _dp = $.datepicker,
312
- _fb = $.fbuilder,
313
- p = e.name.replace('_date', '').split('_'),
314
- _index = (p.length > 1) ? '_'+p[ 1 ] : '',
315
- item = ('forms' in _fb && _index in _fb[ 'forms' ])
316
- ? _fb[ 'forms' ][ _index ].getItem(p[ 0 ]+'_'+p[ 1 ]) : null,
317
- inst = _dp._getInst( e ),
318
- minDate = _dp._determineDate( inst, _dp._get( inst, 'minDate'), null),
319
- maxDate = _dp._determineDate(inst, _dp._get(inst, 'maxDate'), null),
320
- dateFormat = _dp._get(inst, 'dateFormat'),
321
- date = _dp.parseDate(dateFormat, v, _dp._getFormatConfig(inst));
322
 
323
- if( item != null )
324
- {
325
- return this.optional( e ) ||
326
- (
327
- ( minDate == null || date >= minDate ) &&
328
- ( maxDate == null || date <= maxDate ) &&
329
- item._validateDate( $( e ).datepicker( 'getDate' ), item.working_dates, item.invalidDates ) &&
330
- item._validateTime( e, item )
331
- );
332
- }
333
  return true;
334
  }
335
  catch( er )
@@ -356,10 +354,8 @@
356
  var v = e.val(), rt;
357
  if(raw) return $.fbuilder.parseValStr(v, raw);
358
 
359
- if( dformat == 'yyyy/mm/dd' || dformat == 'yyyy/dd/mm' )
360
- rt = '(\\d{4})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{1,2})';
361
- else
362
- rt = '(\\d{1,2})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{4})';
363
 
364
  v = $.trim(e.val());
365
  var re = new RegExp( rt+'(\\s(\\d{1,2})[:\\.](\\d{1,2})\s*([amp]{2})?)?' ),
9
  predefinedClick:false,
10
  size:"medium",
11
  required:false,
12
+
13
+ // Date component
14
+ showDatepicker: true,
15
  dformat:"mm/dd/yyyy",
16
  dseparator:"/",
 
17
  showDropdown:false,
18
  dropdownRange:"-10:+10",
19
+ invalidDates:"",
20
+ working_dates:[true,true,true,true,true,true,true],
21
  minDate:"",
22
  maxDate:"",
23
+ defaultDate:"",
24
+
25
+ // Time component
26
+ showTimepicker: false,
27
+ tformat:"24",
28
  minHour:0,
29
  maxHour:23,
30
  minMinute:0,
31
  maxMinute:59,
 
32
  stepHour: 1,
33
  stepMinute: 1,
34
+ defaultTime:"",
35
 
36
+ // Labels
 
 
37
  ariaHourLabel: 'hours',
38
  ariaMinuteLabel: 'minutes',
39
  ariaAMPMLabel: 'am or pm',
40
 
 
 
 
 
41
  _set_Events : function()
42
  {
43
  var me = this,
53
 
54
  $( '#cp_calculatedfieldsf_pform'+me.form_identifier ).bind( 'reset', function(){ setTimeout( function(){ me.set_DefaultDate(); me.set_DefaultTime(); me.set_dateTime(); }, 500 ); } );
55
  },
56
+ _validateDate: function(d)
57
  {
58
  try{
59
+ var e = this,
60
+ w = e.working_dates,
61
+ i = e.invalidDates,
62
+ n = $('#'+e.name+'_date');
63
+
64
+ d = d || n.datepicker('getDate');
65
  if( d === null || !w[ d.getDay()] ) return false;
66
  if( i !== null )
67
  {
70
  if( d.getDate() == i[ j ].getDate() && d.getMonth() == i[ j ].getMonth() && d.getFullYear() == i[ j ].getFullYear() ) return false;
71
  }
72
  }
73
+
74
+ var _d = $.datepicker,
75
+ _i = _d._getInst(n[0]),
76
+ _mi = _d._determineDate(_i, _d._get(_i, 'minDate'), null),
77
+ _ma = _d._determineDate(_i, _d._get(_i, 'maxDate'), null);
78
+
79
+ if((_mi != null && d < _mi) || (_ma != null && _ma < d)) return false;
80
  }
81
+ catch( _err ){return false;}
82
  return true;
83
  },
84
+ _validateTime : function()
85
  {
86
+ var i = this;
87
  if( i.showTimepicker )
88
  {
89
+ var n = i.name,
90
+ h = $('#'+n+'_hours').val(),
91
+ m = $('#'+n+'_minutes').val();
92
  if( i.tformat == 12 )
93
  {
94
+ var x = $('#'+n+'_ampm').val()
95
+ if( x == 'pm' && h != 12 ) h = h*1 + 12;
96
+ if( x == 'am' && h == 12 ) h = 0;
97
  }
98
  if(
99
  h < i.minHour ||
160
  me.maxHour = _checkValue( me.maxHour, 0, 23 );
161
  me.minMinute = _checkValue( me.minMinute, 0, 59 );
162
  me.maxMinute = _checkValue( me.maxMinute, 0, 59 );
163
+ me.stepHour = _checkValue( me.stepHour, 1, Math.max( 1, (me.maxHour - me.minHour )+1 ) );
164
+ me.stepMinute = _checkValue( me.stepMinute, 1, Math.max( 1, (me.maxMinute - me.minMinute)+1 ) );
165
 
166
  // Set handles
167
  me._setHndl('minDate');
253
 
254
  dp.click( function(){ $(document).click(); $(this).focus(); } );
255
  if(me.showDropdown ) p = $.extend(p,{changeMonth: true,changeYear: true,yearRange: me.dropdownRange});
256
+ p = $.extend(p, {beforeShowDay:function(d){return [me._validateDate(d), ""];}});
257
+ if(me.defaultDate != "") p.defaultDate = me.defaultDate;
258
  dp.datepicker(p);
259
  if(!me.predefinedClick) dp.datepicker( "setDate", dd);
260
+ if(!me._validateDate()) dp.datepicker( "setDate", '');
261
  },
262
  set_DefaultTime : function()
263
  {
314
  else{ date_tag_type = 'hidden'; disabled='disabled';}
315
  if( me.showTimepicker ) format_label.push('HH:mm');
316
  this.predefined = this._getAttr('predefined');
317
+ 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 aria-label="'+$.fbuilder.htmlEncode(me.title)+'" 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>';
318
  },
319
  after_show:function()
320
  {
322
  date_format = 'date'+me.dformat.replace(/[^a-z]/ig,""),
323
  validator = function( v, e )
324
  {
 
325
  try
326
  {
327
+ var p = e.name.replace('_date', '').split('_'),
328
+ i = $.fbuilder.forms['_'+p[1]].getItem(p[0]);
 
 
 
 
 
 
 
 
 
329
 
330
+ if(i != null) return this.optional(e) || (i._validateDate() && i._validateTime());
 
 
 
 
 
 
 
 
 
331
  return true;
332
  }
333
  catch( er )
354
  var v = e.val(), rt;
355
  if(raw) return $.fbuilder.parseValStr(v, raw);
356
 
357
+ if(/^y/i.test(dformat)) rt = '(\\d{4})[^\\d](\\d{1,2})[^\\d](\\d{1,2})';
358
+ else rt = '(\\d{1,2})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{4})';
 
 
359
 
360
  v = $.trim(e.val());
361
  var re = new RegExp( rt+'(\\s(\\d{1,2})[:\\.](\\d{1,2})\s*([amp]{2})?)?' ),
js/fields-public/05_fbuilder.ftextarea.js CHANGED
@@ -18,7 +18,7 @@
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)
24
  {
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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" '+((!/^\s*$/.test(this.rows)) ? 'rows='+this.rows : '' )+' id="'+this.name+'" name="'+this.name+'"'+((this.minlength.length) ? ' minlength="'+this.minlength+'"' : '')+((this.maxlength.length) ? ' maxlength="'+this.maxlength+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+((this.readonly)?'readonly':'')+'>'+((!this.predefinedClick) ? this.predefined : '')+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
22
  },
23
  val:function(raw)
24
  {
js/fields-public/06_fbuilder.fcheck.js CHANGED
@@ -30,7 +30,7 @@
30
 
31
  classDep = (this.choicesDep[ i ].length) ? 'depItem': '';
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
  },
@@ -113,7 +113,7 @@
113
  if( e.length )
114
  {
115
  e.each( function(){
116
- var t = (m) ? $.fbuilder.parseVal(this.value) : $.fbuilder.parseValStr(this.value, raw);
117
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
118
  if(m) v = (v)?v+t:t;
119
  else v.push(t);
30
 
31
  classDep = (this.choicesDep[ i ].length) ? 'depItem': '';
32
 
33
+ str += '<div class="'+this.layout+'"><label for="'+this.name+'_cb'+i+'"><input aria-label="'+$.fbuilder.htmlEncode(this.choices[i])+'" 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
  },
113
  if( e.length )
114
  {
115
  e.each( function(){
116
+ var t = (m) ? $.fbuilder.parseVal(this.value) : $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw);
117
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
118
  if(m) v = (v)?v+t:t;
119
  else v.push(t);
js/fields-public/07_fbuilder.fradio.js CHANGED
@@ -35,7 +35,7 @@
35
 
36
  for (var i=0;i<l;i++)
37
  {
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>';
@@ -114,7 +114,7 @@
114
  {
115
  raw = raw || false;
116
  var e = $( '[id*="' + this.name + '"]:not(.ignore):checked' );
117
- if( e.length ) return $.fbuilder.parseValStr( e.val(), raw );
118
  return 0;
119
  },
120
  setVal:function( v )
35
 
36
  for (var i=0;i<l;i++)
37
  {
38
+ str += '<div class="'+this.layout+'"><label for="'+this.name+'_rb'+i+'"><input aria-label="'+$.fbuilder.htmlEncode(this.choices[i])+'" 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>';
114
  {
115
  raw = raw || false;
116
  var e = $( '[id*="' + this.name + '"]:not(.ignore):checked' );
117
+ if( e.length ) return $.fbuilder.parseValStr( (raw == 'vt') ? e.attr('vt') : e.val(), raw );
118
  return 0;
119
  },
120
  setVal:function( v )
js/fields-public/08_fbuilder.fdropdown.js CHANGED
@@ -54,7 +54,7 @@
54
  }
55
  if(op_o) str += '</optgroup>';
56
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-dropdown-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label>'+
57
- '<div class="dfield"><select id="'+this.name+'" name="'+this.name+((this.multiple)? '[]':'')+'" class="field '+( ( classDep != '' ) ? ' depItemSel ' : '' )+this.size+((this.required)?' required':'')+'" '+((this.multiple == true)?' multiple="multiple" size="'+((this.vChoices) ? this.vChoices : 1)+'"':'')+'>'+str+'</select><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div><div class="clearer"></div></div>';
58
  },
59
  showHideDep:function( toShow, toHide, hiddenByContainer )
60
  {
@@ -128,7 +128,7 @@
128
  if(e.length)
129
  {
130
  e.each(function(){
131
- var t = $.fbuilder.parseValStr( this.value, raw );
132
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
133
  if(!m || g) v = (v)?v+t:t;
134
  else v.push(t);
54
  }
55
  if(op_o) str += '</optgroup>';
56
  return '<div class="fields '+this.csslayout+' '+this.name+' cff-dropdown-field" id="field'+this.form_identifier+'-'+this.index+'"><label for="'+this.name+'">'+this.title+''+((this.required)?"<span class='r'>*</span>":"")+'</label>'+
57
+ '<div class="dfield"><select aria-label="'+$.fbuilder.htmlEncode(this.title)+'" id="'+this.name+'" name="'+this.name+((this.multiple)? '[]':'')+'" class="field '+( ( classDep != '' ) ? ' depItemSel ' : '' )+this.size+((this.required)?' required':'')+'" '+((this.multiple == true)?' multiple="multiple" size="'+((this.vChoices) ? this.vChoices : 1)+'"':'')+'>'+str+'</select><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div><div class="clearer"></div></div>';
58
  },
59
  showHideDep:function( toShow, toHide, hiddenByContainer )
60
  {
128
  if(e.length)
129
  {
130
  e.each(function(){
131
+ var t = $.fbuilder.parseValStr((raw == 'vt') ? this.getAttribute('vt') : this.value, raw);
132
  if(!$.isNumeric(t)) t = t.replace(/^"/,'').replace(/"$/,'');
133
  if(!m || g) v = (v)?v+t:t;
134
  else v.push(t);
js/fields-public/09_fbuilder.ffile.js CHANGED
@@ -25,7 +25,7 @@
25
  this.accept = $.fbuilder.htmlEncode($.trim(this.accept));
26
  this.upload_size = $.fbuilder.htmlEncode($.trim(this.upload_size));
27
 
28
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-file-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 type="file" id="'+this.name+'" name="'+this.name+'[]"'+((this.accept.length) ? ' accept="'+this.accept+'"' : '')+((this.upload_size.length) ? ' upload_size="'+this.upload_size+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+( ( this.multiple ) ? 'multiple' : '' )+' />'+((this._patch) ? '<input type="hidden" id="'+this.name+'_patch" name="'+this.name+'_patch" value="1" />' : '' )+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
29
  },
30
  after_show:function()
31
  {
25
  this.accept = $.fbuilder.htmlEncode($.trim(this.accept));
26
  this.upload_size = $.fbuilder.htmlEncode($.trim(this.upload_size));
27
 
28
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-file-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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" type="file" id="'+this.name+'" name="'+this.name+'[]"'+((this.accept.length) ? ' accept="'+this.accept+'"' : '')+((this.upload_size.length) ? ' upload_size="'+this.upload_size+'"' : '')+' class="field '+this.size+((this.required)?" required":"")+'" '+( ( this.multiple ) ? 'multiple' : '' )+' />'+((this._patch) ? '<input type="hidden" id="'+this.name+'_patch" name="'+this.name+'_patch" value="1" />' : '' )+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>';
29
  },
30
  after_show:function()
31
  {
js/fields-public/10_fbuilder.fpassword.js CHANGED
@@ -12,13 +12,34 @@
12
  minlength:"",
13
  maxlength:"",
14
  equalTo:"",
 
 
15
  show:function()
16
  {
17
  this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
18
  this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
19
  this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
20
  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)
24
  {
12
  minlength:"",
13
  maxlength:"",
14
  equalTo:"",
15
+ regExp:"",
16
+ regExpMssg:"",
17
  show:function()
18
  {
19
  this.minlength = $.fbuilder.htmlEncode($.trim(this.minlength));
20
  this.maxlength = $.fbuilder.htmlEncode($.trim(this.maxlength));
21
  this.equalTo = $.fbuilder.htmlEncode($.trim(this.equalTo));
22
  this.predefined = this._getAttr('predefined');
23
+ 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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" 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>';
24
+ },
25
+ after_show:function()
26
+ {
27
+ if( this.regExp != "" && typeof $[ 'validator' ] != 'undefined' )
28
+ {
29
+ var parts = this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);
30
+ this.regExp = ( parts === null ) ? new RegExp(this.regExp) : new RegExp(parts[2],parts[4].toLowerCase());
31
+
32
+ if(!('pattern' in $.validator.methods))
33
+ $.validator.addMethod( 'pattern', function( value, element, param )
34
+ {
35
+ try{
36
+ return this.optional(element) || param.test( value );
37
+ }
38
+ catch(err){return true;}
39
+ }
40
+ );
41
+ $('#'+this.name).rules('add',{'pattern':this.regExp, messages:{'pattern':this.regExpMssg}});
42
+ }
43
  },
44
  val:function(raw)
45
  {
js/fields-public/11_fbuilder.fphone.js CHANGED
@@ -30,7 +30,7 @@
30
  {
31
  if ($.trim(tmp[i])!="")
32
  {
33
- str += '<div class="uh_phone" ><input type="text" id="'+this.name+'_'+i+'" name="'+this.name+'_'+i+'" class="field '+((i==0) ? ' phone ' : ' digits ')+((this.required) ? ' required ' : '')+'" size="'+$.trim(tmp[i]).length+'" '+attr+'="'+((tmpv[i])?tmpv[i]:"")+'" maxlength="'+$.trim(tmp[i]).length+'" minlength="'+$.trim(tmp[i]).length+'" '+((this.readonly)?'readonly':'')+' /><div class="l">'+$.trim(tmp[i])+'</div></div>';
34
  }
35
  }
36
 
30
  {
31
  if ($.trim(tmp[i])!="")
32
  {
33
+ str += '<div class="uh_phone" ><input aria-label="'+$.fbuilder.htmlEncode(this.title)+'" type="text" id="'+this.name+'_'+i+'" name="'+this.name+'_'+i+'" class="field '+((i==0) ? ' phone ' : ' digits ')+((this.required) ? ' required ' : '')+'" size="'+$.trim(tmp[i]).length+'" '+attr+'="'+((tmpv[i])?tmpv[i]:"")+'" maxlength="'+$.trim(tmp[i]).length+'" minlength="'+$.trim(tmp[i]).length+'" '+((this.readonly)?'readonly':'')+' /><div class="l">'+$.trim(tmp[i])+'</div></div>';
34
  }
35
  }
36
 
js/fields-public/16_fbuilder.fsummary.js CHANGED
@@ -86,7 +86,9 @@
86
  }
87
  else if( e[0].tagName == 'SELECT' )
88
  {
89
- v.push( $(e[0].options[ e[0].selectedIndex ]).attr( 'vt' ) );
 
 
90
  }
91
  else
92
  {
86
  }
87
  else if( e[0].tagName == 'SELECT' )
88
  {
89
+ var vt = [];
90
+ e.find('option:selected').each(function(){vt.push($(this).attr('vt'));});
91
+ v.push(vt.join(', '));
92
  }
93
  else
94
  {
js/fields-public/29_fbuilder.ffieldset.fc.js CHANGED
@@ -7,14 +7,17 @@
7
  ftype:"ffieldset",
8
  fields:[],
9
  columns:1,
 
10
  rearrange: 0,
11
  show:function()
12
  {
13
- return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field" id="field'+this.form_identifier+'-'+this.index+'"><FIELDSET id="'+this.name+'">'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'</FIELDSET><div class="clearer"></div></div>';
14
  },
15
  after_show: function()
16
  {
 
17
  $.fbuilder.controls[ 'fcontainer' ].prototype.after_show.call(this);
 
18
  },
19
  showHideDep:function( toShow, toHide, hiddenByContainer )
20
  {
7
  ftype:"ffieldset",
8
  fields:[],
9
  columns:1,
10
+ collapsible:false,
11
  rearrange: 0,
12
  show:function()
13
  {
14
+ return '<div class="fields '+this.csslayout+' '+this.name+' cff-container-field '+((this.collapsible) ? 'cff-collapsible cff-collapsed' : '')+'" id="field'+this.form_identifier+'-'+this.index+'"><FIELDSET>'+( ( !/^\s*$/.test( this.title ) ) ? '<LEGEND>'+this.title+'</LEGEND>' : '' )+'<div id="'+this.name+'"></div></FIELDSET><div class="clearer"></div></div>';
15
  },
16
  after_show: function()
17
  {
18
+ var me = this;
19
  $.fbuilder.controls[ 'fcontainer' ].prototype.after_show.call(this);
20
+ if(me.collapsible) $('.'+me.name+'>fieldset>legend').bind('click', function(){$(this).closest('.cff-collapsible').toggleClass('cff-collapsed');});
21
  },
22
  showHideDep:function( toShow, toHide, hiddenByContainer )
23
  {
js/fields-public/32_fbuilder.fbutton.js CHANGED
@@ -61,11 +61,13 @@
61
  function()
62
  {
63
  var identifier = e.closest( 'form' ).attr( 'id' ).replace( /cp_calculatedfieldsf_pform/, '' );
 
64
  $.fbuilder[ 'showHideDep' ]( { 'formIdentifier' : identifier } );
65
 
66
  var page = parseInt( e.closest( '.pbreak' ).attr( 'page' ) );
67
  if( page )
68
  {
 
69
  $("#fieldlist"+identifier+" .pbreak").css("display","none");
70
  $("#fieldlist"+identifier+" .pbreak").find(".field").addClass("ignorepb");
71
  $("#fieldlist"+identifier+" .pb0").css("display","block");
61
  function()
62
  {
63
  var identifier = e.closest( 'form' ).attr( 'id' ).replace( /cp_calculatedfieldsf_pform/, '' );
64
+ e.closest('form').find(':data(manually)').removeData('manually');
65
  $.fbuilder[ 'showHideDep' ]( { 'formIdentifier' : identifier } );
66
 
67
  var page = parseInt( e.closest( '.pbreak' ).attr( 'page' ) );
68
  if( page )
69
  {
70
+ $.fbuilder.forms[identifier]['currentPage'] = 0;
71
  $("#fieldlist"+identifier+" .pbreak").css("display","none");
72
  $("#fieldlist"+identifier+" .pbreak").find(".field").addClass("ignorepb");
73
  $("#fieldlist"+identifier+" .pb0").css("display","block");
js/fields-public/36_fbuilder.acceptance.js CHANGED
@@ -25,7 +25,7 @@
25
  dlg += '<div class="cff-dialog hide"><span class="cff-close-dlg"></span><div class="cff-dialog-content">'+me.message+'</div></div>'
26
  }
27
  return '<div class="fields '+me.csslayout+' '+me.name+' cff-checkbox-field" id="field'+me.form_identifier+'-'+me.index+'"><div class="dfield">'+
28
- '<div class="one_column"><label for="'+me.name+'"><input name="'+me.name+'" id="'+me.name+'" class="field required" value="'+$.fbuilder.htmlEncode(me.value)+'" vt="'+$.fbuilder.htmlEncode((/^\s*$/.test(me.value)) ? me.title : me.value)+'" type="checkbox" /> <span>'+
29
  $.fbuilder.htmlDecode( label )+''+((me.required)?'<span class="r">*</span>':'')+
30
  '</span></label></div>'+dlg+'<span class="uh"></span></div><div class="clearer"></div></div>';
31
  },
25
  dlg += '<div class="cff-dialog hide"><span class="cff-close-dlg"></span><div class="cff-dialog-content">'+me.message+'</div></div>'
26
  }
27
  return '<div class="fields '+me.csslayout+' '+me.name+' cff-checkbox-field" id="field'+me.form_identifier+'-'+me.index+'"><div class="dfield">'+
28
+ '<div class="one_column"><label for="'+me.name+'"><input aria-label="'+$.fbuilder.htmlEncode(me.title)+'" name="'+me.name+'" id="'+me.name+'" class="field required" value="'+$.fbuilder.htmlEncode(me.value)+'" vt="'+$.fbuilder.htmlEncode((/^\s*$/.test(me.value)) ? me.title : me.value)+'" type="checkbox" /> <span>'+
29
  $.fbuilder.htmlDecode( label )+''+((me.required)?'<span class="r">*</span>':'')+
30
  '</span></label></div>'+dlg+'<span class="uh"></span></div><div class="clearer"></div></div>';
31
  },
js/fields-public/fbuilder.fcalculated.js CHANGED
@@ -15,12 +15,13 @@
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()
26
  {
@@ -59,7 +60,8 @@
59
 
60
  // Events
61
  var e = $( '[id="'+me.name+'"]' );
62
- e.bind(
 
63
  'calcualtedfield_changed',
64
  {obj: me},
65
  function( evt ){
@@ -240,9 +242,13 @@
240
  // Private function, the variable names in the equations are replaced by its values, return the equation result or false if error
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;
@@ -259,7 +265,7 @@
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
  }
15
  groupingsymbol:"",
16
  dependencies:[ {'rule' : '', 'complex' : false, 'fields' : [ '' ] } ],
17
  readonly:true,
18
+ noEvalIfManual:true,
19
  formatDynamically:false,
20
  hidefield:false,
21
  show:function()
22
  {
23
  this.predefined = this._getAttr('predefined');
24
+ 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 aria-label="'+$.fbuilder.htmlEncode(this.title)+'" 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>';
25
  },
26
  after_show:function()
27
  {
60
 
61
  // Events
62
  var e = $( '[id="'+me.name+'"]' );
63
+ if(me.readonly == false && me.noEvalIfManual) e.bind('keyup', function(){e.data('manually', 1);});
64
+ e.bind(
65
  'calcualtedfield_changed',
66
  {obj: me},
67
  function( evt ){
242
  // Private function, the variable names in the equations are replaced by its values, return the equation result or false if error
243
  _calculate = function( eq, suffix, __ME__ )
244
  {
245
+ var e = $.fbuilder['forms'][suffix].getItem( __ME__ ),
246
+ __ME__ = e.val();
247
+
248
+ if($('#'+e.name).data('manually') == 1) return __ME__;
249
+
250
+ var _match,
251
+ field_regexp = new RegExp( '(fieldname\\d+'+suffix+')(_[cr]b\\d+)?(\\|[rnv])?([\\D\\b])','i');
252
 
253
  window['getField'] = $.fbuilder['forms'][suffix].getItem;
254
  $.fbuilder['currentFormId'] = $.fbuilder['forms'][suffix].formId;
265
  }
266
  else
267
  {
268
+ v = field.val((_match[3]) ? ((_match[3] == '|v') ? 'vt' : ((_match[3] == '|r') ? true : false)) : false);
269
  if( typeof v == 'object' && typeof window.JSON != 'undefined' ) v = JSON.stringify( v );
270
  else if( $.isNumeric( v ) ) v = '('+v+')';
271
  }
js/modules/01_mathematical_logical/admin/module_admin.js CHANGED
@@ -22,6 +22,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
22
  { "value" : "FLOOR", "code" : "FLOOR(", "tip" : "Returns the next lower integer that is less than or equal to the number passed as parameter. <strong>FLOOR(number)</strong><br>The FLOOR operation accepts a second parameter for rounding the number to the previous multiple of this second parameter. <strong>FLOOR(X,Y)</strong>" },
23
  { "value" : "ROUND", "code" : "ROUND(", "tip" : "Returns an integer that follows rounding rules. If the value of the passed parameter is greater than or equal to x.5, the returned value is x+1; otherwise the returned value is x. <strong>ROUND(number)</strong><br>The ROUND operation accepts a second parameter for rounding the number to the nearest multiple of this second parameter. <strong>ROUND(X,Y)</strong>" },
24
  { "value" : "PREC", "code" : "PREC(", "tip" : "Returns the value of the number passed in the first parameter with so many decimal digits as the number passed in the second parameter. <strong>PREC(number1, number2)</strong>" },
 
25
  { "value" : "CDATE", "code" : "CDATE(", "tip" : "Returns the number formatted like a Date. <strong>CDATE(number,format)</strong>. The second parameter defines the format of the output date: &quot;mm/dd.yyyy&quot;, &quot;dd/mm/yyyy&quot;" },
26
  { "value" : "LOG", "code" : "LOG(", "tip" : "Returns the natural logarithm (base e) of the number passed as parameter. <strong>LOG(number)</strong>" },
27
  { "value" : "LOGAB", "code" : "LOGAB(", "tip" : "Returns the logarithm of A (base B). <strong>LOGAB(number, base)</strong>" },
@@ -40,7 +41,9 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
40
  { "value" : "ATAN2", "code" : "ATAN2(", "tip" : "ATAN2(y,x) returns the angle in radians between the plane and the point (x,y).<br> <strong>ATAN2(90,15) = 1.4056476493802699</strong>" },
41
  { "value" : "ATANH", "code" : "ATANH(", "tip" : "ATANH(x) returns the hyperbolic arctangent of the number x.<br> <strong>ATANH(0.5) = 0.549306144334055</strong>" },
42
  { "value" : "DEGREES", "code" : "DEGREES(", "tip" : "DEGREES(x) converts the x in radians to degrees.<br> <strong>DEGREES(1.5707963267948966) = 90</strong>" },
43
- { "value" : "RADIANS", "code" : "RADIANS(", "tip" : "RADIANS(x) converts the x in degrees to radians.<br> <strong>RADIANS(90) = 1.5707963267948966</strong>" }
 
 
44
  ]
45
  },
46
 
22
  { "value" : "FLOOR", "code" : "FLOOR(", "tip" : "Returns the next lower integer that is less than or equal to the number passed as parameter. <strong>FLOOR(number)</strong><br>The FLOOR operation accepts a second parameter for rounding the number to the previous multiple of this second parameter. <strong>FLOOR(X,Y)</strong>" },
23
  { "value" : "ROUND", "code" : "ROUND(", "tip" : "Returns an integer that follows rounding rules. If the value of the passed parameter is greater than or equal to x.5, the returned value is x+1; otherwise the returned value is x. <strong>ROUND(number)</strong><br>The ROUND operation accepts a second parameter for rounding the number to the nearest multiple of this second parameter. <strong>ROUND(X,Y)</strong>" },
24
  { "value" : "PREC", "code" : "PREC(", "tip" : "Returns the value of the number passed in the first parameter with so many decimal digits as the number passed in the second parameter. <strong>PREC(number1, number2)</strong>" },
25
+ { "value" : "AVERAGE", "code" : "AVERAGE(", "tip" : "Returns the average of values passed by parameter. <strong>AVERAGE(3,10,11)</strong> returns <strong>8</strong>" },
26
  { "value" : "CDATE", "code" : "CDATE(", "tip" : "Returns the number formatted like a Date. <strong>CDATE(number,format)</strong>. The second parameter defines the format of the output date: &quot;mm/dd.yyyy&quot;, &quot;dd/mm/yyyy&quot;" },
27
  { "value" : "LOG", "code" : "LOG(", "tip" : "Returns the natural logarithm (base e) of the number passed as parameter. <strong>LOG(number)</strong>" },
28
  { "value" : "LOGAB", "code" : "LOGAB(", "tip" : "Returns the logarithm of A (base B). <strong>LOGAB(number, base)</strong>" },
41
  { "value" : "ATAN2", "code" : "ATAN2(", "tip" : "ATAN2(y,x) returns the angle in radians between the plane and the point (x,y).<br> <strong>ATAN2(90,15) = 1.4056476493802699</strong>" },
42
  { "value" : "ATANH", "code" : "ATANH(", "tip" : "ATANH(x) returns the hyperbolic arctangent of the number x.<br> <strong>ATANH(0.5) = 0.549306144334055</strong>" },
43
  { "value" : "DEGREES", "code" : "DEGREES(", "tip" : "DEGREES(x) converts the x in radians to degrees.<br> <strong>DEGREES(1.5707963267948966) = 90</strong>" },
44
+ { "value" : "RADIANS", "code" : "RADIANS(", "tip" : "RADIANS(x) converts the x in degrees to radians.<br> <strong>RADIANS(90) = 1.5707963267948966</strong>" },
45
+ { "value" : "FACTORIAL", "code" : "FACTORIAL(", "tip" : "FACTORIAL(x) returns the factorial of x or null if x is not an integer greater than 0.<br> <strong>FACTORIAL(4) = 24</strong>" },
46
+ { "value" : "SCIENTIFICTODECIMAL", "code" : "SCIENTIFICTODECIMAL(", "tip" : "SCIENTIFICTODECIMAL(x) returns the decimal representation of x.<br> <strong>SCIENTIFICTODECIMAL(3.5e4) = 35000</strong>" }
47
  ]
48
  },
49
 
js/modules/01_mathematical_logical/public/module_public.js CHANGED
@@ -119,8 +119,12 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
119
  var r = 0, t;
120
  for(var i in arguments)
121
  {
122
- t = arguments[i]*1;
123
- if(!isNaN(t)) r += t;
 
 
 
 
124
  }
125
  return r;
126
  };
@@ -131,11 +135,21 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
131
  window.CONCATENATE = window.concatenate = function ()
132
  {
133
  var r = '';
134
- for(var i in arguments) r += (new String(arguments[i]));
 
 
135
  return r;
136
  };
137
  } // End if window.CONCATENATE
138
 
 
 
 
 
 
 
 
 
139
  if(window.GCD == undefined)
140
  {
141
  window.GCD = window.gcd = function( a, b)
@@ -161,7 +175,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
161
  };
162
  } // End if window.LOGAB
163
 
164
- var math_prop = ["LN10", "PI", "E", "LOG10E", "SQRT2", "LOG2E", "SQRT1_2", "LN2", "cos", "pow", "log", "tan", "sqrt", "asin", "abs", "max", "exp", "atan2", "atanh", "random", "acos", "atan", "min", "sin"];
165
 
166
  for(var i = 0, h = math_prop.length; i < h; i++)
167
  {
@@ -171,6 +185,28 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
171
  }
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  if(window.RADIANS == undefined)
175
  {
176
  window.RADIANS = window.radians = function(a){ return a*PI/180;};
@@ -181,6 +217,42 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ] = {
181
  window.DEGREES = window.degrees = function(a){ return a*180/PI;};
182
  }
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ]( fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ][ 'prefix' ], CF_LOGICAL );
185
  },
186
 
119
  var r = 0, t;
120
  for(var i in arguments)
121
  {
122
+ if(Array.isArray(arguments[i])) r += SUM.apply(this,arguments[i]);
123
+ else
124
+ {
125
+ t = arguments[i]*1;
126
+ if(!isNaN(t)) r += t;
127
+ }
128
  }
129
  return r;
130
  };
135
  window.CONCATENATE = window.concatenate = function ()
136
  {
137
  var r = '';
138
+ for(var i in arguments)
139
+ if(Array.isArray(arguments[i])) r += CONCATENATE.apply(this,arguments[i]);
140
+ else r += (new String(arguments[i]));
141
  return r;
142
  };
143
  } // End if window.CONCATENATE
144
 
145
+ if(window.AVERAGE == undefined)
146
+ {
147
+ window.AVERAGE = window.average = function ()
148
+ {
149
+ return SUM.apply(this,arguments)/arguments.length;
150
+ };
151
+ } // End if window.AVERAGE
152
+
153
  if(window.GCD == undefined)
154
  {
155
  window.GCD = window.gcd = function( a, b)
175
  };
176
  } // End if window.LOGAB
177
 
178
+ var math_prop = ["LN10", "PI", "E", "LOG10E", "SQRT2", "LOG2E", "SQRT1_2", "LN2", "cos", "pow", "log", "tan", "sqrt", "asin", "abs", "exp", "atan2", "atanh", "random", "acos", "atan", "sin"];
179
 
180
  for(var i = 0, h = math_prop.length; i < h; i++)
181
  {
185
  }
186
  }
187
 
188
+ if(window.MIN == undefined)
189
+ {
190
+ window.MIN = window.min = function ()
191
+ {
192
+ var l = [];
193
+ for(var i in arguments)
194
+ var l = l.concat(arguments[i]);
195
+ return Math.min.apply(this, l);
196
+ };
197
+ } // End if window.MIN
198
+
199
+ if(window.MAX == undefined)
200
+ {
201
+ window.MAX = window.max = function ()
202
+ {
203
+ var l = [];
204
+ for(var i in arguments)
205
+ var l = l.concat(arguments[i]);
206
+ return Math.max.apply(this, l);
207
+ };
208
+ } // End if window.MAX
209
+
210
  if(window.RADIANS == undefined)
211
  {
212
  window.RADIANS = window.radians = function(a){ return a*PI/180;};
217
  window.DEGREES = window.degrees = function(a){ return a*180/PI;};
218
  }
219
 
220
+ if(window.FACTORIAL == undefined)
221
+ {
222
+ window.FACTORIAL = window.factorial = function(a){
223
+ if(a<0 || FLOOR(a) != a) return null;
224
+ var r = 1;
225
+ for(var i=1; i<=a; i++) r *= i
226
+ return r;
227
+ };
228
+ }
229
+
230
+ if(window.SCIENTIFICTODECIMAL == undefined)
231
+ {
232
+ window.SCIENTIFICTODECIMAL = window.scientifictodecimal = function(x){
233
+ if (Math.abs(x) < 1.0)
234
+ {
235
+ var e = parseInt(x.toString().split('e-')[1]);
236
+ if(e)
237
+ {
238
+ x *= Math.pow(10,e-1);
239
+ x = '0.' + (new Array(e)).join('0') + x.toString().substring(2);
240
+ }
241
+ }
242
+ else
243
+ {
244
+ var e = parseInt(x.toString().split('+')[1]);
245
+ if (e > 20)
246
+ {
247
+ e -= 20;
248
+ x /= Math.pow(10,e);
249
+ x += (new Array(e+1)).join('0');
250
+ }
251
+ }
252
+ return x;
253
+ };
254
+ }
255
+
256
  fbuilderjQuery[ 'fbuilder' ][ 'extend_window' ]( fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'default' ][ 'prefix' ], CF_LOGICAL );
257
  },
258
 
languages/calculated-fields-form-en_US.mo CHANGED
Binary file
languages/calculated-fields-form-en_US.po CHANGED
@@ -1,15 +1,15 @@
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"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.3.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
@@ -37,11 +37,11 @@ msgid ""
37
  "\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
38
  msgstr ""
39
 
40
- #: inc/cpcff_admin_int.inc.php:32
41
  msgid "Settings saved"
42
  msgstr ""
43
 
44
- #: inc/cpcff_admin_int.inc.php:46 inc/cpcff_admin_int_list.inc.php: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
@@ -52,46 +52,46 @@ msgstr ""
52
  msgid "Calculated Fields Form"
53
  msgstr ""
54
 
55
- #: inc/cpcff_admin_int.inc.php:46
56
  msgid "Form"
57
  msgstr ""
58
 
59
- #: inc/cpcff_admin_int.inc.php:53
60
  msgid "Direct form URL"
61
  msgstr ""
62
 
63
- #: inc/cpcff_admin_int.inc.php:56
64
  msgid "Back to items list..."
65
  msgstr ""
66
 
67
- #: inc/cpcff_admin_int.inc.php:66 inc/cpcff_admin_int.inc.php:221
68
  msgid "Form Settings"
69
  msgstr ""
70
 
71
- #: inc/cpcff_admin_int.inc.php:68
72
  msgid ""
73
  "* Different form styles available on the tab Form Settings &gt;&gt; Form "
74
  "Template"
75
  msgstr ""
76
 
77
- #: inc/cpcff_admin_int.inc.php:71
78
  msgid "Form Builder"
79
  msgstr ""
80
 
81
- #: inc/cpcff_admin_int.inc.php:73
82
  msgid "Revisions"
83
  msgstr ""
84
 
85
- #: inc/cpcff_admin_int.inc.php:77
86
  msgid "Select a revision"
87
  msgstr ""
88
 
89
- #: inc/cpcff_admin_int.inc.php:87 inc/cpcff_admin_int.inc.php:241
90
- #: inc/cpcff_admin_int.inc.php:608
91
  msgid "Preview"
92
  msgstr ""
93
 
94
- #: inc/cpcff_admin_int.inc.php:98
95
  msgid ""
96
  "If the form is not loading in the public website, go to the settings page of "
97
  "the plugin through the menu option: \"Settings/Calculated Fields Form\", "
@@ -99,7 +99,7 @@ msgid ""
99
  "press the \"Update\" button."
100
  msgstr ""
101
 
102
- #: inc/cpcff_admin_int.inc.php:98
103
  msgid ""
104
  "If you need also the form to be sent to the server side for processing (for "
105
  "example to deliver emails) then the <a href=\"https://cff.dwbooster.com/\" "
@@ -107,412 +107,412 @@ msgid ""
107
  "be required."
108
  msgstr ""
109
 
110
- #: inc/cpcff_admin_int.inc.php:122
111
  msgid ""
112
  "The action will load the revision selected, the data are not stored will be "
113
  "lose. Do you want continue?"
114
  msgstr ""
115
 
116
- #: inc/cpcff_admin_int.inc.php:140
117
  msgid ""
118
  "These features aren't available in this version. Do you want to open the "
119
  "plugin's page to check other versions?"
120
  msgstr ""
121
 
122
- #: inc/cpcff_admin_int.inc.php:219
123
  msgid "Add a Field"
124
  msgstr ""
125
 
126
- #: inc/cpcff_admin_int.inc.php:220
127
  msgid "Field Settings"
128
  msgstr ""
129
 
130
- #: inc/cpcff_admin_int.inc.php:240 inc/cpcff_admin_int.inc.php:352
131
- #: inc/cpcff_admin_int.inc.php:648
132
  msgid "Save Changes"
133
  msgstr ""
134
 
135
- #: inc/cpcff_admin_int.inc.php:242
136
  msgid "Generate revisions in the form preview as well"
137
  msgstr ""
138
 
139
- #: inc/cpcff_admin_int.inc.php:246
140
  msgid "Define Texts"
141
  msgstr ""
142
 
143
- #: inc/cpcff_admin_int.inc.php:250
144
  msgid "Previous button label (text)"
145
  msgstr ""
146
 
147
- #: inc/cpcff_admin_int.inc.php:254
148
  msgid "Next button label (text)"
149
  msgstr ""
150
 
151
- #: inc/cpcff_admin_int.inc.php:259
152
  msgid ""
153
  "- The styles can be applied into any of the CSS files of your theme or into "
154
  "the CSS file <em>\"calculated-fields-form\\css\\stylepublic.css\"</em>."
155
  msgstr ""
156
 
157
- #: inc/cpcff_admin_int.inc.php:260
158
  msgid ""
159
  "- For general CSS styles modifications to the form and samples <a href="
160
  "\"https://cff.dwbooster.com/faq#q82\" target=\"_blank\">check this FAQ</a>."
161
  msgstr ""
162
 
163
- #: inc/cpcff_admin_int.inc.php:282
164
  msgid "Validation Settings"
165
  msgstr ""
166
 
167
- #: inc/cpcff_admin_int.inc.php:286
168
  msgid "\"is required\" text"
169
  msgstr ""
170
 
171
- #: inc/cpcff_admin_int.inc.php:290
172
  msgid "\"is email\" text"
173
  msgstr ""
174
 
175
- #: inc/cpcff_admin_int.inc.php:294
176
  msgid "\"is valid captcha\" text"
177
  msgstr ""
178
 
179
- #: inc/cpcff_admin_int.inc.php:299
180
  msgid "\"is valid date (mm/dd/yyyy)\" text"
181
  msgstr ""
182
 
183
- #: inc/cpcff_admin_int.inc.php:303
184
  msgid "\"is valid date (dd/mm/yyyy)\" text"
185
  msgstr ""
186
 
187
- #: inc/cpcff_admin_int.inc.php:307
188
  msgid "\"is number\" text"
189
  msgstr ""
190
 
191
- #: inc/cpcff_admin_int.inc.php:311
192
  msgid "\"only digits\" text"
193
  msgstr ""
194
 
195
- #: inc/cpcff_admin_int.inc.php:315
196
  msgid "\"under maximum\" text"
197
  msgstr ""
198
 
199
- #: inc/cpcff_admin_int.inc.php:319
200
  msgid "\"over minimum\" text"
201
  msgstr ""
202
 
203
- #: inc/cpcff_admin_int.inc.php:342
204
  msgid "Note"
205
  msgstr ""
206
 
207
- #: inc/cpcff_admin_int.inc.php:344
208
  msgid "To insert this form in a post/page, use the dedicated icon"
209
  msgstr ""
210
 
211
- #: inc/cpcff_admin_int.inc.php:345 inc/cpcff_main.inc.php:241
212
  msgid "Insert Calculated Fields Form"
213
  msgstr ""
214
 
215
- #: inc/cpcff_admin_int.inc.php:346
216
  msgid ""
217
  "which has been added to your Upload/Insert Menu, just below the title of "
218
  "your Post/Page."
219
  msgstr ""
220
 
221
- #: inc/cpcff_admin_int.inc.php:355 inc/cpcff_admin_int.inc.php:651
222
- #: inc/cpcff_admin_int_list.inc.php: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
 
231
- #: inc/cpcff_admin_int.inc.php:359
232
  msgid ""
233
  "The following settings are available only in the <a href=\"https://cff."
234
  "dwbooster.com/\">pro version</a>"
235
  msgstr ""
236
 
237
- #: inc/cpcff_admin_int.inc.php:361
238
  msgid "Form Processing and Payment Settings"
239
  msgstr ""
240
 
241
- #: inc/cpcff_admin_int.inc.php:365
242
  msgid "Payment Settings"
243
  msgstr ""
244
 
245
- #: inc/cpcff_admin_int.inc.php:370
246
  msgid "Request cost"
247
  msgstr ""
248
 
249
- #: inc/cpcff_admin_int.inc.php:375
250
  msgid "Currency"
251
  msgstr ""
252
 
253
- #: inc/cpcff_admin_int.inc.php:380
254
  msgid "Base amount"
255
  msgstr ""
256
 
257
- #: inc/cpcff_admin_int.inc.php:381
258
  msgid ""
259
  "Minimum amount to charge. If the final price is lesser than this number, the "
260
  "base amount will be applied."
261
  msgstr ""
262
 
263
- #: inc/cpcff_admin_int.inc.php:386
264
  msgid "Paypal product name"
265
  msgstr ""
266
 
267
- #: inc/cpcff_admin_int.inc.php:391
268
  msgid "Discount Codes"
269
  msgstr ""
270
 
271
- #: inc/cpcff_admin_int.inc.php:393
272
  msgid "This feature isn't available in this version."
273
  msgstr ""
274
 
275
- #: inc/cpcff_admin_int.inc.php:396
276
  msgid "Add new discount code"
277
  msgstr ""
278
 
279
- #: inc/cpcff_admin_int.inc.php:398
280
  msgid "Code"
281
  msgstr ""
282
 
283
- #: inc/cpcff_admin_int.inc.php:399
284
  msgid "Discount"
285
  msgstr ""
286
 
287
- #: inc/cpcff_admin_int.inc.php:400
288
  msgid "Percent"
289
  msgstr ""
290
 
291
- #: inc/cpcff_admin_int.inc.php:401
292
  msgid "Fixed Value"
293
  msgstr ""
294
 
295
- #: inc/cpcff_admin_int.inc.php:404
296
  msgid "Valid until"
297
  msgstr ""
298
 
299
- #: inc/cpcff_admin_int.inc.php:405 inc/cpcff_admin_int_list.inc.php:206
300
  msgid "Add"
301
  msgstr ""
302
 
303
- #: inc/cpcff_admin_int.inc.php:407
304
  msgid "Note: Expiration date based in server time. Server time now is"
305
  msgstr ""
306
 
307
- #: inc/cpcff_admin_int.inc.php:415
308
  msgid "Paypal Payment Configuration"
309
  msgstr ""
310
 
311
- #: inc/cpcff_admin_int.inc.php:420
312
  msgid "Enable Paypal Payments?"
313
  msgstr ""
314
 
315
- #: inc/cpcff_admin_int.inc.php:422 inc/cpcff_admin_int.inc.php:510
316
- #: inc/cpcff_admin_int.inc.php:547 inc/cpcff_admin_int.inc.php:588
317
  msgid "No"
318
  msgstr ""
319
 
320
- #: inc/cpcff_admin_int.inc.php:424
321
  msgid ""
322
  "Note: If \"Optional\" is selected, a radiobutton will appear in the form to "
323
  "select if the payment will be made with PayPal or not."
324
  msgstr ""
325
 
326
- #: inc/cpcff_admin_int.inc.php:426
327
  msgid "Label for the \"<strong>Pay with PayPal</strong>\" option"
328
  msgstr ""
329
 
330
- #: inc/cpcff_admin_int.inc.php:432
331
  msgid "Paypal Mode"
332
  msgstr ""
333
 
334
- #: inc/cpcff_admin_int.inc.php:434
335
  msgid "Production - real payments processed"
336
  msgstr ""
337
 
338
- #: inc/cpcff_admin_int.inc.php:435
339
  msgid "SandBox - PayPal testing sandbox area"
340
  msgstr ""
341
 
342
- #: inc/cpcff_admin_int.inc.php:441
343
  msgid "Paypal email"
344
  msgstr ""
345
 
346
- #: inc/cpcff_admin_int.inc.php:446
347
  msgid "A $0 amount to pay means"
348
  msgstr ""
349
 
350
- #: inc/cpcff_admin_int.inc.php:448
351
  msgid "Let the user enter any amount at PayPal (ex: for a donation)"
352
  msgstr ""
353
 
354
- #: inc/cpcff_admin_int.inc.php:449
355
  msgid "Don't require any payment. Form is submitted skiping the PayPal page."
356
  msgstr ""
357
 
358
- #: inc/cpcff_admin_int.inc.php:455
359
  msgid "Paypal language"
360
  msgstr ""
361
 
362
- #: inc/cpcff_admin_int.inc.php:460
363
  msgid "Payment frequency"
364
  msgstr ""
365
 
366
- #: inc/cpcff_admin_int.inc.php:464
367
  msgid "One time payment (default option, user is billed only once)"
368
  msgstr ""
369
 
370
- #: inc/cpcff_admin_int.inc.php:465
371
  msgid "Bill the user every 1 month"
372
  msgstr ""
373
 
374
- #: inc/cpcff_admin_int.inc.php:466
375
  msgid "Bill the user every 3 months"
376
  msgstr ""
377
 
378
- #: inc/cpcff_admin_int.inc.php:467
379
  msgid "Bill the user every 6 months"
380
  msgstr ""
381
 
382
- #: inc/cpcff_admin_int.inc.php:468
383
  msgid "Bill the user every 12 months"
384
  msgstr ""
385
 
386
- #: inc/cpcff_admin_int.inc.php:473
387
  msgid "Paypal prompt buyers for shipping address"
388
  msgstr ""
389
 
390
- #: inc/cpcff_admin_int.inc.php:477
391
  msgid "Do not prompt for an address"
392
  msgstr ""
393
 
394
- #: inc/cpcff_admin_int.inc.php:478
395
  msgid "Prompt for an address, but do not require one"
396
  msgstr ""
397
 
398
- #: inc/cpcff_admin_int.inc.php:479
399
  msgid "Prompt for an address and require one"
400
  msgstr ""
401
 
402
- #: inc/cpcff_admin_int.inc.php:489
403
  msgid "Form Processing / Email Settings"
404
  msgstr ""
405
 
406
- #: inc/cpcff_admin_int.inc.php:493
407
  msgid "\"From\" email"
408
  msgstr ""
409
 
410
- #: inc/cpcff_admin_int.inc.php:494
411
  msgid ""
412
  "This email is required if the \"From fixed email address\" option is "
413
  "selected, or it is enabled the email copy to the user."
414
  msgstr ""
415
 
416
- #: inc/cpcff_admin_int.inc.php:497
417
  msgid "Destination emails (comma separated)"
418
  msgstr ""
419
 
420
- #: inc/cpcff_admin_int.inc.php:501 inc/cpcff_admin_int.inc.php:556
421
  msgid "Email subject"
422
  msgstr ""
423
 
424
- #: inc/cpcff_admin_int.inc.php:505
425
  msgid "Include additional information?"
426
  msgstr ""
427
 
428
- #: inc/cpcff_admin_int.inc.php:509 inc/cpcff_admin_int.inc.php:546
429
- #: inc/cpcff_admin_int.inc.php:587
430
  msgid "Yes"
431
  msgstr ""
432
 
433
- #: inc/cpcff_admin_int.inc.php:511
434
  msgid ""
435
  "If the \"No\" option is selected the plugin won't capture the IP address of "
436
  "users."
437
  msgstr ""
438
 
439
- #: inc/cpcff_admin_int.inc.php:515
440
  msgid "Thank you page (after sending the message)"
441
  msgstr ""
442
 
443
- #: inc/cpcff_admin_int.inc.php:519 inc/cpcff_admin_int.inc.php:560
444
  msgid "Email format?"
445
  msgstr ""
446
 
447
- #: inc/cpcff_admin_int.inc.php:523 inc/cpcff_admin_int.inc.php:564
448
  msgid "Plain Text (default)"
449
  msgstr ""
450
 
451
- #: inc/cpcff_admin_int.inc.php:524 inc/cpcff_admin_int.inc.php:565
452
  msgid "HTML (use html in the textarea below)"
453
  msgstr ""
454
 
455
- #: inc/cpcff_admin_int.inc.php:529 inc/cpcff_admin_int.inc.php:570
456
  msgid "Message"
457
  msgstr ""
458
 
459
- #: inc/cpcff_admin_int.inc.php:538
460
  msgid "Email Copy to User"
461
  msgstr ""
462
 
463
- #: inc/cpcff_admin_int.inc.php:542
464
  msgid "Send confirmation/thank you message to user?"
465
  msgstr ""
466
 
467
- #: inc/cpcff_admin_int.inc.php:552
468
  msgid "Email field on the form"
469
  msgstr ""
470
 
471
- #: inc/cpcff_admin_int.inc.php:579
472
  msgid "Captcha Verification"
473
  msgstr ""
474
 
475
- #: inc/cpcff_admin_int.inc.php:583
476
  msgid "Use Captcha Verification?"
477
  msgstr ""
478
 
479
- #: inc/cpcff_admin_int.inc.php:594
480
  msgid "Width"
481
  msgstr ""
482
 
483
- #: inc/cpcff_admin_int.inc.php:596
484
  msgid "Height"
485
  msgstr ""
486
 
487
- #: inc/cpcff_admin_int.inc.php:598
488
  msgid "Chars"
489
  msgstr ""
490
 
491
- #: inc/cpcff_admin_int.inc.php:603
492
  msgid "Min font size"
493
  msgstr ""
494
 
495
- #: inc/cpcff_admin_int.inc.php:605
496
  msgid "Max font size"
497
  msgstr ""
498
 
499
- #: inc/cpcff_admin_int.inc.php:610
500
  msgid "security code"
501
  msgstr ""
502
 
503
- #: inc/cpcff_admin_int.inc.php:616
504
  msgid "Noise"
505
  msgstr ""
506
 
507
- #: inc/cpcff_admin_int.inc.php:618
508
  msgid "Noise Length"
509
  msgstr ""
510
 
511
- #: inc/cpcff_admin_int.inc.php:623
512
  msgid "Background"
513
  msgstr ""
514
 
515
- #: inc/cpcff_admin_int.inc.php:630
516
  msgid "Font"
517
  msgstr ""
518
 
@@ -572,7 +572,7 @@ msgstr ""
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
 
@@ -596,93 +596,101 @@ msgstr ""
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
 
@@ -734,11 +742,11 @@ msgid ""
734
  "settings."
735
  msgstr ""
736
 
737
- #: inc/cpcff_main.inc.php:221
738
  msgid "Request custom changes"
739
  msgstr ""
740
 
741
- #: inc/cpcff_main.inc.php:241
742
  msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
743
  msgstr ""
744
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2020-10-24 02:22+0200\n"
5
+ "PO-Revision-Date: 2020-10-24 02:22+0200\n"
6
  "Last-Translator: CodePeople\n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.4.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
37
  "\"https://cff.dwbooster.com/contact-us\">contact us</a></div>"
38
  msgstr ""
39
 
40
+ #: inc/cpcff_admin_int.inc.php:36
41
  msgid "Settings saved"
42
  msgstr ""
43
 
44
+ #: inc/cpcff_admin_int.inc.php:50 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
52
  msgid "Calculated Fields Form"
53
  msgstr ""
54
 
55
+ #: inc/cpcff_admin_int.inc.php:50
56
  msgid "Form"
57
  msgstr ""
58
 
59
+ #: inc/cpcff_admin_int.inc.php:57
60
  msgid "Direct form URL"
61
  msgstr ""
62
 
63
+ #: inc/cpcff_admin_int.inc.php:60
64
  msgid "Back to items list..."
65
  msgstr ""
66
 
67
+ #: inc/cpcff_admin_int.inc.php:70 inc/cpcff_admin_int.inc.php:192
68
  msgid "Form Settings"
69
  msgstr ""
70
 
71
+ #: inc/cpcff_admin_int.inc.php:72
72
  msgid ""
73
  "* Different form styles available on the tab Form Settings &gt;&gt; Form "
74
  "Template"
75
  msgstr ""
76
 
77
+ #: inc/cpcff_admin_int.inc.php:75
78
  msgid "Form Builder"
79
  msgstr ""
80
 
81
+ #: inc/cpcff_admin_int.inc.php:77
82
  msgid "Revisions"
83
  msgstr ""
84
 
85
+ #: inc/cpcff_admin_int.inc.php:81
86
  msgid "Select a revision"
87
  msgstr ""
88
 
89
+ #: inc/cpcff_admin_int.inc.php:91 inc/cpcff_admin_int.inc.php:212
90
+ #: inc/cpcff_admin_int.inc.php:579
91
  msgid "Preview"
92
  msgstr ""
93
 
94
+ #: inc/cpcff_admin_int.inc.php:102
95
  msgid ""
96
  "If the form is not loading in the public website, go to the settings page of "
97
  "the plugin through the menu option: \"Settings/Calculated Fields Form\", "
99
  "press the \"Update\" button."
100
  msgstr ""
101
 
102
+ #: inc/cpcff_admin_int.inc.php:102
103
  msgid ""
104
  "If you need also the form to be sent to the server side for processing (for "
105
  "example to deliver emails) then the <a href=\"https://cff.dwbooster.com/\" "
107
  "be required."
108
  msgstr ""
109
 
110
+ #: inc/cpcff_admin_int.inc.php:118
111
  msgid ""
112
  "The action will load the revision selected, the data are not stored will be "
113
  "lose. Do you want continue?"
114
  msgstr ""
115
 
116
+ #: inc/cpcff_admin_int.inc.php:155
117
  msgid ""
118
  "These features aren't available in this version. Do you want to open the "
119
  "plugin's page to check other versions?"
120
  msgstr ""
121
 
122
+ #: inc/cpcff_admin_int.inc.php:190
123
  msgid "Add a Field"
124
  msgstr ""
125
 
126
+ #: inc/cpcff_admin_int.inc.php:191
127
  msgid "Field Settings"
128
  msgstr ""
129
 
130
+ #: inc/cpcff_admin_int.inc.php:211 inc/cpcff_admin_int.inc.php:323
131
+ #: inc/cpcff_admin_int.inc.php:621
132
  msgid "Save Changes"
133
  msgstr ""
134
 
135
+ #: inc/cpcff_admin_int.inc.php:213
136
  msgid "Generate revisions in the form preview as well"
137
  msgstr ""
138
 
139
+ #: inc/cpcff_admin_int.inc.php:217
140
  msgid "Define Texts"
141
  msgstr ""
142
 
143
+ #: inc/cpcff_admin_int.inc.php:221
144
  msgid "Previous button label (text)"
145
  msgstr ""
146
 
147
+ #: inc/cpcff_admin_int.inc.php:225
148
  msgid "Next button label (text)"
149
  msgstr ""
150
 
151
+ #: inc/cpcff_admin_int.inc.php:230
152
  msgid ""
153
  "- The styles can be applied into any of the CSS files of your theme or into "
154
  "the CSS file <em>\"calculated-fields-form\\css\\stylepublic.css\"</em>."
155
  msgstr ""
156
 
157
+ #: inc/cpcff_admin_int.inc.php:231
158
  msgid ""
159
  "- For general CSS styles modifications to the form and samples <a href="
160
  "\"https://cff.dwbooster.com/faq#q82\" target=\"_blank\">check this FAQ</a>."
161
  msgstr ""
162
 
163
+ #: inc/cpcff_admin_int.inc.php:253
164
  msgid "Validation Settings"
165
  msgstr ""
166
 
167
+ #: inc/cpcff_admin_int.inc.php:257
168
  msgid "\"is required\" text"
169
  msgstr ""
170
 
171
+ #: inc/cpcff_admin_int.inc.php:261
172
  msgid "\"is email\" text"
173
  msgstr ""
174
 
175
+ #: inc/cpcff_admin_int.inc.php:265
176
  msgid "\"is valid captcha\" text"
177
  msgstr ""
178
 
179
+ #: inc/cpcff_admin_int.inc.php:270
180
  msgid "\"is valid date (mm/dd/yyyy)\" text"
181
  msgstr ""
182
 
183
+ #: inc/cpcff_admin_int.inc.php:274
184
  msgid "\"is valid date (dd/mm/yyyy)\" text"
185
  msgstr ""
186
 
187
+ #: inc/cpcff_admin_int.inc.php:278
188
  msgid "\"is number\" text"
189
  msgstr ""
190
 
191
+ #: inc/cpcff_admin_int.inc.php:282
192
  msgid "\"only digits\" text"
193
  msgstr ""
194
 
195
+ #: inc/cpcff_admin_int.inc.php:286
196
  msgid "\"under maximum\" text"
197
  msgstr ""
198
 
199
+ #: inc/cpcff_admin_int.inc.php:290
200
  msgid "\"over minimum\" text"
201
  msgstr ""
202
 
203
+ #: inc/cpcff_admin_int.inc.php:313
204
  msgid "Note"
205
  msgstr ""
206
 
207
+ #: inc/cpcff_admin_int.inc.php:315
208
  msgid "To insert this form in a post/page, use the dedicated icon"
209
  msgstr ""
210
 
211
+ #: inc/cpcff_admin_int.inc.php:316 inc/cpcff_main.inc.php:237
212
  msgid "Insert Calculated Fields Form"
213
  msgstr ""
214
 
215
+ #: inc/cpcff_admin_int.inc.php:317
216
  msgid ""
217
  "which has been added to your Upload/Insert Menu, just below the title of "
218
  "your Post/Page."
219
  msgstr ""
220
 
221
+ #: inc/cpcff_admin_int.inc.php:326 inc/cpcff_admin_int.inc.php:624
222
+ #: inc/cpcff_admin_int_list.inc.php:262
223
  msgid "Request Custom Modifications"
224
  msgstr ""
225
 
226
+ #: inc/cpcff_admin_int.inc.php:326 inc/cpcff_admin_int.inc.php:624
227
+ #: inc/cpcff_admin_int_list.inc.php:262 inc/cpcff_main.inc.php:220
228
  msgid "Help"
229
  msgstr ""
230
 
231
+ #: inc/cpcff_admin_int.inc.php:330
232
  msgid ""
233
  "The following settings are available only in the <a href=\"https://cff."
234
  "dwbooster.com/\">pro version</a>"
235
  msgstr ""
236
 
237
+ #: inc/cpcff_admin_int.inc.php:332
238
  msgid "Form Processing and Payment Settings"
239
  msgstr ""
240
 
241
+ #: inc/cpcff_admin_int.inc.php:336
242
  msgid "Payment Settings"
243
  msgstr ""
244
 
245
+ #: inc/cpcff_admin_int.inc.php:341
246
  msgid "Request cost"
247
  msgstr ""
248
 
249
+ #: inc/cpcff_admin_int.inc.php:346
250
  msgid "Currency"
251
  msgstr ""
252
 
253
+ #: inc/cpcff_admin_int.inc.php:351
254
  msgid "Base amount"
255
  msgstr ""
256
 
257
+ #: inc/cpcff_admin_int.inc.php:352
258
  msgid ""
259
  "Minimum amount to charge. If the final price is lesser than this number, the "
260
  "base amount will be applied."
261
  msgstr ""
262
 
263
+ #: inc/cpcff_admin_int.inc.php:357
264
  msgid "Paypal product name"
265
  msgstr ""
266
 
267
+ #: inc/cpcff_admin_int.inc.php:362
268
  msgid "Discount Codes"
269
  msgstr ""
270
 
271
+ #: inc/cpcff_admin_int.inc.php:364
272
  msgid "This feature isn't available in this version."
273
  msgstr ""
274
 
275
+ #: inc/cpcff_admin_int.inc.php:367
276
  msgid "Add new discount code"
277
  msgstr ""
278
 
279
+ #: inc/cpcff_admin_int.inc.php:369
280
  msgid "Code"
281
  msgstr ""
282
 
283
+ #: inc/cpcff_admin_int.inc.php:370
284
  msgid "Discount"
285
  msgstr ""
286
 
287
+ #: inc/cpcff_admin_int.inc.php:371
288
  msgid "Percent"
289
  msgstr ""
290
 
291
+ #: inc/cpcff_admin_int.inc.php:372
292
  msgid "Fixed Value"
293
  msgstr ""
294
 
295
+ #: inc/cpcff_admin_int.inc.php:375
296
  msgid "Valid until"
297
  msgstr ""
298
 
299
+ #: inc/cpcff_admin_int.inc.php:376 inc/cpcff_admin_int_list.inc.php:206
300
  msgid "Add"
301
  msgstr ""
302
 
303
+ #: inc/cpcff_admin_int.inc.php:378
304
  msgid "Note: Expiration date based in server time. Server time now is"
305
  msgstr ""
306
 
307
+ #: inc/cpcff_admin_int.inc.php:386
308
  msgid "Paypal Payment Configuration"
309
  msgstr ""
310
 
311
+ #: inc/cpcff_admin_int.inc.php:391
312
  msgid "Enable Paypal Payments?"
313
  msgstr ""
314
 
315
+ #: inc/cpcff_admin_int.inc.php:393 inc/cpcff_admin_int.inc.php:481
316
+ #: inc/cpcff_admin_int.inc.php:518 inc/cpcff_admin_int.inc.php:559
317
  msgid "No"
318
  msgstr ""
319
 
320
+ #: inc/cpcff_admin_int.inc.php:395
321
  msgid ""
322
  "Note: If \"Optional\" is selected, a radiobutton will appear in the form to "
323
  "select if the payment will be made with PayPal or not."
324
  msgstr ""
325
 
326
+ #: inc/cpcff_admin_int.inc.php:397
327
  msgid "Label for the \"<strong>Pay with PayPal</strong>\" option"
328
  msgstr ""
329
 
330
+ #: inc/cpcff_admin_int.inc.php:403
331
  msgid "Paypal Mode"
332
  msgstr ""
333
 
334
+ #: inc/cpcff_admin_int.inc.php:405
335
  msgid "Production - real payments processed"
336
  msgstr ""
337
 
338
+ #: inc/cpcff_admin_int.inc.php:406
339
  msgid "SandBox - PayPal testing sandbox area"
340
  msgstr ""
341
 
342
+ #: inc/cpcff_admin_int.inc.php:412
343
  msgid "Paypal email"
344
  msgstr ""
345
 
346
+ #: inc/cpcff_admin_int.inc.php:417
347
  msgid "A $0 amount to pay means"
348
  msgstr ""
349
 
350
+ #: inc/cpcff_admin_int.inc.php:419
351
  msgid "Let the user enter any amount at PayPal (ex: for a donation)"
352
  msgstr ""
353
 
354
+ #: inc/cpcff_admin_int.inc.php:420
355
  msgid "Don't require any payment. Form is submitted skiping the PayPal page."
356
  msgstr ""
357
 
358
+ #: inc/cpcff_admin_int.inc.php:426
359
  msgid "Paypal language"
360
  msgstr ""
361
 
362
+ #: inc/cpcff_admin_int.inc.php:431
363
  msgid "Payment frequency"
364
  msgstr ""
365
 
366
+ #: inc/cpcff_admin_int.inc.php:435
367
  msgid "One time payment (default option, user is billed only once)"
368
  msgstr ""
369
 
370
+ #: inc/cpcff_admin_int.inc.php:436
371
  msgid "Bill the user every 1 month"
372
  msgstr ""
373
 
374
+ #: inc/cpcff_admin_int.inc.php:437
375
  msgid "Bill the user every 3 months"
376
  msgstr ""
377
 
378
+ #: inc/cpcff_admin_int.inc.php:438
379
  msgid "Bill the user every 6 months"
380
  msgstr ""
381
 
382
+ #: inc/cpcff_admin_int.inc.php:439
383
  msgid "Bill the user every 12 months"
384
  msgstr ""
385
 
386
+ #: inc/cpcff_admin_int.inc.php:444
387
  msgid "Paypal prompt buyers for shipping address"
388
  msgstr ""
389
 
390
+ #: inc/cpcff_admin_int.inc.php:448
391
  msgid "Do not prompt for an address"
392
  msgstr ""
393
 
394
+ #: inc/cpcff_admin_int.inc.php:449
395
  msgid "Prompt for an address, but do not require one"
396
  msgstr ""
397
 
398
+ #: inc/cpcff_admin_int.inc.php:450
399
  msgid "Prompt for an address and require one"
400
  msgstr ""
401
 
402
+ #: inc/cpcff_admin_int.inc.php:460
403
  msgid "Form Processing / Email Settings"
404
  msgstr ""
405
 
406
+ #: inc/cpcff_admin_int.inc.php:464
407
  msgid "\"From\" email"
408
  msgstr ""
409
 
410
+ #: inc/cpcff_admin_int.inc.php:465
411
  msgid ""
412
  "This email is required if the \"From fixed email address\" option is "
413
  "selected, or it is enabled the email copy to the user."
414
  msgstr ""
415
 
416
+ #: inc/cpcff_admin_int.inc.php:468
417
  msgid "Destination emails (comma separated)"
418
  msgstr ""
419
 
420
+ #: inc/cpcff_admin_int.inc.php:472 inc/cpcff_admin_int.inc.php:527
421
  msgid "Email subject"
422
  msgstr ""
423
 
424
+ #: inc/cpcff_admin_int.inc.php:476
425
  msgid "Include additional information?"
426
  msgstr ""
427
 
428
+ #: inc/cpcff_admin_int.inc.php:480 inc/cpcff_admin_int.inc.php:517
429
+ #: inc/cpcff_admin_int.inc.php:558
430
  msgid "Yes"
431
  msgstr ""
432
 
433
+ #: inc/cpcff_admin_int.inc.php:482
434
  msgid ""
435
  "If the \"No\" option is selected the plugin won't capture the IP address of "
436
  "users."
437
  msgstr ""
438
 
439
+ #: inc/cpcff_admin_int.inc.php:486
440
  msgid "Thank you page (after sending the message)"
441
  msgstr ""
442
 
443
+ #: inc/cpcff_admin_int.inc.php:490 inc/cpcff_admin_int.inc.php:531
444
  msgid "Email format?"
445
  msgstr ""
446
 
447
+ #: inc/cpcff_admin_int.inc.php:494 inc/cpcff_admin_int.inc.php:535
448
  msgid "Plain Text (default)"
449
  msgstr ""
450
 
451
+ #: inc/cpcff_admin_int.inc.php:495 inc/cpcff_admin_int.inc.php:536
452
  msgid "HTML (use html in the textarea below)"
453
  msgstr ""
454
 
455
+ #: inc/cpcff_admin_int.inc.php:500 inc/cpcff_admin_int.inc.php:541
456
  msgid "Message"
457
  msgstr ""
458
 
459
+ #: inc/cpcff_admin_int.inc.php:509
460
  msgid "Email Copy to User"
461
  msgstr ""
462
 
463
+ #: inc/cpcff_admin_int.inc.php:513
464
  msgid "Send confirmation/thank you message to user?"
465
  msgstr ""
466
 
467
+ #: inc/cpcff_admin_int.inc.php:523
468
  msgid "Email field on the form"
469
  msgstr ""
470
 
471
+ #: inc/cpcff_admin_int.inc.php:550
472
  msgid "Captcha Verification"
473
  msgstr ""
474
 
475
+ #: inc/cpcff_admin_int.inc.php:554
476
  msgid "Use Captcha Verification?"
477
  msgstr ""
478
 
479
+ #: inc/cpcff_admin_int.inc.php:565
480
  msgid "Width"
481
  msgstr ""
482
 
483
+ #: inc/cpcff_admin_int.inc.php:567
484
  msgid "Height"
485
  msgstr ""
486
 
487
+ #: inc/cpcff_admin_int.inc.php:569
488
  msgid "Chars"
489
  msgstr ""
490
 
491
+ #: inc/cpcff_admin_int.inc.php:574
492
  msgid "Min font size"
493
  msgstr ""
494
 
495
+ #: inc/cpcff_admin_int.inc.php:576
496
  msgid "Max font size"
497
  msgstr ""
498
 
499
+ #: inc/cpcff_admin_int.inc.php:581
500
  msgid "security code"
501
  msgstr ""
502
 
503
+ #: inc/cpcff_admin_int.inc.php:587
504
  msgid "Noise"
505
  msgstr ""
506
 
507
+ #: inc/cpcff_admin_int.inc.php:589
508
  msgid "Noise Length"
509
  msgstr ""
510
 
511
+ #: inc/cpcff_admin_int.inc.php:594
512
  msgid "Background"
513
  msgstr ""
514
 
515
+ #: inc/cpcff_admin_int.inc.php:601
516
  msgid "Font"
517
  msgstr ""
518
 
572
  msgid "Update"
573
  msgstr ""
574
 
575
+ #: inc/cpcff_admin_int_list.inc.php:185 inc/cpcff_main.inc.php:218
576
  msgid "Settings"
577
  msgstr ""
578
 
596
  msgid "Item Name"
597
  msgstr ""
598
 
599
+ #: inc/cpcff_admin_int_list.inc.php:212
600
+ msgid "For additional resources visit the plugin's"
601
+ msgstr ""
602
+
603
+ #: inc/cpcff_admin_int_list.inc.php:212
604
+ msgid "Marketplace"
605
+ msgstr ""
606
+
607
+ #: inc/cpcff_admin_int_list.inc.php:215
608
  msgid "Troubleshoot Area & General Settings"
609
  msgstr ""
610
 
611
+ #: inc/cpcff_admin_int_list.inc.php:226
612
  msgid ""
613
  "<strong>Important!</strong>: Use this area <strong>only</strong> if you are "
614
  "experiencing conflicts with third party plugins, with the theme scripts or "
615
  "with the character encoding."
616
  msgstr ""
617
 
618
+ #: inc/cpcff_admin_int_list.inc.php:227
619
  msgid "Script load method"
620
  msgstr ""
621
 
622
+ #: inc/cpcff_admin_int_list.inc.php:229
623
  msgid "Classic (Recommended)"
624
  msgstr ""
625
 
626
+ #: inc/cpcff_admin_int_list.inc.php:230
627
  msgid "Direct"
628
  msgstr ""
629
 
630
+ #: inc/cpcff_admin_int_list.inc.php:232
631
  msgid ""
632
  "* Change the script load method if the form doesn't appear in the public "
633
  "website."
634
  msgstr ""
635
 
636
+ #: inc/cpcff_admin_int_list.inc.php:234
637
  msgid "Character encoding"
638
  msgstr ""
639
 
640
+ #: inc/cpcff_admin_int_list.inc.php:236
641
  msgid "Keep current charset (Recommended)"
642
  msgstr ""
643
 
644
+ #: inc/cpcff_admin_int_list.inc.php:237
645
  msgid "try this first"
646
  msgstr ""
647
 
648
+ #: inc/cpcff_admin_int_list.inc.php:238
649
  msgid "Only from MySQL 5.5"
650
  msgstr ""
651
 
652
+ #: inc/cpcff_admin_int_list.inc.php:241
653
  msgid ""
654
  "* Update the charset if you are getting problems displaying special/non-"
655
  "latin characters. After updated you need to edit the special characters "
656
  "again."
657
  msgstr ""
658
 
659
+ #: inc/cpcff_admin_int_list.inc.php:243
660
  msgid "There is active an optimization plugin in WordPress"
661
  msgstr ""
662
 
663
+ #: inc/cpcff_admin_int_list.inc.php:244
664
  msgid ""
665
  "* Tick the checkbox if there is an optimization plugin active on the "
666
  "website, and the forms are not visible."
667
  msgstr ""
668
 
669
+ #: inc/cpcff_admin_int_list.inc.php:247
670
  msgid "Activate Javascript Cache"
671
  msgstr ""
672
 
673
+ #: inc/cpcff_admin_int_list.inc.php:249
674
  msgid "Allows to access the forms directly"
675
  msgstr ""
676
 
677
+ #: inc/cpcff_admin_int_list.inc.php:251
678
  msgid "Allows to access the forms from amp pages"
679
  msgstr ""
680
 
681
+ #: inc/cpcff_admin_int_list.inc.php:253
682
  msgid "Do not load the forms with crawlers"
683
  msgstr ""
684
 
685
+ #: inc/cpcff_admin_int_list.inc.php:253
686
  msgid "* The forms are not loaded when website is being indexed by searchers."
687
  msgstr ""
688
 
689
+ #: inc/cpcff_admin_int_list.inc.php:255
690
  msgid "UPDATE"
691
  msgstr ""
692
 
693
+ #: inc/cpcff_admin_int_list.inc.php:262 inc/cpcff_main.inc.php:219
694
  msgid "Upgrade"
695
  msgstr ""
696
 
742
  "settings."
743
  msgstr ""
744
 
745
+ #: inc/cpcff_main.inc.php:217
746
  msgid "Request custom changes"
747
  msgstr ""
748
 
749
+ #: inc/cpcff_main.inc.php:237
750
  msgid "Create a JavaScript var from POST, GET, SESSION, or COOKIE var"
751
  msgstr ""
752