Version Description
- Implements the NETWORKDAYS operation in the Date/Time operations module.
- Fixes some warnings in the PHPCS report in the compatibilit checked with PHP8.1
- Modifies the CFFCHART operation to allow registering the ChartJS plugins (Developer and Platinum versions).
- Implements the Stripe Checkout add-on (Platinum version).
Download this release
Release Info
Developer | codepeople |
Plugin | Calculated Fields Form |
Version | 1.1.119 |
Comparing to | |
See all releases |
Code changes from version 1.1.118 to 1.1.119
- README.txt +9 -11
- changelog.txt +7 -0
- cp_calculatedfieldsf_free.php +2 -2
- inc/cpcff_admin_int.inc.php +183 -183
- inc/cpcff_admin_int_list.inc.php +99 -99
- inc/cpcff_public_int.inc.php +3 -3
- js/fbuilder-loader-admin.php +6 -6
- js/fbuilder-loader-public.php +56 -56
- js/fbuilder-pro-public.jquery.js +1 -1
- js/modules/02_datetime/admin/module_admin.js +1 -0
- js/modules/02_datetime/public/01_datetime.js +36 -0
- templates/13/style.css +1 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://cff.dwbooster.com
|
|
4 |
Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -965,6 +965,13 @@ A: Please, follow the steps below:
|
|
965 |
|
966 |
== Changelog ==
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
= 1.1.118 =
|
969 |
|
970 |
* Modifies the loading scripts to solve issues caused by optimizer plugins.
|
@@ -1007,13 +1014,4 @@ A: Please, follow the steps below:
|
|
1007 |
|
1008 |
= 1.1.110 =
|
1009 |
|
1010 |
-
* Fixes a minor issue with Upload File and Summary fields settigns.
|
1011 |
-
|
1012 |
-
= 1.1.109 =
|
1013 |
-
|
1014 |
-
* Increase the number of template forms.
|
1015 |
-
* Modifies the library popup.
|
1016 |
-
* Modifies the forms generator.
|
1017 |
-
* Fixes a minor issue in the button control.
|
1018 |
-
* Makes the form name a required attribute.
|
1019 |
-
* Modifies the currentdate and submissiondate tags in the notification emails and thank you pages to accept a separator symbol between date components (Professional, Developer, and Platinum versions).
|
4 |
Tags: form,quote form,contact form,form builder,calculator,calculated,quote calculator,forms,form editor,advanced forms,payment calculator,payment,recurring payment,quote,fields,calculated field,price calculator,email,form design,paypal,equation editor,formula,equation,quote calculator,post,posts,plugin,widget,admin,sidebar,images,image,page,shortcode,products form,woocommerce,addons,layout,session,post,cookie,get,webhook,Dropbox,pdf,language
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 1.1.119
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
965 |
|
966 |
== Changelog ==
|
967 |
|
968 |
+
= 1.1.119 =
|
969 |
+
|
970 |
+
* Implements the NETWORKDAYS operation in the Date/Time operations module.
|
971 |
+
* Fixes some warnings in the PHPCS report in the compatibilit checked with PHP8.1
|
972 |
+
* Modifies the CFFCHART operation to allow registering the ChartJS plugins (Developer and Platinum versions).
|
973 |
+
* Implements the Stripe Checkout add-on (Platinum version).
|
974 |
+
|
975 |
= 1.1.118 =
|
976 |
|
977 |
* Modifies the loading scripts to solve issues caused by optimizer plugins.
|
1014 |
|
1015 |
= 1.1.110 =
|
1016 |
|
1017 |
+
* Fixes a minor issue with Upload File and Summary fields settigns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.1.118 =
|
4 |
|
5 |
* Modifies the loading scripts to solve issues caused by optimizer plugins.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.1.119 =
|
4 |
+
|
5 |
+
* Implements the NETWORKDAYS operation in the Date/Time operations module.
|
6 |
+
* Fixes some warnings in the PHPCS report in the compatibilit checked with PHP8.1
|
7 |
+
* Modifies the CFFCHART operation to allow registering the ChartJS plugins (Developer and Platinum versions).
|
8 |
+
* Implements the Stripe Checkout add-on (Platinum version).
|
9 |
+
|
10 |
= 1.1.118 =
|
11 |
|
12 |
* Modifies the loading scripts to solve issues caused by optimizer plugins.
|
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.1.
|
7 |
Text Domain: calculated-fields-form
|
8 |
Author: CodePeople
|
9 |
Author URI: https://cff.dwbooster.com
|
@@ -15,7 +15,7 @@ if ( ! defined( 'WP_DEBUG' ) || true != WP_DEBUG ) {
|
|
15 |
}
|
16 |
|
17 |
// Defining main constants
|
18 |
-
define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.
|
19 |
define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
|
20 |
define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
21 |
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.1.119
|
7 |
Text Domain: calculated-fields-form
|
8 |
Author: CodePeople
|
9 |
Author URI: https://cff.dwbooster.com
|
15 |
}
|
16 |
|
17 |
// Defining main constants
|
18 |
+
define( 'CP_CALCULATEDFIELDSF_VERSION', '1.1.119' );
|
19 |
define( 'CP_CALCULATEDFIELDSF_MAIN_FILE_PATH', __FILE__ );
|
20 |
define( 'CP_CALCULATEDFIELDSF_BASE_PATH', dirname( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
21 |
define( 'CP_CALCULATEDFIELDSF_BASE_NAME', plugin_basename( CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) );
|
inc/cpcff_admin_int.inc.php
CHANGED
@@ -70,15 +70,15 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
70 |
<h2><?php esc_html_e( 'Form Settings', 'calculated-fields-form' ); ?>:</h2>
|
71 |
<!-- Form category -->
|
72 |
<div class="postbox" >
|
73 |
-
<div class="inside">
|
74 |
<b><?php esc_html_e( 'Form Category', 'calculated-fields-form' ); ?></b>
|
75 |
<input type="text" name="calculated-fields-form-category" class="width75" value="<?php print esc_attr( $form_obj->get_option( 'category', '' ) ); ?>" list="calculated-fields-form-categories" />
|
76 |
-
<datalist id="calculated-fields-form-categories">
|
77 |
<?php
|
78 |
print $cpcff_main->get_categories( 'DATALIST' ); // phpcs:ignore WordPress.Security.EscapeOutput
|
79 |
?>
|
80 |
-
</datalist>
|
81 |
-
</div>
|
82 |
</div>
|
83 |
<hr />
|
84 |
<div><?php esc_html_e( '* Different form styles available on the tab Form Settings >> Form Template', 'calculated-fields-form' ); ?></div>
|
@@ -167,12 +167,12 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
167 |
$calculatedfieldsfQuery(".itemForm").click(function() {
|
168 |
f.fBuild.addItem($calculatedfieldsfQuery(this).attr("id"));
|
169 |
})
|
170 |
-
.draggable({
|
171 |
connectToSortable: '#fbuilder #fieldlist',
|
172 |
delay: 100,
|
173 |
helper: function() {
|
174 |
var $ = $calculatedfieldsfQuery,
|
175 |
-
e = $(this),
|
176 |
width = e.outerWidth(),
|
177 |
text = e.text(),
|
178 |
type = e.attr('id'),
|
@@ -185,7 +185,7 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
185 |
scroll: false,
|
186 |
opacity: 1,
|
187 |
containment: 'document',
|
188 |
-
stop: function(){$calculatedfieldsfQuery('.ctrlsColumn .itemForm').removeClass('button-primary');}
|
189 |
});
|
190 |
|
191 |
jQuery(".metabox_disabled_section .inside")
|
@@ -198,9 +198,9 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
198 |
};
|
199 |
}
|
200 |
catch( err ){}
|
201 |
-
try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {}
|
202 |
-
if (typeof $calculatedfieldsfQuery == 'undefined')
|
203 |
-
{
|
204 |
if(window.addEventListener){
|
205 |
window.addEventListener('load', function(){
|
206 |
try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {return;}
|
@@ -212,35 +212,35 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
212 |
calculatedFieldsFormReady();
|
213 |
});
|
214 |
}
|
215 |
-
}
|
216 |
else
|
217 |
{
|
218 |
$calculatedfieldsfQuery(document).ready( calculatedFieldsFormReady );
|
219 |
}
|
220 |
-
</script>
|
221 |
</pre>
|
222 |
-
<div style="background:#fafafa;" class="form-builder">
|
223 |
|
224 |
-
<div class="column ctrlsColumn">
|
225 |
-
<div id="tabs">
|
226 |
<span class="ui-icon ui-icon-triangle-1-e expand-shrink"></span>
|
227 |
-
<ul>
|
228 |
<li><a href="#tabs-1"><?php esc_html_e( 'Add a Field', 'calculated-fields-form' ); ?></a></li>
|
229 |
<li><a href="#tabs-2"><?php esc_html_e( 'Field Settings', 'calculated-fields-form' ); ?></a></li>
|
230 |
<li><a href="#tabs-3"><?php esc_html_e( 'Form Settings', 'calculated-fields-form' ); ?></a></li>
|
231 |
-
</ul>
|
232 |
-
<div id="tabs-1"></div>
|
233 |
-
<div id="tabs-2"></div>
|
234 |
-
<div id="tabs-3"></div>
|
235 |
-
</div>
|
236 |
-
</div>
|
237 |
-
<div class="columnr dashboardColumn padding10" id="fbuilder">
|
238 |
-
<div id="formheader"></div>
|
239 |
-
<div id="fieldlist"></div>
|
240 |
-
</div>
|
241 |
-
<div class="clearer"></div>
|
242 |
-
|
243 |
-
</div>
|
244 |
|
245 |
</div>
|
246 |
</div>
|
@@ -270,22 +270,22 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
270 |
<div id="metabox_define_texts" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_define_texts' ) ); ?>" >
|
271 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Define Texts', 'calculated-fields-form' ); ?></span></h3>
|
272 |
<div class="inside">
|
273 |
-
<table class="form-table">
|
274 |
-
<tr valign="top">
|
275 |
<th scope="row"><?php esc_html_e( 'Previous button label (text)', 'calculated-fields-form' ); ?>:</th>
|
276 |
<td><input type="text" name="vs_text_previousbtn" class="width75" value="<?php $label = $form_obj->get_option( 'vs_text_previousbtn', 'Previous' );
|
277 |
echo esc_attr( '' == $label ? 'Previous' : $label ); ?>" /></td>
|
278 |
-
</tr>
|
279 |
-
<tr valign="top">
|
280 |
<th scope="row"><?php esc_html_e( 'Next button label (text)', 'calculated-fields-form' ); ?>:</th>
|
281 |
<td><input type="text" name="vs_text_nextbtn" class="width75" value="<?php $label = $form_obj->get_option( 'vs_text_nextbtn', 'Next' );
|
282 |
echo esc_attr( '' == $label ? 'Next' : $label ); ?>" /></td>
|
283 |
-
</tr>
|
284 |
-
<tr valign="top">
|
285 |
-
<td colspan="2">
|
286 |
<?php _e( '- The styles can be applied into any of the CSS files of your theme or into the CSS file <em>"calculated-fields-form\css\stylepublic.css"</em>.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?><br />
|
287 |
<?php _e( '- For general CSS styles modifications to the form and samples <a href="https://cff.dwbooster.com/faq#q82" target="_blank">check this FAQ</a>.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
288 |
-
</tr>
|
289 |
<?php
|
290 |
// Display all other text fields
|
291 |
foreach ( $cpcff_texts_array as $cpcff_text_index => $cpcff_text_attr ) {
|
@@ -299,7 +299,7 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
299 |
}
|
300 |
}
|
301 |
?>
|
302 |
-
</table>
|
303 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
304 |
</div>
|
305 |
</div>
|
@@ -307,44 +307,44 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
307 |
<div id="metabox_define_validation_texts" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_define_validation_texts' ) ); ?>" >
|
308 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Validation Settings', 'calculated-fields-form' ); ?></span></h3>
|
309 |
<div class="inside">
|
310 |
-
<table class="form-table">
|
311 |
-
<tr valign="top">
|
312 |
<th scope="row"><?php esc_html_e( '"is required" text', 'calculated-fields-form' ); ?>:</th>
|
313 |
<td><input type="text" name="vs_text_is_required" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_is_required', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required ) ); ?>" /></td>
|
314 |
-
</tr>
|
315 |
-
<tr valign="top">
|
316 |
<th scope="row"><?php esc_html_e( '"is email" text', 'calculated-fields-form' ); ?>:</th>
|
317 |
<td><input type="text" name="vs_text_is_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_is_email', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_email ) ); ?>" /></td>
|
318 |
-
</tr>
|
319 |
-
<tr valign="top">
|
320 |
<th scope="row"><?php esc_html_e( '"is valid captcha" text', 'calculated-fields-form' ); ?>:</th>
|
321 |
<td><input type="text" name="cv_text_enter_valid_captcha" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'cv_text_enter_valid_captcha', CP_CALCULATEDFIELDSF_DEFAULT_cv_text_enter_valid_captcha ) ); ?>" /></td>
|
322 |
-
</tr>
|
323 |
|
324 |
-
<tr valign="top">
|
325 |
<th scope="row"><?php esc_html_e( '"is valid date (mm/dd/yyyy)" text', 'calculated-fields-form' ); ?>:</th>
|
326 |
<td><input type="text" name="vs_text_datemmddyyyy" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_datemmddyyyy', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_datemmddyyyy ) ); ?>" /></td>
|
327 |
-
</tr>
|
328 |
-
<tr valign="top">
|
329 |
<th scope="row"><?php esc_html_e( '"is valid date (dd/mm/yyyy)" text', 'calculated-fields-form' ); ?>:</th>
|
330 |
<td><input type="text" name="vs_text_dateddmmyyyy" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_dateddmmyyyy', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_dateddmmyyyy ) ); ?>" /></td>
|
331 |
-
</tr>
|
332 |
-
<tr valign="top">
|
333 |
<th scope="row"><?php esc_html_e( '"is number" text', 'calculated-fields-form' ); ?>:</th>
|
334 |
<td><input type="text" name="vs_text_number" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_number', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_number ) ); ?>" /></td>
|
335 |
-
</tr>
|
336 |
-
<tr valign="top">
|
337 |
<th scope="row"><?php esc_html_e( '"only digits" text', 'calculated-fields-form' ); ?>:</th>
|
338 |
<td><input type="text" name="vs_text_digits" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_digits', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_digits ) ); ?>" /></td>
|
339 |
-
</tr>
|
340 |
-
<tr valign="top">
|
341 |
<th scope="row"><?php esc_html_e( '"under maximum" text', 'calculated-fields-form' ); ?>:</th>
|
342 |
<td><input type="text" name="vs_text_max" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_max', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_max ) ); ?>" /></td>
|
343 |
-
</tr>
|
344 |
-
<tr valign="top">
|
345 |
<th scope="row"><?php esc_html_e( '"over minimum" text', 'calculated-fields-form' ); ?>:</th>
|
346 |
<td><input type="text" name="vs_text_min" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_min', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_min ) ); ?>" /></td>
|
347 |
-
</tr>
|
348 |
<?php
|
349 |
// Display all other text fields
|
350 |
if ( ! empty( $cpcff_texts_array['errors'] ) ) {
|
@@ -360,7 +360,7 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
360 |
}
|
361 |
}
|
362 |
?>
|
363 |
-
</table>
|
364 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
365 |
</div>
|
366 |
</div>
|
@@ -384,17 +384,17 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
384 |
<br /><br /><br />
|
385 |
<style>@media screen and (min-width:710px){.cff-plugin-promote{width: calc( 100% - 180px );}} @media screen and (max-width:710px){.cff-plugin-logo-promote{display:none;}}</style>
|
386 |
<div id="cff-upgrade-frame" style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;color:#3c434a;">
|
387 |
-
<a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;float:left;" class="cff-plugin-logo-promote"><img src="https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg" style="width:160px;border:2px solid white;margin-right:10px;margin-bottom:10px;"></a>
|
388 |
-
<div style="float:left;" class="cff-plugin-promote">
|
389 |
<div style="font-weight:500;font-size:20px;line-height:28px;"><?php _e( 'The following features are available in the commercial version of the <a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;">"Calculated Fields Form"</a>', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></div>
|
390 |
<div style="text-transform: uppercase; font-weight:700; font-size:24px;margin-top:15px;margin-bottom:15px;line-height:28px;"><a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;color:#3c434a;text-shadow:1px 1px 2px white;"><?php esc_html_e( 'Pay only ONCE, use it FOREVER', 'calculated-fields-form' ); ?></a></div>
|
391 |
-
<div style="font-size:18px; font-weight:400;line-height:28px;">No additional charges, <span style="background:white;display:inline-block;padding:0 5px;"><a href="https://cff.dwbooster.com/terms" target="_blank" style="text-decoration:none;">lifetime updates</a></span>, one copy for all your websites.</div>
|
392 |
-
<div style="font-size:16px; font-weight:400; font-style: italic;">And you get notification emails, payment gateways integration, data and forms exportation, advanced operations and more...</div>
|
393 |
<?php
|
394 |
print get_option( 'cff-t-t', '<div style="text-align:right; font-size:16px; font-weight:600;margin-top:15px;">To test some of the commercial features of the "Calculated Fields Form" plugin, you can <a class="button-primary" href="admin.php?page=cp_calculated_fields_form&cal=' . CP_CALCULATEDFIELDSF_ID . '&_cpcff_nonce=' . $_cpcff_nonce . '&cff-install-trial=1#cff-upgrade-frame">install the trial version</a></div>' ); // phpcs:ignore WordPress.Security.EscapeOutput
|
395 |
?>
|
396 |
-
</div>
|
397 |
-
<div style="clear:both;"></div>
|
398 |
</div>
|
399 |
<h2><?php esc_html_e( 'Form Processing and Payment Settings', 'calculated-fields-form' ); ?>:</h2>
|
400 |
<hr />
|
@@ -403,51 +403,51 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
403 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Payment Settings', 'calculated-fields-form' ); ?></span></h3>
|
404 |
<div class="inside">
|
405 |
|
406 |
-
<table class="form-table">
|
407 |
-
<tr valign="top">
|
408 |
<th scope="row"><?php esc_html_e( 'Request cost', 'calculated-fields-form' ); ?></th>
|
409 |
-
<td><select name="request_cost" id="request_cost" class="width75"></select></td>
|
410 |
-
</tr>
|
411 |
|
412 |
-
<tr valign="top">
|
413 |
<th scope="row"><?php esc_html_e( 'Currency', 'calculated-fields-form' ); ?></th>
|
414 |
<td><input type="text" name="currency" value="<?php echo esc_attr( $form_obj->get_option( 'currency', CP_CALCULATEDFIELDSF_DEFAULT_CURRENCY ) ); ?>" /><br>
|
415 |
<b>USD</b> (<?php esc_html_e( 'United States dollar', 'calculated-fields-form' ); ?>), <b>EUR</b> (Euro), <b>GBP</b> (<?php esc_html_e( 'Pound sterling', 'calculated-fields-form' ); ?>), ... (<a href="https://developer.paypal.com/docs/api/reference/currency-codes/" target="_blank"><?php esc_html_e( 'PayPal Currency Codes', 'calculated-fields-form' ); ?></a>)
|
416 |
</td>
|
417 |
-
</tr>
|
418 |
|
419 |
<tr valign="top">
|
420 |
<th scope="row"><?php esc_html_e( 'Base amount', 'calculated-fields-form' ); ?>:</th>
|
421 |
<td><input type="text" name="paypal_base_amount" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_base_amount', '0.01' ) ); ?>" /><br><i style="font-size:11px;"><?php esc_html_e( 'Minimum amount to charge. If the final price is lesser than this number, the base amount will be applied.', 'calculated-fields-form' ); ?></i>
|
422 |
-
</td>
|
423 |
-
</tr>
|
424 |
|
425 |
-
<tr valign="top">
|
426 |
<th scope="row"><?php esc_html_e( 'Paypal product name', 'calculated-fields-form' ); ?></th>
|
427 |
<td><input type="text" name="paypal_product_name" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_product_name', CP_CALCULATEDFIELDSF_DEFAULT_PRODUCT_NAME ) ); ?>" /></td>
|
428 |
-
</tr>
|
429 |
|
430 |
-
<tr valign="top">
|
431 |
<th scope="row"><?php esc_html_e( 'Discount Codes', 'calculated-fields-form' ); ?></th>
|
432 |
-
<td>
|
433 |
<div id="dex_nocodes_availmsg"><?php esc_html_e( 'This feature isn\'t available in this version.', 'calculated-fields-form' ); ?></div>
|
434 |
|
435 |
-
<br />
|
436 |
<strong><?php esc_html_e( 'Add new discount code', 'calculated-fields-form' ); ?>:</strong>
|
437 |
-
<br />
|
438 |
<nobr><?php esc_html_e( 'Code', 'calculated-fields-form' ); ?>: <input type="text" name="dex_dc_code" id="dex_dc_code" value="" /></nobr>
|
439 |
<nobr><?php esc_html_e( 'Discount', 'calculated-fields-form' ); ?>: <input type="text" size="3" name="dex_dc_discount" id="dex_dc_discount" value="25" /><select name="dex_dc_discounttype" id="dex_dc_discounttype">
|
440 |
<option value="0"><?php esc_html_e( 'Percent', 'calculated-fields-form' ); ?></option>
|
441 |
<option value="1"><?php esc_html_e( 'Fixed Value', 'calculated-fields-form' ); ?></option>
|
442 |
-
</select></nobr>
|
443 |
-
|
444 |
<nobr><?php esc_html_e( 'Valid until', 'calculated-fields-form' ); ?>: <input type="text" size="10" name="dex_dc_expires" id="dex_dc_expires" value="" /></nobr>
|
445 |
<input type="button" name="dex_dc_subccode" id="dex_dc_subccode" value="<?php esc_attr_e( 'Add', 'calculated-fields-form' ); ?>" onclick="alert('This feature ins\'t available in this version');" class="button-secondary" />
|
446 |
-
<br />
|
447 |
<em style="font-size:11px;"><?php esc_html_e( 'Note: Expiration date based in server time. Server time now is', 'calculated-fields-form' ); ?> <?php echo esc_html( gmdate( 'Y-m-d H:i' ) ); ?></em>
|
448 |
-
</td>
|
449 |
-
</tr>
|
450 |
-
</table>
|
451 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
452 |
</div>
|
453 |
</div>
|
@@ -456,54 +456,54 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
456 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Paypal Payment Configuration', 'calculated-fields-form' ); ?></span></h3>
|
457 |
<div class="inside">
|
458 |
|
459 |
-
<table class="form-table">
|
460 |
-
<tr valign="top">
|
461 |
<th scope="row"><?php esc_html_e( 'Enable Paypal Payments?', 'calculated-fields-form' ); ?></th>
|
462 |
-
<td><select name="enable_paypal">
|
463 |
<option value="0"><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
464 |
-
</select>
|
465 |
<br /><i style="font-size:11px;"><?php esc_html_e( 'Note: If "Optional" is selected, a radiobutton will appear in the form to select if the payment will be made with PayPal or not.', 'calculated-fields-form' ); ?></i>
|
466 |
-
<div id="cff_paypal_options_label" style="margin-top:10px;background:#EEF5FB;border: 1px dotted #888888;padding:10px;width:260px;">
|
467 |
<?php _e( 'Label for the "<strong>Pay with PayPal</strong>" option', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>:<br />
|
468 |
-
<input type="text" size="40" style="width:250px;" />
|
469 |
-
</div></td>
|
470 |
-
</tr>
|
471 |
|
472 |
-
<tr valign="top">
|
473 |
<th scope="row"><?php esc_html_e( 'Paypal Mode', 'calculated-fields-form' ); ?></th>
|
474 |
-
<td><select name="paypal_mode" class="width75">
|
475 |
<option value="production" <?php if ( 'sandbox' != $form_obj->get_option( 'paypal_mode', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_MODE ) ) {
|
476 |
echo 'selected';} ?>><?php esc_html_e( 'Production - real payments processed', 'calculated-fields-form' ); ?></option>
|
477 |
<option value="sandbox" <?php if ( 'sandbox' == $form_obj->get_option( 'paypal_mode', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_MODE ) ) {
|
478 |
echo 'selected';} ?>><?php esc_html_e( 'SandBox - PayPal testing sandbox area', 'calculated-fields-form' ); ?></option>
|
479 |
-
</select>
|
480 |
-
</td>
|
481 |
-
</tr>
|
482 |
|
483 |
-
<tr valign="top">
|
484 |
<th scope="row"><?php esc_html_e( 'Paypal email', 'calculated-fields-form' ); ?></th>
|
485 |
<td><input type="text" name="paypal_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_email', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_EMAIL ) ); ?>" /></td>
|
486 |
-
</tr>
|
487 |
|
488 |
-
<tr valign="top">
|
489 |
<th scope="row"><?php esc_html_e( 'A $0 amount to pay means', 'calculated-fields-form' ); ?>:</th>
|
490 |
-
<td><select name="paypal_zero_payment" class="width75">
|
491 |
<option value="0" <?php if ( '1' != $form_obj->get_option( 'paypal_zero_payment', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT ) ) {
|
492 |
echo 'selected';} ?>><?php esc_html_e( 'Let the user enter any amount at PayPal (ex: for a donation)', 'calculated-fields-form' ); ?></option>
|
493 |
<option value="1" <?php if ( $form_obj->get_option( 'paypal_zero_payment', '1' == CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT ) ) {
|
494 |
echo 'selected';} ?>><?php esc_html_e( 'Don\'t require any payment. Form is submitted skiping the PayPal page.', 'calculated-fields-form' ); ?></option>
|
495 |
-
</select>
|
496 |
-
</td>
|
497 |
-
</tr>
|
498 |
|
499 |
-
<tr valign="top">
|
500 |
<th scope="row"><?php esc_html_e( 'Paypal language', 'calculated-fields-form' ); ?></th>
|
501 |
<td><input type="text" name="paypal_language" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_language', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_LANGUAGE ) ); ?>" /></td>
|
502 |
-
</tr>
|
503 |
|
504 |
-
<tr valign="top">
|
505 |
<th scope="row"><?php esc_html_e( 'Payment frequency', 'calculated-fields-form' ); ?></th>
|
506 |
-
<td><select name="paypal_recurrent" class="width75">
|
507 |
<option value="0" <?php if ( '0' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT ) ||
|
508 |
'' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT )
|
509 |
) {
|
@@ -516,12 +516,12 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
516 |
echo 'selected';} ?>><?php esc_html_e( 'Bill the user every 6 months', 'calculated-fields-form' ); ?></option>
|
517 |
<option value="12" <?php if ( '12' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT ) ) {
|
518 |
echo 'selected';} ?>><?php esc_html_e( 'Bill the user every 12 months', 'calculated-fields-form' ); ?></option>
|
519 |
-
</select>
|
520 |
-
</td>
|
521 |
-
</tr>
|
522 |
<tr valign="top">
|
523 |
<th scope="row"><?php esc_html_e( 'Paypal prompt buyers for shipping address', 'calculated-fields-form' ); ?></th>
|
524 |
-
<td>
|
525 |
<?php $paypal_address = $form_obj->get_option( 'paypal_address', 1 ); ?>
|
526 |
<select name="paypal_address" class="width75">
|
527 |
<option value="1" <?php if ( 1 == $paypal_address ) {
|
@@ -532,8 +532,8 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
532 |
print 'SELECTED';} ?>><?php esc_html_e( 'Prompt for an address and require one', 'calculated-fields-form' ); ?></option>
|
533 |
</select>
|
534 |
</td>
|
535 |
-
</tr>
|
536 |
-
</table>
|
537 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
538 |
</div>
|
539 |
</div>
|
@@ -541,52 +541,52 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
541 |
<div id="metabox_notification_email" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_notification_email' ) ); ?>" >
|
542 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Form Processing / Email Settings', 'calculated-fields-form' ); ?></span></h3>
|
543 |
<div class="inside">
|
544 |
-
<table class="form-table">
|
545 |
-
<tr valign="top">
|
546 |
<th scope="row"><?php esc_html_e( '"From" email', 'calculated-fields-form' ); ?></th>
|
547 |
<td><input type="text" name="fp_from_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_from_email', CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email ) ); ?>" /><br><b><em style="font-size:11px;">Ex: admin@<?php echo esc_html( isset( $_SERVER['HTTP_HOST'] ) ? str_replace( 'www.', '', sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) ) : '' ); ?></em></b><br><em style="font-size:11px;"><?php esc_html_e( 'This email is required if the "From fixed email address" option is selected, or it is enabled the email copy to the user.', 'calculated-fields-form' ); ?></em></td>
|
548 |
-
</tr>
|
549 |
-
<tr valign="top">
|
550 |
<th scope="row"><?php esc_html_e( 'Destination emails (comma separated)', 'calculated-fields-form' ); ?></th>
|
551 |
<td><input type="text" name="fp_destination_emails" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_destination_emails', CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails ) ); ?>" /></td>
|
552 |
-
</tr>
|
553 |
-
<tr valign="top">
|
554 |
<th scope="row"><?php esc_html_e( 'Email subject', 'calculated-fields-form' ); ?></th>
|
555 |
<td><input type="text" name="fp_subject" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_subject', CP_CALCULATEDFIELDSF_DEFAULT_fp_subject ) ); ?>" /></td>
|
556 |
-
</tr>
|
557 |
-
<tr valign="top">
|
558 |
<th scope="row"><?php esc_html_e( 'Include additional information?', 'calculated-fields-form' ); ?></th>
|
559 |
-
<td>
|
560 |
<?php $option = $form_obj->get_option( 'fp_inc_additional_info', CP_CALCULATEDFIELDSF_DEFAULT_fp_inc_additional_info ); ?>
|
561 |
-
<select name="fp_inc_additional_info">
|
562 |
<option value="true"<?php if ( 'true' == $option ) {
|
563 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
564 |
<option value="false"<?php if ( 'false' == $option ) {
|
565 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
566 |
</select> <em style="font-size:11px;"><?php esc_html_e( 'If the "No" option is selected the plugin won\'t capture the IP address of users.', 'calculated-fields-form' ); ?></em>
|
567 |
-
</td>
|
568 |
-
</tr>
|
569 |
-
<tr valign="top">
|
570 |
<th scope="row"><?php esc_html_e( 'Thank you page (after sending the message)', 'calculated-fields-form' ); ?></th>
|
571 |
<td><input type="text" name="fp_return_page" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_return_page', CP_CALCULATEDFIELDSF_DEFAULT_fp_return_page ) ); ?>" /></td>
|
572 |
-
</tr>
|
573 |
-
<tr valign="top">
|
574 |
<th scope="row"><?php esc_html_e( 'Email format?', 'calculated-fields-form' ); ?></th>
|
575 |
-
<td>
|
576 |
<?php $option = $form_obj->get_option( 'fp_emailformat', CP_CALCULATEDFIELDSF_DEFAULT_email_format ); ?>
|
577 |
-
<select name="fp_emailformat" class="width75">
|
578 |
<option value="text"<?php if ( 'html' != $option ) {
|
579 |
echo ' selected';} ?>><?php esc_html_e( 'Plain Text (default)', 'calculated-fields-form' ); ?></option>
|
580 |
<option value="html"<?php if ( 'html' == $option ) {
|
581 |
echo ' selected';} ?>><?php esc_html_e( 'HTML (use html in the textarea below)', 'calculated-fields-form' ); ?></option>
|
582 |
-
</select>
|
583 |
-
</td>
|
584 |
-
</tr>
|
585 |
-
<tr valign="top">
|
586 |
<th scope="row"><?php esc_html_e( 'Message', 'calculated-fields-form' ); ?></th>
|
587 |
<td><textarea type="text" name="fp_message" rows="6" class="width75"><?php echo esc_textarea( $form_obj->get_option( 'fp_message', CP_CALCULATEDFIELDSF_DEFAULT_fp_message ) ); ?></textarea></td>
|
588 |
-
</tr>
|
589 |
-
</table>
|
590 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
591 |
</div>
|
592 |
</div>
|
@@ -595,44 +595,44 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
595 |
<div id="metabox_email_copy_to_user" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_email_copy_to_user' ) ); ?>" >
|
596 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Email Copy to User', 'calculated-fields-form' ); ?></span></h3>
|
597 |
<div class="inside">
|
598 |
-
<table class="form-table">
|
599 |
-
<tr valign="top">
|
600 |
<th scope="row"><?php esc_html_e( 'Send confirmation/thank you message to user?', 'calculated-fields-form' ); ?></th>
|
601 |
-
<td>
|
602 |
<?php $option = $form_obj->get_option( 'cu_enable_copy_to_user', CP_CALCULATEDFIELDSF_DEFAULT_cu_enable_copy_to_user ); ?>
|
603 |
-
<select name="cu_enable_copy_to_user">
|
604 |
<option value="true"<?php if ( 'true' == $option ) {
|
605 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
606 |
<option value="false"<?php if ( 'false' == $option ) {
|
607 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
608 |
-
</select>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
<tr valign="top">
|
612 |
<th scope="row"><?php esc_html_e( 'Email field on the form', 'calculated-fields-form' ); ?></th>
|
613 |
<td><select id="cu_user_email_field" name="cu_user_email_field" def="<?php echo esc_attr( $form_obj->get_option( 'cu_user_email_field', CP_CALCULATEDFIELDSF_DEFAULT_cu_user_email_field ) ); ?>" class="width75"></select></td>
|
614 |
-
</tr>
|
615 |
-
<tr valign="top">
|
616 |
<th scope="row"><?php esc_html_e( 'Email subject', 'calculated-fields-form' ); ?></th>
|
617 |
<td><input type="text" name="cu_subject" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'cu_subject', CP_CALCULATEDFIELDSF_DEFAULT_cu_subject ) ); ?>" /></td>
|
618 |
-
</tr>
|
619 |
-
<tr valign="top">
|
620 |
<th scope="row"><?php esc_html_e( 'Email format?', 'calculated-fields-form' ); ?></th>
|
621 |
-
<td>
|
622 |
<?php $option = $form_obj->get_option( 'cu_emailformat', CP_CALCULATEDFIELDSF_DEFAULT_email_format ); ?>
|
623 |
-
<select name="cu_emailformat" class="width75">
|
624 |
<option value="text"<?php if ( 'html' != $option ) {
|
625 |
echo ' selected';} ?>><?php esc_html_e( 'Plain Text (default)', 'calculated-fields-form' ); ?></option>
|
626 |
<option value="html"<?php if ( 'html' == $option ) {
|
627 |
echo ' selected';} ?>><?php esc_html_e( 'HTML (use html in the textarea below)', 'calculated-fields-form' ); ?></option>
|
628 |
-
</select>
|
629 |
-
</td>
|
630 |
-
</tr>
|
631 |
-
<tr valign="top">
|
632 |
<th scope="row"><?php esc_html_e( 'Message', 'calculated-fields-form' ); ?></th>
|
633 |
<td><textarea type="text" name="cu_message" rows="6" class="width75"><?php echo esc_textarea( $form_obj->get_option( 'cu_message', CP_CALCULATEDFIELDSF_DEFAULT_cu_message ) ); ?></textarea></td>
|
634 |
-
</tr>
|
635 |
-
</table>
|
636 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
637 |
</div>
|
638 |
</div>
|
@@ -640,60 +640,60 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
640 |
<div id="metabox_captcha_settings" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_captcha_settings' ) ); ?>" >
|
641 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Captcha Verification', 'calculated-fields-form' ); ?></span></h3>
|
642 |
<div class="inside">
|
643 |
-
<table class="form-table">
|
644 |
-
<tr valign="top">
|
645 |
<th scope="row"><?php esc_html_e( 'Use Captcha Verification?', 'calculated-fields-form' ); ?></th>
|
646 |
-
<td colspan="5">
|
647 |
<?php $option = $form_obj->get_option( 'cv_enable_captcha', CP_CALCULATEDFIELDSF_DEFAULT_cv_enable_captcha ); ?>
|
648 |
-
<select name="cv_enable_captcha">
|
649 |
<option value="true"<?php if ( 'true' == $option ) {
|
650 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
651 |
<option value="false"<?php if ( 'false' == $option ) {
|
652 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
653 |
-
</select>
|
654 |
-
</td>
|
655 |
-
</tr>
|
656 |
|
657 |
-
<tr valign="top">
|
658 |
<th scope="row"><?php esc_html_e( 'Width', 'calculated-fields-form' ); ?>:</th>
|
659 |
<td><input type="text" readonly=readonly name="cv_width" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_width', CP_CALCULATEDFIELDSF_DEFAULT_cv_width ) ); ?>" onblur="generateCaptcha();" /></td>
|
660 |
<th scope="row"><?php esc_html_e( 'Height', 'calculated-fields-form' ); ?>:</th>
|
661 |
<td><input type="text" readonly=readonly name="cv_height" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_height', CP_CALCULATEDFIELDSF_DEFAULT_cv_height ) ); ?>" onblur="generateCaptcha();" /></td>
|
662 |
<th scope="row"><?php esc_html_e( 'Chars', 'calculated-fields-form' ); ?>:</th>
|
663 |
<td><input type="text" readonly=readonly name="cv_chars" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_chars', CP_CALCULATEDFIELDSF_DEFAULT_cv_chars ) ); ?>" onblur="generateCaptcha();" /></td>
|
664 |
-
</tr>
|
665 |
|
666 |
-
<tr valign="top">
|
667 |
<th scope="row"><?php esc_html_e( 'Min font size', 'calculated-fields-form' ); ?>:</th>
|
668 |
<td><input type="text" readonly=readonly name="cv_min_font_size" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_min_font_size', CP_CALCULATEDFIELDSF_DEFAULT_cv_min_font_size ) ); ?>" onblur="generateCaptcha();" /></td>
|
669 |
<th scope="row"><?php esc_html_e( 'Max font size', 'calculated-fields-form' ); ?>:</th>
|
670 |
<td><input type="text" readonly=readonly name="cv_max_font_size" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_max_font_size', CP_CALCULATEDFIELDSF_DEFAULT_cv_max_font_size ) ); ?>" onblur="generateCaptcha();" /></td>
|
671 |
-
<td colspan="2" rowspan="">
|
672 |
<?php esc_html_e( 'Preview', 'calculated-fields-form' ); ?>:<br />
|
673 |
-
<br />
|
674 |
<img src="<?php echo esc_url( plugins_url( '/captcha/captcha.php', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) ); ?>" id="captchaimg" alt="<?php esc_attr_e( 'security code', 'calculated-fields-form' ); ?>" border="0" class="skip-lazy" />
|
675 |
-
</td>
|
676 |
-
</tr>
|
677 |
|
678 |
|
679 |
-
<tr valign="top">
|
680 |
<th scope="row"><?php esc_html_e( 'Noise', 'calculated-fields-form' ); ?>:</th>
|
681 |
<td><input type="text" readonly=readonly name="cv_noise" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_noise', CP_CALCULATEDFIELDSF_DEFAULT_cv_noise ) ); ?>" onblur="generateCaptcha();" /></td>
|
682 |
<th scope="row"><?php esc_html_e( 'Noise Length', 'calculated-fields-form' ); ?>:</th>
|
683 |
<td><input type="text" readonly=readonly name="cv_noise_length" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_noise_length', CP_CALCULATEDFIELDSF_DEFAULT_cv_noise_length ) ); ?>" onblur="generateCaptcha();" /></td>
|
684 |
-
</tr>
|
685 |
|
686 |
-
<tr valign="top">
|
687 |
<th scope="row"><?php esc_html_e( 'Background', 'calculated-fields-form' ); ?>:</th>
|
688 |
<td><input type="text" readonly=readonly name="cv_background" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_background', CP_CALCULATEDFIELDSF_DEFAULT_cv_background ) ); ?>" onblur="generateCaptcha();" /></td>
|
689 |
-
<th scope="row">Border:</th>
|
690 |
<td><input type="text" readonly=readonly name="cv_border" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_border', CP_CALCULATEDFIELDSF_DEFAULT_cv_border ) ); ?>" onblur="generateCaptcha();" /></td>
|
691 |
-
</tr>
|
692 |
|
693 |
-
<tr valign="top">
|
694 |
<th scope="row"><?php esc_html_e( 'Font', 'calculated-fields-form' ); ?>:</th>
|
695 |
-
<td>
|
696 |
-
<select name="cv_font" onchange="generateCaptcha();" >
|
697 |
<option value="font-1.ttf"<?php if ( 'font-1.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
698 |
echo ' selected';} ?>>Font 1</option>
|
699 |
<option value="font-2.ttf"<?php if ( 'font-2.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
@@ -702,10 +702,10 @@ if ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF
|
|
702 |
echo ' selected';} ?>>Font 3</option>
|
703 |
<option value="font-4.ttf"<?php if ( 'font-4.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
704 |
echo ' selected';} ?>>Font 4</option>
|
705 |
-
</select>
|
706 |
-
</td>
|
707 |
-
</tr>
|
708 |
-
</table>
|
709 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
710 |
</div>
|
711 |
</div>
|
70 |
<h2><?php esc_html_e( 'Form Settings', 'calculated-fields-form' ); ?>:</h2>
|
71 |
<!-- Form category -->
|
72 |
<div class="postbox" >
|
73 |
+
<div class="inside">
|
74 |
<b><?php esc_html_e( 'Form Category', 'calculated-fields-form' ); ?></b>
|
75 |
<input type="text" name="calculated-fields-form-category" class="width75" value="<?php print esc_attr( $form_obj->get_option( 'category', '' ) ); ?>" list="calculated-fields-form-categories" />
|
76 |
+
<datalist id="calculated-fields-form-categories">
|
77 |
<?php
|
78 |
print $cpcff_main->get_categories( 'DATALIST' ); // phpcs:ignore WordPress.Security.EscapeOutput
|
79 |
?>
|
80 |
+
</datalist>
|
81 |
+
</div>
|
82 |
</div>
|
83 |
<hr />
|
84 |
<div><?php esc_html_e( '* Different form styles available on the tab Form Settings >> Form Template', 'calculated-fields-form' ); ?></div>
|
167 |
$calculatedfieldsfQuery(".itemForm").click(function() {
|
168 |
f.fBuild.addItem($calculatedfieldsfQuery(this).attr("id"));
|
169 |
})
|
170 |
+
.draggable({
|
171 |
connectToSortable: '#fbuilder #fieldlist',
|
172 |
delay: 100,
|
173 |
helper: function() {
|
174 |
var $ = $calculatedfieldsfQuery,
|
175 |
+
e = $(this),
|
176 |
width = e.outerWidth(),
|
177 |
text = e.text(),
|
178 |
type = e.attr('id'),
|
185 |
scroll: false,
|
186 |
opacity: 1,
|
187 |
containment: 'document',
|
188 |
+
stop: function(){$calculatedfieldsfQuery('.ctrlsColumn .itemForm').removeClass('button-primary');}
|
189 |
});
|
190 |
|
191 |
jQuery(".metabox_disabled_section .inside")
|
198 |
};
|
199 |
}
|
200 |
catch( err ){}
|
201 |
+
try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {}
|
202 |
+
if (typeof $calculatedfieldsfQuery == 'undefined')
|
203 |
+
{
|
204 |
if(window.addEventListener){
|
205 |
window.addEventListener('load', function(){
|
206 |
try{$calculatedfieldsfQuery = jQuery.noConflict();} catch ( err ) {return;}
|
212 |
calculatedFieldsFormReady();
|
213 |
});
|
214 |
}
|
215 |
+
}
|
216 |
else
|
217 |
{
|
218 |
$calculatedfieldsfQuery(document).ready( calculatedFieldsFormReady );
|
219 |
}
|
220 |
+
</script>
|
221 |
</pre>
|
222 |
+
<div style="background:#fafafa;" class="form-builder">
|
223 |
|
224 |
+
<div class="column ctrlsColumn">
|
225 |
+
<div id="tabs">
|
226 |
<span class="ui-icon ui-icon-triangle-1-e expand-shrink"></span>
|
227 |
+
<ul>
|
228 |
<li><a href="#tabs-1"><?php esc_html_e( 'Add a Field', 'calculated-fields-form' ); ?></a></li>
|
229 |
<li><a href="#tabs-2"><?php esc_html_e( 'Field Settings', 'calculated-fields-form' ); ?></a></li>
|
230 |
<li><a href="#tabs-3"><?php esc_html_e( 'Form Settings', 'calculated-fields-form' ); ?></a></li>
|
231 |
+
</ul>
|
232 |
+
<div id="tabs-1"></div>
|
233 |
+
<div id="tabs-2"></div>
|
234 |
+
<div id="tabs-3"></div>
|
235 |
+
</div>
|
236 |
+
</div>
|
237 |
+
<div class="columnr dashboardColumn padding10" id="fbuilder">
|
238 |
+
<div id="formheader"></div>
|
239 |
+
<div id="fieldlist"></div>
|
240 |
+
</div>
|
241 |
+
<div class="clearer"></div>
|
242 |
+
|
243 |
+
</div>
|
244 |
|
245 |
</div>
|
246 |
</div>
|
270 |
<div id="metabox_define_texts" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_define_texts' ) ); ?>" >
|
271 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Define Texts', 'calculated-fields-form' ); ?></span></h3>
|
272 |
<div class="inside">
|
273 |
+
<table class="form-table">
|
274 |
+
<tr valign="top">
|
275 |
<th scope="row"><?php esc_html_e( 'Previous button label (text)', 'calculated-fields-form' ); ?>:</th>
|
276 |
<td><input type="text" name="vs_text_previousbtn" class="width75" value="<?php $label = $form_obj->get_option( 'vs_text_previousbtn', 'Previous' );
|
277 |
echo esc_attr( '' == $label ? 'Previous' : $label ); ?>" /></td>
|
278 |
+
</tr>
|
279 |
+
<tr valign="top">
|
280 |
<th scope="row"><?php esc_html_e( 'Next button label (text)', 'calculated-fields-form' ); ?>:</th>
|
281 |
<td><input type="text" name="vs_text_nextbtn" class="width75" value="<?php $label = $form_obj->get_option( 'vs_text_nextbtn', 'Next' );
|
282 |
echo esc_attr( '' == $label ? 'Next' : $label ); ?>" /></td>
|
283 |
+
</tr>
|
284 |
+
<tr valign="top">
|
285 |
+
<td colspan="2">
|
286 |
<?php _e( '- The styles can be applied into any of the CSS files of your theme or into the CSS file <em>"calculated-fields-form\css\stylepublic.css"</em>.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?><br />
|
287 |
<?php _e( '- For general CSS styles modifications to the form and samples <a href="https://cff.dwbooster.com/faq#q82" target="_blank">check this FAQ</a>.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
288 |
+
</tr>
|
289 |
<?php
|
290 |
// Display all other text fields
|
291 |
foreach ( $cpcff_texts_array as $cpcff_text_index => $cpcff_text_attr ) {
|
299 |
}
|
300 |
}
|
301 |
?>
|
302 |
+
</table>
|
303 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
304 |
</div>
|
305 |
</div>
|
307 |
<div id="metabox_define_validation_texts" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_define_validation_texts' ) ); ?>" >
|
308 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Validation Settings', 'calculated-fields-form' ); ?></span></h3>
|
309 |
<div class="inside">
|
310 |
+
<table class="form-table">
|
311 |
+
<tr valign="top">
|
312 |
<th scope="row"><?php esc_html_e( '"is required" text', 'calculated-fields-form' ); ?>:</th>
|
313 |
<td><input type="text" name="vs_text_is_required" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_is_required', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_required ) ); ?>" /></td>
|
314 |
+
</tr>
|
315 |
+
<tr valign="top">
|
316 |
<th scope="row"><?php esc_html_e( '"is email" text', 'calculated-fields-form' ); ?>:</th>
|
317 |
<td><input type="text" name="vs_text_is_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_is_email', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_is_email ) ); ?>" /></td>
|
318 |
+
</tr>
|
319 |
+
<tr valign="top">
|
320 |
<th scope="row"><?php esc_html_e( '"is valid captcha" text', 'calculated-fields-form' ); ?>:</th>
|
321 |
<td><input type="text" name="cv_text_enter_valid_captcha" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'cv_text_enter_valid_captcha', CP_CALCULATEDFIELDSF_DEFAULT_cv_text_enter_valid_captcha ) ); ?>" /></td>
|
322 |
+
</tr>
|
323 |
|
324 |
+
<tr valign="top">
|
325 |
<th scope="row"><?php esc_html_e( '"is valid date (mm/dd/yyyy)" text', 'calculated-fields-form' ); ?>:</th>
|
326 |
<td><input type="text" name="vs_text_datemmddyyyy" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_datemmddyyyy', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_datemmddyyyy ) ); ?>" /></td>
|
327 |
+
</tr>
|
328 |
+
<tr valign="top">
|
329 |
<th scope="row"><?php esc_html_e( '"is valid date (dd/mm/yyyy)" text', 'calculated-fields-form' ); ?>:</th>
|
330 |
<td><input type="text" name="vs_text_dateddmmyyyy" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_dateddmmyyyy', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_dateddmmyyyy ) ); ?>" /></td>
|
331 |
+
</tr>
|
332 |
+
<tr valign="top">
|
333 |
<th scope="row"><?php esc_html_e( '"is number" text', 'calculated-fields-form' ); ?>:</th>
|
334 |
<td><input type="text" name="vs_text_number" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_number', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_number ) ); ?>" /></td>
|
335 |
+
</tr>
|
336 |
+
<tr valign="top">
|
337 |
<th scope="row"><?php esc_html_e( '"only digits" text', 'calculated-fields-form' ); ?>:</th>
|
338 |
<td><input type="text" name="vs_text_digits" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_digits', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_digits ) ); ?>" /></td>
|
339 |
+
</tr>
|
340 |
+
<tr valign="top">
|
341 |
<th scope="row"><?php esc_html_e( '"under maximum" text', 'calculated-fields-form' ); ?>:</th>
|
342 |
<td><input type="text" name="vs_text_max" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_max', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_max ) ); ?>" /></td>
|
343 |
+
</tr>
|
344 |
+
<tr valign="top">
|
345 |
<th scope="row"><?php esc_html_e( '"over minimum" text', 'calculated-fields-form' ); ?>:</th>
|
346 |
<td><input type="text" name="vs_text_min" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'vs_text_min', CP_CALCULATEDFIELDSF_DEFAULT_vs_text_min ) ); ?>" /></td>
|
347 |
+
</tr>
|
348 |
<?php
|
349 |
// Display all other text fields
|
350 |
if ( ! empty( $cpcff_texts_array['errors'] ) ) {
|
360 |
}
|
361 |
}
|
362 |
?>
|
363 |
+
</table>
|
364 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
365 |
</div>
|
366 |
</div>
|
384 |
<br /><br /><br />
|
385 |
<style>@media screen and (min-width:710px){.cff-plugin-promote{width: calc( 100% - 180px );}} @media screen and (max-width:710px){.cff-plugin-logo-promote{display:none;}}</style>
|
386 |
<div id="cff-upgrade-frame" style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;color:#3c434a;">
|
387 |
+
<a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;float:left;" class="cff-plugin-logo-promote"><img src="https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg" style="width:160px;border:2px solid white;margin-right:10px;margin-bottom:10px;"></a>
|
388 |
+
<div style="float:left;" class="cff-plugin-promote">
|
389 |
<div style="font-weight:500;font-size:20px;line-height:28px;"><?php _e( 'The following features are available in the commercial version of the <a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;">"Calculated Fields Form"</a>', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></div>
|
390 |
<div style="text-transform: uppercase; font-weight:700; font-size:24px;margin-top:15px;margin-bottom:15px;line-height:28px;"><a href="https://cff.dwbooster.com/download" target="_blank" style="text-decoration:none;color:#3c434a;text-shadow:1px 1px 2px white;"><?php esc_html_e( 'Pay only ONCE, use it FOREVER', 'calculated-fields-form' ); ?></a></div>
|
391 |
+
<div style="font-size:18px; font-weight:400;line-height:28px;">No additional charges, <span style="background:white;display:inline-block;padding:0 5px;"><a href="https://cff.dwbooster.com/terms" target="_blank" style="text-decoration:none;">lifetime updates</a></span>, one copy for all your websites.</div>
|
392 |
+
<div style="font-size:16px; font-weight:400; font-style: italic;">And you get notification emails, payment gateways integration, data and forms exportation, advanced operations and more...</div>
|
393 |
<?php
|
394 |
print get_option( 'cff-t-t', '<div style="text-align:right; font-size:16px; font-weight:600;margin-top:15px;">To test some of the commercial features of the "Calculated Fields Form" plugin, you can <a class="button-primary" href="admin.php?page=cp_calculated_fields_form&cal=' . CP_CALCULATEDFIELDSF_ID . '&_cpcff_nonce=' . $_cpcff_nonce . '&cff-install-trial=1#cff-upgrade-frame">install the trial version</a></div>' ); // phpcs:ignore WordPress.Security.EscapeOutput
|
395 |
?>
|
396 |
+
</div>
|
397 |
+
<div style="clear:both;"></div>
|
398 |
</div>
|
399 |
<h2><?php esc_html_e( 'Form Processing and Payment Settings', 'calculated-fields-form' ); ?>:</h2>
|
400 |
<hr />
|
403 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Payment Settings', 'calculated-fields-form' ); ?></span></h3>
|
404 |
<div class="inside">
|
405 |
|
406 |
+
<table class="form-table">
|
407 |
+
<tr valign="top">
|
408 |
<th scope="row"><?php esc_html_e( 'Request cost', 'calculated-fields-form' ); ?></th>
|
409 |
+
<td><select name="request_cost" id="request_cost" class="width75"></select></td>
|
410 |
+
</tr>
|
411 |
|
412 |
+
<tr valign="top">
|
413 |
<th scope="row"><?php esc_html_e( 'Currency', 'calculated-fields-form' ); ?></th>
|
414 |
<td><input type="text" name="currency" value="<?php echo esc_attr( $form_obj->get_option( 'currency', CP_CALCULATEDFIELDSF_DEFAULT_CURRENCY ) ); ?>" /><br>
|
415 |
<b>USD</b> (<?php esc_html_e( 'United States dollar', 'calculated-fields-form' ); ?>), <b>EUR</b> (Euro), <b>GBP</b> (<?php esc_html_e( 'Pound sterling', 'calculated-fields-form' ); ?>), ... (<a href="https://developer.paypal.com/docs/api/reference/currency-codes/" target="_blank"><?php esc_html_e( 'PayPal Currency Codes', 'calculated-fields-form' ); ?></a>)
|
416 |
</td>
|
417 |
+
</tr>
|
418 |
|
419 |
<tr valign="top">
|
420 |
<th scope="row"><?php esc_html_e( 'Base amount', 'calculated-fields-form' ); ?>:</th>
|
421 |
<td><input type="text" name="paypal_base_amount" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_base_amount', '0.01' ) ); ?>" /><br><i style="font-size:11px;"><?php esc_html_e( 'Minimum amount to charge. If the final price is lesser than this number, the base amount will be applied.', 'calculated-fields-form' ); ?></i>
|
422 |
+
</td>
|
423 |
+
</tr>
|
424 |
|
425 |
+
<tr valign="top">
|
426 |
<th scope="row"><?php esc_html_e( 'Paypal product name', 'calculated-fields-form' ); ?></th>
|
427 |
<td><input type="text" name="paypal_product_name" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_product_name', CP_CALCULATEDFIELDSF_DEFAULT_PRODUCT_NAME ) ); ?>" /></td>
|
428 |
+
</tr>
|
429 |
|
430 |
+
<tr valign="top">
|
431 |
<th scope="row"><?php esc_html_e( 'Discount Codes', 'calculated-fields-form' ); ?></th>
|
432 |
+
<td>
|
433 |
<div id="dex_nocodes_availmsg"><?php esc_html_e( 'This feature isn\'t available in this version.', 'calculated-fields-form' ); ?></div>
|
434 |
|
435 |
+
<br />
|
436 |
<strong><?php esc_html_e( 'Add new discount code', 'calculated-fields-form' ); ?>:</strong>
|
437 |
+
<br />
|
438 |
<nobr><?php esc_html_e( 'Code', 'calculated-fields-form' ); ?>: <input type="text" name="dex_dc_code" id="dex_dc_code" value="" /></nobr>
|
439 |
<nobr><?php esc_html_e( 'Discount', 'calculated-fields-form' ); ?>: <input type="text" size="3" name="dex_dc_discount" id="dex_dc_discount" value="25" /><select name="dex_dc_discounttype" id="dex_dc_discounttype">
|
440 |
<option value="0"><?php esc_html_e( 'Percent', 'calculated-fields-form' ); ?></option>
|
441 |
<option value="1"><?php esc_html_e( 'Fixed Value', 'calculated-fields-form' ); ?></option>
|
442 |
+
</select></nobr>
|
443 |
+
|
444 |
<nobr><?php esc_html_e( 'Valid until', 'calculated-fields-form' ); ?>: <input type="text" size="10" name="dex_dc_expires" id="dex_dc_expires" value="" /></nobr>
|
445 |
<input type="button" name="dex_dc_subccode" id="dex_dc_subccode" value="<?php esc_attr_e( 'Add', 'calculated-fields-form' ); ?>" onclick="alert('This feature ins\'t available in this version');" class="button-secondary" />
|
446 |
+
<br />
|
447 |
<em style="font-size:11px;"><?php esc_html_e( 'Note: Expiration date based in server time. Server time now is', 'calculated-fields-form' ); ?> <?php echo esc_html( gmdate( 'Y-m-d H:i' ) ); ?></em>
|
448 |
+
</td>
|
449 |
+
</tr>
|
450 |
+
</table>
|
451 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
452 |
</div>
|
453 |
</div>
|
456 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Paypal Payment Configuration', 'calculated-fields-form' ); ?></span></h3>
|
457 |
<div class="inside">
|
458 |
|
459 |
+
<table class="form-table">
|
460 |
+
<tr valign="top">
|
461 |
<th scope="row"><?php esc_html_e( 'Enable Paypal Payments?', 'calculated-fields-form' ); ?></th>
|
462 |
+
<td><select name="enable_paypal">
|
463 |
<option value="0"><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
464 |
+
</select>
|
465 |
<br /><i style="font-size:11px;"><?php esc_html_e( 'Note: If "Optional" is selected, a radiobutton will appear in the form to select if the payment will be made with PayPal or not.', 'calculated-fields-form' ); ?></i>
|
466 |
+
<div id="cff_paypal_options_label" style="margin-top:10px;background:#EEF5FB;border: 1px dotted #888888;padding:10px;width:260px;">
|
467 |
<?php _e( 'Label for the "<strong>Pay with PayPal</strong>" option', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>:<br />
|
468 |
+
<input type="text" size="40" style="width:250px;" />
|
469 |
+
</div></td>
|
470 |
+
</tr>
|
471 |
|
472 |
+
<tr valign="top">
|
473 |
<th scope="row"><?php esc_html_e( 'Paypal Mode', 'calculated-fields-form' ); ?></th>
|
474 |
+
<td><select name="paypal_mode" class="width75">
|
475 |
<option value="production" <?php if ( 'sandbox' != $form_obj->get_option( 'paypal_mode', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_MODE ) ) {
|
476 |
echo 'selected';} ?>><?php esc_html_e( 'Production - real payments processed', 'calculated-fields-form' ); ?></option>
|
477 |
<option value="sandbox" <?php if ( 'sandbox' == $form_obj->get_option( 'paypal_mode', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_MODE ) ) {
|
478 |
echo 'selected';} ?>><?php esc_html_e( 'SandBox - PayPal testing sandbox area', 'calculated-fields-form' ); ?></option>
|
479 |
+
</select>
|
480 |
+
</td>
|
481 |
+
</tr>
|
482 |
|
483 |
+
<tr valign="top">
|
484 |
<th scope="row"><?php esc_html_e( 'Paypal email', 'calculated-fields-form' ); ?></th>
|
485 |
<td><input type="text" name="paypal_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_email', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_EMAIL ) ); ?>" /></td>
|
486 |
+
</tr>
|
487 |
|
488 |
+
<tr valign="top">
|
489 |
<th scope="row"><?php esc_html_e( 'A $0 amount to pay means', 'calculated-fields-form' ); ?>:</th>
|
490 |
+
<td><select name="paypal_zero_payment" class="width75">
|
491 |
<option value="0" <?php if ( '1' != $form_obj->get_option( 'paypal_zero_payment', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT ) ) {
|
492 |
echo 'selected';} ?>><?php esc_html_e( 'Let the user enter any amount at PayPal (ex: for a donation)', 'calculated-fields-form' ); ?></option>
|
493 |
<option value="1" <?php if ( $form_obj->get_option( 'paypal_zero_payment', '1' == CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_ZERO_PAYMENT ) ) {
|
494 |
echo 'selected';} ?>><?php esc_html_e( 'Don\'t require any payment. Form is submitted skiping the PayPal page.', 'calculated-fields-form' ); ?></option>
|
495 |
+
</select>
|
496 |
+
</td>
|
497 |
+
</tr>
|
498 |
|
499 |
+
<tr valign="top">
|
500 |
<th scope="row"><?php esc_html_e( 'Paypal language', 'calculated-fields-form' ); ?></th>
|
501 |
<td><input type="text" name="paypal_language" value="<?php echo esc_attr( $form_obj->get_option( 'paypal_language', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_LANGUAGE ) ); ?>" /></td>
|
502 |
+
</tr>
|
503 |
|
504 |
+
<tr valign="top">
|
505 |
<th scope="row"><?php esc_html_e( 'Payment frequency', 'calculated-fields-form' ); ?></th>
|
506 |
+
<td><select name="paypal_recurrent" class="width75">
|
507 |
<option value="0" <?php if ( '0' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT ) ||
|
508 |
'' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT )
|
509 |
) {
|
516 |
echo 'selected';} ?>><?php esc_html_e( 'Bill the user every 6 months', 'calculated-fields-form' ); ?></option>
|
517 |
<option value="12" <?php if ( '12' == $form_obj->get_option( 'paypal_recurrent', CP_CALCULATEDFIELDSF_DEFAULT_PAYPAL_RECURRENT ) ) {
|
518 |
echo 'selected';} ?>><?php esc_html_e( 'Bill the user every 12 months', 'calculated-fields-form' ); ?></option>
|
519 |
+
</select>
|
520 |
+
</td>
|
521 |
+
</tr>
|
522 |
<tr valign="top">
|
523 |
<th scope="row"><?php esc_html_e( 'Paypal prompt buyers for shipping address', 'calculated-fields-form' ); ?></th>
|
524 |
+
<td>
|
525 |
<?php $paypal_address = $form_obj->get_option( 'paypal_address', 1 ); ?>
|
526 |
<select name="paypal_address" class="width75">
|
527 |
<option value="1" <?php if ( 1 == $paypal_address ) {
|
532 |
print 'SELECTED';} ?>><?php esc_html_e( 'Prompt for an address and require one', 'calculated-fields-form' ); ?></option>
|
533 |
</select>
|
534 |
</td>
|
535 |
+
</tr>
|
536 |
+
</table>
|
537 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
538 |
</div>
|
539 |
</div>
|
541 |
<div id="metabox_notification_email" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_notification_email' ) ); ?>" >
|
542 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Form Processing / Email Settings', 'calculated-fields-form' ); ?></span></h3>
|
543 |
<div class="inside">
|
544 |
+
<table class="form-table">
|
545 |
+
<tr valign="top">
|
546 |
<th scope="row"><?php esc_html_e( '"From" email', 'calculated-fields-form' ); ?></th>
|
547 |
<td><input type="text" name="fp_from_email" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_from_email', CP_CALCULATEDFIELDSF_DEFAULT_fp_from_email ) ); ?>" /><br><b><em style="font-size:11px;">Ex: admin@<?php echo esc_html( isset( $_SERVER['HTTP_HOST'] ) ? str_replace( 'www.', '', sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) ) : '' ); ?></em></b><br><em style="font-size:11px;"><?php esc_html_e( 'This email is required if the "From fixed email address" option is selected, or it is enabled the email copy to the user.', 'calculated-fields-form' ); ?></em></td>
|
548 |
+
</tr>
|
549 |
+
<tr valign="top">
|
550 |
<th scope="row"><?php esc_html_e( 'Destination emails (comma separated)', 'calculated-fields-form' ); ?></th>
|
551 |
<td><input type="text" name="fp_destination_emails" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_destination_emails', CP_CALCULATEDFIELDSF_DEFAULT_fp_destination_emails ) ); ?>" /></td>
|
552 |
+
</tr>
|
553 |
+
<tr valign="top">
|
554 |
<th scope="row"><?php esc_html_e( 'Email subject', 'calculated-fields-form' ); ?></th>
|
555 |
<td><input type="text" name="fp_subject" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_subject', CP_CALCULATEDFIELDSF_DEFAULT_fp_subject ) ); ?>" /></td>
|
556 |
+
</tr>
|
557 |
+
<tr valign="top">
|
558 |
<th scope="row"><?php esc_html_e( 'Include additional information?', 'calculated-fields-form' ); ?></th>
|
559 |
+
<td>
|
560 |
<?php $option = $form_obj->get_option( 'fp_inc_additional_info', CP_CALCULATEDFIELDSF_DEFAULT_fp_inc_additional_info ); ?>
|
561 |
+
<select name="fp_inc_additional_info">
|
562 |
<option value="true"<?php if ( 'true' == $option ) {
|
563 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
564 |
<option value="false"<?php if ( 'false' == $option ) {
|
565 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
566 |
</select> <em style="font-size:11px;"><?php esc_html_e( 'If the "No" option is selected the plugin won\'t capture the IP address of users.', 'calculated-fields-form' ); ?></em>
|
567 |
+
</td>
|
568 |
+
</tr>
|
569 |
+
<tr valign="top">
|
570 |
<th scope="row"><?php esc_html_e( 'Thank you page (after sending the message)', 'calculated-fields-form' ); ?></th>
|
571 |
<td><input type="text" name="fp_return_page" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'fp_return_page', CP_CALCULATEDFIELDSF_DEFAULT_fp_return_page ) ); ?>" /></td>
|
572 |
+
</tr>
|
573 |
+
<tr valign="top">
|
574 |
<th scope="row"><?php esc_html_e( 'Email format?', 'calculated-fields-form' ); ?></th>
|
575 |
+
<td>
|
576 |
<?php $option = $form_obj->get_option( 'fp_emailformat', CP_CALCULATEDFIELDSF_DEFAULT_email_format ); ?>
|
577 |
+
<select name="fp_emailformat" class="width75">
|
578 |
<option value="text"<?php if ( 'html' != $option ) {
|
579 |
echo ' selected';} ?>><?php esc_html_e( 'Plain Text (default)', 'calculated-fields-form' ); ?></option>
|
580 |
<option value="html"<?php if ( 'html' == $option ) {
|
581 |
echo ' selected';} ?>><?php esc_html_e( 'HTML (use html in the textarea below)', 'calculated-fields-form' ); ?></option>
|
582 |
+
</select>
|
583 |
+
</td>
|
584 |
+
</tr>
|
585 |
+
<tr valign="top">
|
586 |
<th scope="row"><?php esc_html_e( 'Message', 'calculated-fields-form' ); ?></th>
|
587 |
<td><textarea type="text" name="fp_message" rows="6" class="width75"><?php echo esc_textarea( $form_obj->get_option( 'fp_message', CP_CALCULATEDFIELDSF_DEFAULT_fp_message ) ); ?></textarea></td>
|
588 |
+
</tr>
|
589 |
+
</table>
|
590 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
591 |
</div>
|
592 |
</div>
|
595 |
<div id="metabox_email_copy_to_user" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_email_copy_to_user' ) ); ?>" >
|
596 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Email Copy to User', 'calculated-fields-form' ); ?></span></h3>
|
597 |
<div class="inside">
|
598 |
+
<table class="form-table">
|
599 |
+
<tr valign="top">
|
600 |
<th scope="row"><?php esc_html_e( 'Send confirmation/thank you message to user?', 'calculated-fields-form' ); ?></th>
|
601 |
+
<td>
|
602 |
<?php $option = $form_obj->get_option( 'cu_enable_copy_to_user', CP_CALCULATEDFIELDSF_DEFAULT_cu_enable_copy_to_user ); ?>
|
603 |
+
<select name="cu_enable_copy_to_user">
|
604 |
<option value="true"<?php if ( 'true' == $option ) {
|
605 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
606 |
<option value="false"<?php if ( 'false' == $option ) {
|
607 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
608 |
+
</select>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
<tr valign="top">
|
612 |
<th scope="row"><?php esc_html_e( 'Email field on the form', 'calculated-fields-form' ); ?></th>
|
613 |
<td><select id="cu_user_email_field" name="cu_user_email_field" def="<?php echo esc_attr( $form_obj->get_option( 'cu_user_email_field', CP_CALCULATEDFIELDSF_DEFAULT_cu_user_email_field ) ); ?>" class="width75"></select></td>
|
614 |
+
</tr>
|
615 |
+
<tr valign="top">
|
616 |
<th scope="row"><?php esc_html_e( 'Email subject', 'calculated-fields-form' ); ?></th>
|
617 |
<td><input type="text" name="cu_subject" class="width75" value="<?php echo esc_attr( $form_obj->get_option( 'cu_subject', CP_CALCULATEDFIELDSF_DEFAULT_cu_subject ) ); ?>" /></td>
|
618 |
+
</tr>
|
619 |
+
<tr valign="top">
|
620 |
<th scope="row"><?php esc_html_e( 'Email format?', 'calculated-fields-form' ); ?></th>
|
621 |
+
<td>
|
622 |
<?php $option = $form_obj->get_option( 'cu_emailformat', CP_CALCULATEDFIELDSF_DEFAULT_email_format ); ?>
|
623 |
+
<select name="cu_emailformat" class="width75">
|
624 |
<option value="text"<?php if ( 'html' != $option ) {
|
625 |
echo ' selected';} ?>><?php esc_html_e( 'Plain Text (default)', 'calculated-fields-form' ); ?></option>
|
626 |
<option value="html"<?php if ( 'html' == $option ) {
|
627 |
echo ' selected';} ?>><?php esc_html_e( 'HTML (use html in the textarea below)', 'calculated-fields-form' ); ?></option>
|
628 |
+
</select>
|
629 |
+
</td>
|
630 |
+
</tr>
|
631 |
+
<tr valign="top">
|
632 |
<th scope="row"><?php esc_html_e( 'Message', 'calculated-fields-form' ); ?></th>
|
633 |
<td><textarea type="text" name="cu_message" rows="6" class="width75"><?php echo esc_textarea( $form_obj->get_option( 'cu_message', CP_CALCULATEDFIELDSF_DEFAULT_cu_message ) ); ?></textarea></td>
|
634 |
+
</tr>
|
635 |
+
</table>
|
636 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
637 |
</div>
|
638 |
</div>
|
640 |
<div id="metabox_captcha_settings" class="postbox metabox_disabled_section cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_captcha_settings' ) ); ?>" >
|
641 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Captcha Verification', 'calculated-fields-form' ); ?></span></h3>
|
642 |
<div class="inside">
|
643 |
+
<table class="form-table">
|
644 |
+
<tr valign="top">
|
645 |
<th scope="row"><?php esc_html_e( 'Use Captcha Verification?', 'calculated-fields-form' ); ?></th>
|
646 |
+
<td colspan="5">
|
647 |
<?php $option = $form_obj->get_option( 'cv_enable_captcha', CP_CALCULATEDFIELDSF_DEFAULT_cv_enable_captcha ); ?>
|
648 |
+
<select name="cv_enable_captcha">
|
649 |
<option value="true"<?php if ( 'true' == $option ) {
|
650 |
echo ' selected';} ?>><?php esc_html_e( 'Yes', 'calculated-fields-form' ); ?></option>
|
651 |
<option value="false"<?php if ( 'false' == $option ) {
|
652 |
echo ' selected';} ?>><?php esc_html_e( 'No', 'calculated-fields-form' ); ?></option>
|
653 |
+
</select>
|
654 |
+
</td>
|
655 |
+
</tr>
|
656 |
|
657 |
+
<tr valign="top">
|
658 |
<th scope="row"><?php esc_html_e( 'Width', 'calculated-fields-form' ); ?>:</th>
|
659 |
<td><input type="text" readonly=readonly name="cv_width" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_width', CP_CALCULATEDFIELDSF_DEFAULT_cv_width ) ); ?>" onblur="generateCaptcha();" /></td>
|
660 |
<th scope="row"><?php esc_html_e( 'Height', 'calculated-fields-form' ); ?>:</th>
|
661 |
<td><input type="text" readonly=readonly name="cv_height" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_height', CP_CALCULATEDFIELDSF_DEFAULT_cv_height ) ); ?>" onblur="generateCaptcha();" /></td>
|
662 |
<th scope="row"><?php esc_html_e( 'Chars', 'calculated-fields-form' ); ?>:</th>
|
663 |
<td><input type="text" readonly=readonly name="cv_chars" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_chars', CP_CALCULATEDFIELDSF_DEFAULT_cv_chars ) ); ?>" onblur="generateCaptcha();" /></td>
|
664 |
+
</tr>
|
665 |
|
666 |
+
<tr valign="top">
|
667 |
<th scope="row"><?php esc_html_e( 'Min font size', 'calculated-fields-form' ); ?>:</th>
|
668 |
<td><input type="text" readonly=readonly name="cv_min_font_size" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_min_font_size', CP_CALCULATEDFIELDSF_DEFAULT_cv_min_font_size ) ); ?>" onblur="generateCaptcha();" /></td>
|
669 |
<th scope="row"><?php esc_html_e( 'Max font size', 'calculated-fields-form' ); ?>:</th>
|
670 |
<td><input type="text" readonly=readonly name="cv_max_font_size" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_max_font_size', CP_CALCULATEDFIELDSF_DEFAULT_cv_max_font_size ) ); ?>" onblur="generateCaptcha();" /></td>
|
671 |
+
<td colspan="2" rowspan="">
|
672 |
<?php esc_html_e( 'Preview', 'calculated-fields-form' ); ?>:<br />
|
673 |
+
<br />
|
674 |
<img src="<?php echo esc_url( plugins_url( '/captcha/captcha.php', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) ); ?>" id="captchaimg" alt="<?php esc_attr_e( 'security code', 'calculated-fields-form' ); ?>" border="0" class="skip-lazy" />
|
675 |
+
</td>
|
676 |
+
</tr>
|
677 |
|
678 |
|
679 |
+
<tr valign="top">
|
680 |
<th scope="row"><?php esc_html_e( 'Noise', 'calculated-fields-form' ); ?>:</th>
|
681 |
<td><input type="text" readonly=readonly name="cv_noise" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_noise', CP_CALCULATEDFIELDSF_DEFAULT_cv_noise ) ); ?>" onblur="generateCaptcha();" /></td>
|
682 |
<th scope="row"><?php esc_html_e( 'Noise Length', 'calculated-fields-form' ); ?>:</th>
|
683 |
<td><input type="text" readonly=readonly name="cv_noise_length" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_noise_length', CP_CALCULATEDFIELDSF_DEFAULT_cv_noise_length ) ); ?>" onblur="generateCaptcha();" /></td>
|
684 |
+
</tr>
|
685 |
|
686 |
+
<tr valign="top">
|
687 |
<th scope="row"><?php esc_html_e( 'Background', 'calculated-fields-form' ); ?>:</th>
|
688 |
<td><input type="text" readonly=readonly name="cv_background" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_background', CP_CALCULATEDFIELDSF_DEFAULT_cv_background ) ); ?>" onblur="generateCaptcha();" /></td>
|
689 |
+
<th scope="row">Border:</th>
|
690 |
<td><input type="text" readonly=readonly name="cv_border" size="10" value="<?php echo esc_attr( $form_obj->get_option( 'cv_border', CP_CALCULATEDFIELDSF_DEFAULT_cv_border ) ); ?>" onblur="generateCaptcha();" /></td>
|
691 |
+
</tr>
|
692 |
|
693 |
+
<tr valign="top">
|
694 |
<th scope="row"><?php esc_html_e( 'Font', 'calculated-fields-form' ); ?>:</th>
|
695 |
+
<td>
|
696 |
+
<select name="cv_font" onchange="generateCaptcha();" >
|
697 |
<option value="font-1.ttf"<?php if ( 'font-1.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
698 |
echo ' selected';} ?>>Font 1</option>
|
699 |
<option value="font-2.ttf"<?php if ( 'font-2.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
702 |
echo ' selected';} ?>>Font 3</option>
|
703 |
<option value="font-4.ttf"<?php if ( 'font-4.ttf' == $form_obj->get_option( 'cv_font', CP_CALCULATEDFIELDSF_DEFAULT_cv_font ) ) {
|
704 |
echo ' selected';} ?>>Font 4</option>
|
705 |
+
</select>
|
706 |
+
</td>
|
707 |
+
</tr>
|
708 |
+
</table>
|
709 |
<div class="cff-goto-top"><a href="#cpformconf"><?php esc_html_e( 'Up to form structure', 'calculated-fields-form' ); ?></a></div>
|
710 |
</div>
|
711 |
</div>
|
inc/cpcff_admin_int_list.inc.php
CHANGED
@@ -137,11 +137,11 @@ if ( $message ) {
|
|
137 |
<div class="wrap">
|
138 |
<?php
|
139 |
if ( get_option( 'cff-t-f', 0 ) ) :
|
140 |
-
?>
|
141 |
-
<div style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;margin:10px 0;font-size:1.3em;">
|
142 |
<?php print get_option( 'cff-t-t', '' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
143 |
-
</div>
|
144 |
-
<?php
|
145 |
delete_option( 'cff-t-f' );
|
146 |
endif;
|
147 |
?>
|
@@ -151,10 +151,10 @@ endif;
|
|
151 |
var cff_metabox_nonce = '<?php print esc_js( wp_create_nonce( 'cff-metabox-status' ) ); ?>';
|
152 |
function cp_addItem()
|
153 |
{
|
154 |
-
var e = jQuery("#cp_itemname"),
|
155 |
form_tag = e.closest('form')[0],
|
156 |
calname = e.val().replace(/^\s*/, '').replace(/^\s*/, '').replace(/\s*$/, ''),
|
157 |
-
category = document.getElementById("calculated-fields-form-category").value;
|
158 |
|
159 |
e.val(calname);
|
160 |
|
@@ -165,13 +165,13 @@ endif;
|
|
165 |
|
166 |
function cp_addItem_keyup( e )
|
167 |
{
|
168 |
-
e.which = e.which || e.keyCode;
|
169 |
-
if(e.which == 13) cp_addItem();
|
170 |
}
|
171 |
|
172 |
function cp_updateItem(id)
|
173 |
{
|
174 |
-
var calname = document.getElementById("calname_"+id).value;
|
175 |
document.location = 'admin.php?page=cp_calculated_fields_form&u='+id+'&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-update-form' ) ); ?>';
|
176 |
}
|
177 |
|
@@ -187,27 +187,27 @@ endif;
|
|
187 |
|
188 |
function cp_viewMessages(id)
|
189 |
{
|
190 |
-
alert('Not available in this version. Check other versions at: '+"\n\n"+'https://cff.dwbooster.com/download');
|
191 |
}
|
192 |
|
193 |
function cp_BookingsList(id)
|
194 |
{
|
195 |
-
document.location = 'admin.php?page=cp_calculated_fields_form&cal='+id+'&list=1&r='+Math.random();
|
196 |
}
|
197 |
|
198 |
function cp_deleteItem(id)
|
199 |
{
|
200 |
if (confirm('<?php esc_html_e( 'Are you sure you want to delete this item?', 'calculated-fields-form' ); ?>'))
|
201 |
-
{
|
202 |
document.location = 'admin.php?page=cp_calculated_fields_form&d='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-delete-form' ) ); ?>';
|
203 |
-
}
|
204 |
}
|
205 |
|
206 |
function cp_updateConfig()
|
207 |
{
|
208 |
if (confirm('<?php esc_html_e( 'Are you sure you want to update these settings?', 'calculated-fields-form' ); ?>'))
|
209 |
-
{
|
210 |
-
var scr = document.getElementById("ccscriptload").value,
|
211 |
chs = document.getElementById("cccharsets").value,
|
212 |
dr = (document.getElementById("ccdisablerevisions").checked) ? 1 : 0,
|
213 |
jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
|
@@ -217,25 +217,25 @@ endif;
|
|
217 |
ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
|
218 |
|
219 |
document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&dr='+dr+'&jsc='+jsc+'&optm='+optm+'&df='+df+'&='+amp+'&r='+Math.random()+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-update-general-settings' ) ); ?>';
|
220 |
-
}
|
221 |
}
|
222 |
|
223 |
function cp_select_template()
|
224 |
{
|
225 |
-
jQuery('.cp_template_info').hide();
|
226 |
-
jQuery('.cp_template_'+jQuery('#cp_default_template').val()).show();
|
227 |
}
|
228 |
|
229 |
function cp_update_default_settings(e)
|
230 |
{
|
231 |
-
if(jQuery('[name="cp_default_existing_forms"]').prop('checked'))
|
232 |
-
{
|
233 |
if (confirm('<?php esc_html_e( 'Are you sure you want to modify existing forms?\\nWe recommend modifying the forms one by one.', 'calculated-fields-form' ); ?>'))
|
234 |
-
{
|
235 |
-
e.form.submit();
|
236 |
-
}
|
237 |
-
}
|
238 |
-
else e.form.submit();
|
239 |
}
|
240 |
</script>
|
241 |
<h2 class="nav-tab-wrapper">
|
@@ -245,12 +245,12 @@ endif;
|
|
245 |
print 'nav-tab-active';} ?>"><?php esc_html_e( 'Marketplace', 'calculated-fields-form' ); ?></a>
|
246 |
</h2>
|
247 |
<div style="margin-top:20px;display:<?php print ( empty( $_GET['cff-tab'] ) || 'forms' == $_GET['cff-tab'] ) ? 'block' : 'none'; ?>;"><!-- Forms & Settings Section -->
|
248 |
-
<div id="normal-sortables" class="meta-box-sortables">
|
249 |
|
250 |
-
<!-- Form Categories -->
|
251 |
-
<div id="metabox_categories_list" class="postbox" >
|
252 |
-
<div class="inside" style="overflow-x:auto;">
|
253 |
-
<form action="admin.php?page=cp_calculated_fields_form" method="post">
|
254 |
<?php
|
255 |
if ( isset( $_POST['calculated-fields-form-category'] ) ) {
|
256 |
check_admin_referer( 'cff-change-category', '_cpcff_nonce' );
|
@@ -260,18 +260,18 @@ endif;
|
|
260 |
?>
|
261 |
<input type="hidden" name="_cpcff_nonce" value="<?php echo esc_attr( wp_create_nonce( 'cff-change-category' ) ); ?>" />
|
262 |
<b><?php esc_html_e( 'Form Categories', 'calculated-fields-form' ); ?></b>
|
263 |
-
<select name="calculated-fields-form-category" class="width50" onchange="this.form.submit();">
|
264 |
<option value=""><?php esc_html_e( 'All forms', 'calculated-fields-form' ); ?></option>
|
265 |
<?php
|
266 |
print $cpcff_main->get_categories( 'SELECT', $cff_current_form_category ); // phpcs:ignore WordPress.Security.EscapeOutput
|
267 |
?>
|
268 |
-
</select>
|
269 |
-
</form>
|
270 |
-
</div>
|
271 |
-
</div>
|
272 |
|
273 |
-
<!-- Forms List -->
|
274 |
-
<div id="metabox_form_list" class="postbox" >
|
275 |
<h3 class='hndle' style="padding:5px;"><span><?php
|
276 |
esc_html_e( 'Form List / Items List', 'calculated-fields-form' );
|
277 |
|
@@ -279,48 +279,48 @@ endif;
|
|
279 |
print ' ' . esc_html__( 'in', 'calculated-fields-form' ) . ' <u>' . esc_html( $cff_current_form_category ) . '</u> ' . esc_html__( 'category', 'calculated-fields-form' );
|
280 |
}
|
281 |
?></span></h3>
|
282 |
-
<div class="inside" style="overflow-x:auto;">
|
283 |
-
<table cellspacing="10" class="cff-custom-table cff-forms-list">
|
284 |
-
<thead>
|
285 |
-
<tr>
|
286 |
<th align="left"><a href="?page=cp_calculated_fields_form&orderby=id" <?php if ( 'id' == $orderby ) {
|
287 |
print 'class="cff-active-column"';} ?>><?php esc_html_e( 'ID', 'calculated-fields-form' ); ?></a></th>
|
288 |
<th align="left"><a href="?page=cp_calculated_fields_form&orderby=form_name" <?php if ( 'form_name' == $orderby ) {
|
289 |
print 'class="cff-active-column"';} ?>><?php esc_html_e( 'Form Name', 'calculated-fields-form' ); ?></a></th>
|
290 |
<th align="center"><?php esc_html_e( 'Options', 'calculated-fields-form' ); ?></th>
|
291 |
<th align="left"><?php esc_html_e( 'Category/Shortcode', 'calculated-fields-form' ); ?></th>
|
292 |
-
</tr>
|
293 |
-
</thead>
|
294 |
-
<tbody>
|
295 |
<?php
|
296 |
$myrows = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . CP_CALCULATEDFIELDSF_FORMS_TABLE . ( '' != $cff_current_form_category ? $wpdb->prepare( ' WHERE category=%s ', $cff_current_form_category ) : '' ) . ' ORDER BY ' . $orderby . ' ASC' ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
297 |
foreach ( $myrows as $item ) {
|
298 |
?>
|
299 |
-
<tr>
|
300 |
<td nowrap><?php echo esc_html( $item->id ); ?></td>
|
301 |
<td nowrap><input type="text" name="calname_<?php echo esc_attr( $item->id ); ?>" id="calname_<?php echo esc_attr( $item->id ); ?>" value="<?php echo esc_attr( $item->form_name ); ?>" /></td>
|
302 |
-
<td nowrap>
|
303 |
<input type="button" name="calupdate_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Update', 'calculated-fields-form' ); ?>" onclick="cp_updateItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
304 |
<input type="button" name="calmanage_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Settings', 'calculated-fields-form' ); ?>" onclick="cp_manageSettings(<?php echo esc_attr( $item->id ); ?>);" class="button-primary" />
|
305 |
<input type="button" name="calmanage_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Messages', 'calculated-fields-form' ); ?>" onclick="cp_viewMessages(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
306 |
<input type="button" name="calclone_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Clone', 'calculated-fields-form' ); ?>" onclick="cp_cloneItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
307 |
<input type="button" name="caldelete_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Delete', 'calculated-fields-form' ); ?>" onclick="cp_deleteItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
308 |
-
</td>
|
309 |
<td><?php if ( ! empty( $item->category ) ) {
|
310 |
print esc_html__( 'Category: ', 'calculated-fields-form' ) . '<b>' . esc_html( $item->category ) . '</b><br>';} ?><div style="white-space:nowrap;">[CP_CALCULATED_FIELDS id="<?php echo esc_attr( $item->id ); ?>"]</div></td>
|
311 |
-
</tr>
|
312 |
<?php
|
313 |
}
|
314 |
?>
|
315 |
-
</tbody>
|
316 |
-
</table>
|
317 |
-
</div>
|
318 |
-
</div>
|
319 |
|
320 |
-
<div id="metabox_new_form_area" class="postbox" >
|
321 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'New Form', 'calculated-fields-form' ); ?></span></h3>
|
322 |
-
<div class="inside">
|
323 |
-
<form name="additem">
|
324 |
<?php esc_html_e( 'Item Name', 'calculated-fields-form' ); ?>(*):<br />
|
325 |
<div>
|
326 |
<input type="text" name="cp_itemname" id="cp_itemname" value="" onkeyup="cp_addItem_keyup( event );" style="margin-top:5px;" required />
|
@@ -332,16 +332,16 @@ endif;
|
|
332 |
</datalist>
|
333 |
<input type="button" onclick="cp_addItem();" name="gobtn" value="<?php esc_attr_e( 'Create Form', 'calculated-fields-form' ); ?>" class="button-secondary" style="margin-top:5px;" />
|
334 |
<input type="button" onclick="cff_openLibraryDialog();" name="gobtn" value="<?php esc_attr_e( 'From Template', 'calculated-fields-form' ); ?>" class="button-secondary" style="margin-top:5px;" />
|
335 |
-
</div>
|
336 |
-
</form>
|
337 |
-
</div>
|
338 |
-
</div>
|
339 |
-
<i id="default-settings-section"></i>
|
340 |
<div id="metabox_default_settings" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_default_settings' ) ); ?>" >
|
341 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Default Settings', 'calculated-fields-form' ); ?></span></h3>
|
342 |
-
<div class="inside">
|
343 |
<p><?php esc_html_e( 'Applies the default settings to new forms.', 'calculated-fields-form' ); ?></p>
|
344 |
-
<form name="defaultsettings" action="admin.php?page=cp_calculated_fields_form" method="post">
|
345 |
<?php esc_html_e( 'Default Template', 'calculated-fields-form' ); ?>:<br />
|
346 |
<?php
|
347 |
require_once CP_CALCULATEDFIELDSF_BASE_PATH . '/inc/cpcff_templates.inc.php';
|
@@ -355,44 +355,44 @@ endif;
|
|
355 |
?>
|
356 |
<select name="cp_default_template" id="cp_default_template"class="width50" onchange="cp_select_template();"><?php print $template_options; // phpcs:ignore WordPress.Security.EscapeOutput ?></select><br />
|
357 |
<?php print $template_information; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
358 |
-
<br /><br />
|
359 |
-
<div style="border:1px solid #DADADA; padding:10px;" class="width50">
|
360 |
<input type="checkbox" aria-label="<?php esc_attr_e( 'Apply To Existing Forms', 'calculated-fields-form' ); ?>" name="cp_default_existing_forms" /> <?php esc_html_e( 'Apply To Existing Forms', 'calculated-fields-form' ); ?> (<i><?php esc_html_e( 'It will modify the settings of existing forms', 'calculated-fields-form' ); ?></i>)
|
361 |
-
</div>
|
362 |
-
<br />
|
363 |
<input type="button" name="cp_save_default_settings" value="<?php esc_attr_e( 'Update', 'calculated-fields-form' ); ?>" class="button-secondary" onclick="cp_update_default_settings(this);" />
|
364 |
<input type="hidden" name="_cpcff_nonce" value="<?php echo esc_attr( wp_create_nonce( 'cff-default-settings' ) ); ?>" />
|
365 |
-
</form>
|
366 |
-
</div>
|
367 |
-
</div>
|
368 |
-
<div style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;margin:10px 0;font-size:1.3em;">
|
369 |
<div><?php esc_html_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 esc_html_e( 'Marketplace', 'calculated-fields-form' ); ?></a></div>
|
370 |
-
<div class="cff-bundles-plugin"></div>
|
371 |
-
</div>
|
372 |
<div id="metabox_troubleshoot_area" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_troubleshoot_area' ) ); ?>" >
|
373 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
|
374 |
-
<div class="inside">
|
375 |
-
<form name="updatesettings">
|
376 |
-
<div style="border:1px solid #DADADA; padding:10px;">
|
377 |
<p><?php _e( '<strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins, with the theme scripts or with the character encoding.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
|
378 |
<?php esc_html_e( 'Script load method', 'calculated-fields-form' ); ?>:<br />
|
379 |
-
<select id="ccscriptload" name="ccscriptload" class="width50">
|
380 |
<option value="0" <?php if ( get_option( 'CP_CFF_LOAD_SCRIPTS', '0' ) == '1' ) {
|
381 |
echo 'selected';} ?>><?php esc_html_e( 'Classic (Recommended)', 'calculated-fields-form' ); ?></option>
|
382 |
<option value="1" <?php if ( get_option( 'CP_CFF_LOAD_SCRIPTS', '0' ) != '1' ) {
|
383 |
echo 'selected';} ?>><?php esc_html_e( 'Direct', 'calculated-fields-form' ); ?></option>
|
384 |
-
</select><br />
|
385 |
<em><?php esc_html_e( '* Change the script load method if the form doesn\'t appear in the public website.', 'calculated-fields-form' ); ?></em>
|
386 |
-
<br /><br />
|
387 |
<?php esc_html_e( 'Character encoding', 'calculated-fields-form' ); ?>:<br />
|
388 |
-
<select id="cccharsets" name="cccharsets" class="width50">
|
389 |
<option value=""><?php esc_html_e( 'Keep current charset (Recommended)', 'calculated-fields-form' ); ?></option>
|
390 |
<option value="utf8_general_ci">UTF-8 (<?php esc_html_e( 'try this first', 'calculated-fields-form' ); ?>)</option>
|
391 |
<option value="utf8mb4_general_ci">UTF-8mb4 (<?php esc_html_e( 'Only from MySQL 5.5', 'calculated-fields-form' ); ?>)</option>
|
392 |
-
<option value="latin1_swedish_ci">latin1_swedish_ci</option>
|
393 |
-
</select><br />
|
394 |
<em><?php esc_html_e( '* Update the charset if you are getting problems displaying special/non-latin characters. After updated you need to edit the special characters again.', 'calculated-fields-form' ); ?></em>
|
395 |
-
<br /><br />
|
396 |
<?php
|
397 |
$compatibility_warnings = $cpcff_main->compatibility_warnings();
|
398 |
if ( ! empty( $compatibility_warnings ) ) {
|
@@ -405,33 +405,33 @@ endif;
|
|
405 |
print '</div>';
|
406 |
}
|
407 |
?>
|
408 |
-
</div>
|
409 |
-
<br />
|
410 |
<input type="checkbox" name="ccdisablerevisions" id="ccdisablerevisions" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_DISABLE_REVISIONS', CP_CALCULATEDFIELDSF_DISABLE_REVISIONS ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Disable Form Revisions', 'calculated-fields-form' ); ?>
|
411 |
-
<br /><br />
|
412 |
<input type="checkbox" name="ccjscache" id="ccjscache" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Activate Javascript Cache', 'calculated-fields-form' ); ?>
|
413 |
-
<br /><br />
|
414 |
<input type="checkbox" name="ccdirectform" id="ccdirectform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Allows to access the forms directly', 'calculated-fields-form' ); ?>
|
415 |
-
<br /><br />
|
416 |
<input type="checkbox" name="ccampform" id="ccampform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_AMP', CP_CALCULATEDFIELDSF_AMP ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Allows to access the forms from amp pages', 'calculated-fields-form' ); ?>
|
417 |
-
<br /><br />
|
418 |
<input type="checkbox" name="ccexcludecrawler" id="ccexcludecrawler" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', false ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Do not load the forms with crawlers', 'calculated-fields-form' ); ?>
|
419 |
<br /><i><?php esc_html_e( '* The forms are not loaded when website is being indexed by searchers.', 'calculated-fields-form' ); ?></i>
|
420 |
-
<br /><br />
|
421 |
<input type="button" onclick="cp_updateConfig();" name="gobtn" value="<?php esc_attr_e( 'UPDATE', 'calculated-fields-form' ); ?>" class="button-secondary" />
|
422 |
-
<br />
|
423 |
-
</form>
|
424 |
-
</div>
|
425 |
-
</div>
|
426 |
-
</div>
|
427 |
</div><!-- End Forms & Settings Section -->
|
428 |
<div style="margin-top:20px;display:<?php print ( ! empty( $_GET['cff-tab'] ) && 'marketplace' == $_GET['cff-tab'] ) ? 'block' : 'none'; ?>;"><!-- Marketplace Section -->
|
429 |
-
<div id="metabox_basic_settings" class="postbox" >
|
430 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Calculated Fields Form Marketplace', 'calculated-fields-form' ); ?></span></h3>
|
431 |
-
<div class="inside">
|
432 |
-
<div class="cff-marketplace"></div>
|
433 |
-
</div>
|
434 |
-
</div>
|
435 |
</div><!-- End Marketplace Section -->
|
436 |
[<a href="https://cff.dwbooster.com/customization" target="_blank"><?php esc_html_e( 'Request Custom Modifications', 'calculated-fields-form' ); ?></a>] | [<a href="https://cff.dwbooster.com/download" target="_blank"><?php esc_html_e( 'Upgrade', 'calculated-fields-form' ); ?></a>] | [<a href="https://wordpress.org/support/plugin/calculated-fields-form#new-post" target="_blank"><?php esc_html_e( 'Help', 'calculated-fields-form' ); ?></a>]
|
437 |
</div>
|
137 |
<div class="wrap">
|
138 |
<?php
|
139 |
if ( get_option( 'cff-t-f', 0 ) ) :
|
140 |
+
?>
|
141 |
+
<div style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;margin:10px 0;font-size:1.3em;">
|
142 |
<?php print get_option( 'cff-t-t', '' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
143 |
+
</div>
|
144 |
+
<?php
|
145 |
delete_option( 'cff-t-f' );
|
146 |
endif;
|
147 |
?>
|
151 |
var cff_metabox_nonce = '<?php print esc_js( wp_create_nonce( 'cff-metabox-status' ) ); ?>';
|
152 |
function cp_addItem()
|
153 |
{
|
154 |
+
var e = jQuery("#cp_itemname"),
|
155 |
form_tag = e.closest('form')[0],
|
156 |
calname = e.val().replace(/^\s*/, '').replace(/^\s*/, '').replace(/\s*$/, ''),
|
157 |
+
category = document.getElementById("calculated-fields-form-category").value;
|
158 |
|
159 |
e.val(calname);
|
160 |
|
165 |
|
166 |
function cp_addItem_keyup( e )
|
167 |
{
|
168 |
+
e.which = e.which || e.keyCode;
|
169 |
+
if(e.which == 13) cp_addItem();
|
170 |
}
|
171 |
|
172 |
function cp_updateItem(id)
|
173 |
{
|
174 |
+
var calname = document.getElementById("calname_"+id).value;
|
175 |
document.location = 'admin.php?page=cp_calculated_fields_form&u='+id+'&r='+Math.random()+'&name='+encodeURIComponent(calname)+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-update-form' ) ); ?>';
|
176 |
}
|
177 |
|
187 |
|
188 |
function cp_viewMessages(id)
|
189 |
{
|
190 |
+
alert('Not available in this version. Check other versions at: '+"\n\n"+'https://cff.dwbooster.com/download');
|
191 |
}
|
192 |
|
193 |
function cp_BookingsList(id)
|
194 |
{
|
195 |
+
document.location = 'admin.php?page=cp_calculated_fields_form&cal='+id+'&list=1&r='+Math.random();
|
196 |
}
|
197 |
|
198 |
function cp_deleteItem(id)
|
199 |
{
|
200 |
if (confirm('<?php esc_html_e( 'Are you sure you want to delete this item?', 'calculated-fields-form' ); ?>'))
|
201 |
+
{
|
202 |
document.location = 'admin.php?page=cp_calculated_fields_form&d='+id+'&r='+Math.random()+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-delete-form' ) ); ?>';
|
203 |
+
}
|
204 |
}
|
205 |
|
206 |
function cp_updateConfig()
|
207 |
{
|
208 |
if (confirm('<?php esc_html_e( 'Are you sure you want to update these settings?', 'calculated-fields-form' ); ?>'))
|
209 |
+
{
|
210 |
+
var scr = document.getElementById("ccscriptload").value,
|
211 |
chs = document.getElementById("cccharsets").value,
|
212 |
dr = (document.getElementById("ccdisablerevisions").checked) ? 1 : 0,
|
213 |
jsc = (document.getElementById("ccjscache").checked) ? 1 : 0,
|
217 |
ecr = (document.getElementById("ccexcludecrawler").checked) ? 1 : 0;
|
218 |
|
219 |
document.location = 'admin.php?page=cp_calculated_fields_form&ecr='+ecr+'&ac=st&scr='+scr+'&chs='+chs+'&dr='+dr+'&jsc='+jsc+'&optm='+optm+'&df='+df+'&='+amp+'&r='+Math.random()+'&_cpcff_nonce=<?php echo esc_js( wp_create_nonce( 'cff-update-general-settings' ) ); ?>';
|
220 |
+
}
|
221 |
}
|
222 |
|
223 |
function cp_select_template()
|
224 |
{
|
225 |
+
jQuery('.cp_template_info').hide();
|
226 |
+
jQuery('.cp_template_'+jQuery('#cp_default_template').val()).show();
|
227 |
}
|
228 |
|
229 |
function cp_update_default_settings(e)
|
230 |
{
|
231 |
+
if(jQuery('[name="cp_default_existing_forms"]').prop('checked'))
|
232 |
+
{
|
233 |
if (confirm('<?php esc_html_e( 'Are you sure you want to modify existing forms?\\nWe recommend modifying the forms one by one.', 'calculated-fields-form' ); ?>'))
|
234 |
+
{
|
235 |
+
e.form.submit();
|
236 |
+
}
|
237 |
+
}
|
238 |
+
else e.form.submit();
|
239 |
}
|
240 |
</script>
|
241 |
<h2 class="nav-tab-wrapper">
|
245 |
print 'nav-tab-active';} ?>"><?php esc_html_e( 'Marketplace', 'calculated-fields-form' ); ?></a>
|
246 |
</h2>
|
247 |
<div style="margin-top:20px;display:<?php print ( empty( $_GET['cff-tab'] ) || 'forms' == $_GET['cff-tab'] ) ? 'block' : 'none'; ?>;"><!-- Forms & Settings Section -->
|
248 |
+
<div id="normal-sortables" class="meta-box-sortables">
|
249 |
|
250 |
+
<!-- Form Categories -->
|
251 |
+
<div id="metabox_categories_list" class="postbox" >
|
252 |
+
<div class="inside" style="overflow-x:auto;">
|
253 |
+
<form action="admin.php?page=cp_calculated_fields_form" method="post">
|
254 |
<?php
|
255 |
if ( isset( $_POST['calculated-fields-form-category'] ) ) {
|
256 |
check_admin_referer( 'cff-change-category', '_cpcff_nonce' );
|
260 |
?>
|
261 |
<input type="hidden" name="_cpcff_nonce" value="<?php echo esc_attr( wp_create_nonce( 'cff-change-category' ) ); ?>" />
|
262 |
<b><?php esc_html_e( 'Form Categories', 'calculated-fields-form' ); ?></b>
|
263 |
+
<select name="calculated-fields-form-category" class="width50" onchange="this.form.submit();">
|
264 |
<option value=""><?php esc_html_e( 'All forms', 'calculated-fields-form' ); ?></option>
|
265 |
<?php
|
266 |
print $cpcff_main->get_categories( 'SELECT', $cff_current_form_category ); // phpcs:ignore WordPress.Security.EscapeOutput
|
267 |
?>
|
268 |
+
</select>
|
269 |
+
</form>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
|
273 |
+
<!-- Forms List -->
|
274 |
+
<div id="metabox_form_list" class="postbox" >
|
275 |
<h3 class='hndle' style="padding:5px;"><span><?php
|
276 |
esc_html_e( 'Form List / Items List', 'calculated-fields-form' );
|
277 |
|
279 |
print ' ' . esc_html__( 'in', 'calculated-fields-form' ) . ' <u>' . esc_html( $cff_current_form_category ) . '</u> ' . esc_html__( 'category', 'calculated-fields-form' );
|
280 |
}
|
281 |
?></span></h3>
|
282 |
+
<div class="inside" style="overflow-x:auto;">
|
283 |
+
<table cellspacing="10" class="cff-custom-table cff-forms-list">
|
284 |
+
<thead>
|
285 |
+
<tr>
|
286 |
<th align="left"><a href="?page=cp_calculated_fields_form&orderby=id" <?php if ( 'id' == $orderby ) {
|
287 |
print 'class="cff-active-column"';} ?>><?php esc_html_e( 'ID', 'calculated-fields-form' ); ?></a></th>
|
288 |
<th align="left"><a href="?page=cp_calculated_fields_form&orderby=form_name" <?php if ( 'form_name' == $orderby ) {
|
289 |
print 'class="cff-active-column"';} ?>><?php esc_html_e( 'Form Name', 'calculated-fields-form' ); ?></a></th>
|
290 |
<th align="center"><?php esc_html_e( 'Options', 'calculated-fields-form' ); ?></th>
|
291 |
<th align="left"><?php esc_html_e( 'Category/Shortcode', 'calculated-fields-form' ); ?></th>
|
292 |
+
</tr>
|
293 |
+
</thead>
|
294 |
+
<tbody>
|
295 |
<?php
|
296 |
$myrows = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . CP_CALCULATEDFIELDSF_FORMS_TABLE . ( '' != $cff_current_form_category ? $wpdb->prepare( ' WHERE category=%s ', $cff_current_form_category ) : '' ) . ' ORDER BY ' . $orderby . ' ASC' ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
297 |
foreach ( $myrows as $item ) {
|
298 |
?>
|
299 |
+
<tr>
|
300 |
<td nowrap><?php echo esc_html( $item->id ); ?></td>
|
301 |
<td nowrap><input type="text" name="calname_<?php echo esc_attr( $item->id ); ?>" id="calname_<?php echo esc_attr( $item->id ); ?>" value="<?php echo esc_attr( $item->form_name ); ?>" /></td>
|
302 |
+
<td nowrap>
|
303 |
<input type="button" name="calupdate_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Update', 'calculated-fields-form' ); ?>" onclick="cp_updateItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
304 |
<input type="button" name="calmanage_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Settings', 'calculated-fields-form' ); ?>" onclick="cp_manageSettings(<?php echo esc_attr( $item->id ); ?>);" class="button-primary" />
|
305 |
<input type="button" name="calmanage_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Messages', 'calculated-fields-form' ); ?>" onclick="cp_viewMessages(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
306 |
<input type="button" name="calclone_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Clone', 'calculated-fields-form' ); ?>" onclick="cp_cloneItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
307 |
<input type="button" name="caldelete_<?php echo esc_attr( $item->id ); ?>" value="<?php esc_attr_e( 'Delete', 'calculated-fields-form' ); ?>" onclick="cp_deleteItem(<?php echo esc_attr( $item->id ); ?>);" class="button-secondary" />
|
308 |
+
</td>
|
309 |
<td><?php if ( ! empty( $item->category ) ) {
|
310 |
print esc_html__( 'Category: ', 'calculated-fields-form' ) . '<b>' . esc_html( $item->category ) . '</b><br>';} ?><div style="white-space:nowrap;">[CP_CALCULATED_FIELDS id="<?php echo esc_attr( $item->id ); ?>"]</div></td>
|
311 |
+
</tr>
|
312 |
<?php
|
313 |
}
|
314 |
?>
|
315 |
+
</tbody>
|
316 |
+
</table>
|
317 |
+
</div>
|
318 |
+
</div>
|
319 |
|
320 |
+
<div id="metabox_new_form_area" class="postbox" >
|
321 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'New Form', 'calculated-fields-form' ); ?></span></h3>
|
322 |
+
<div class="inside">
|
323 |
+
<form name="additem">
|
324 |
<?php esc_html_e( 'Item Name', 'calculated-fields-form' ); ?>(*):<br />
|
325 |
<div>
|
326 |
<input type="text" name="cp_itemname" id="cp_itemname" value="" onkeyup="cp_addItem_keyup( event );" style="margin-top:5px;" required />
|
332 |
</datalist>
|
333 |
<input type="button" onclick="cp_addItem();" name="gobtn" value="<?php esc_attr_e( 'Create Form', 'calculated-fields-form' ); ?>" class="button-secondary" style="margin-top:5px;" />
|
334 |
<input type="button" onclick="cff_openLibraryDialog();" name="gobtn" value="<?php esc_attr_e( 'From Template', 'calculated-fields-form' ); ?>" class="button-secondary" style="margin-top:5px;" />
|
335 |
+
</div>
|
336 |
+
</form>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
<i id="default-settings-section"></i>
|
340 |
<div id="metabox_default_settings" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_default_settings' ) ); ?>" >
|
341 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Default Settings', 'calculated-fields-form' ); ?></span></h3>
|
342 |
+
<div class="inside">
|
343 |
<p><?php esc_html_e( 'Applies the default settings to new forms.', 'calculated-fields-form' ); ?></p>
|
344 |
+
<form name="defaultsettings" action="admin.php?page=cp_calculated_fields_form" method="post">
|
345 |
<?php esc_html_e( 'Default Template', 'calculated-fields-form' ); ?>:<br />
|
346 |
<?php
|
347 |
require_once CP_CALCULATEDFIELDSF_BASE_PATH . '/inc/cpcff_templates.inc.php';
|
355 |
?>
|
356 |
<select name="cp_default_template" id="cp_default_template"class="width50" onchange="cp_select_template();"><?php print $template_options; // phpcs:ignore WordPress.Security.EscapeOutput ?></select><br />
|
357 |
<?php print $template_information; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
358 |
+
<br /><br />
|
359 |
+
<div style="border:1px solid #DADADA; padding:10px;" class="width50">
|
360 |
<input type="checkbox" aria-label="<?php esc_attr_e( 'Apply To Existing Forms', 'calculated-fields-form' ); ?>" name="cp_default_existing_forms" /> <?php esc_html_e( 'Apply To Existing Forms', 'calculated-fields-form' ); ?> (<i><?php esc_html_e( 'It will modify the settings of existing forms', 'calculated-fields-form' ); ?></i>)
|
361 |
+
</div>
|
362 |
+
<br />
|
363 |
<input type="button" name="cp_save_default_settings" value="<?php esc_attr_e( 'Update', 'calculated-fields-form' ); ?>" class="button-secondary" onclick="cp_update_default_settings(this);" />
|
364 |
<input type="hidden" name="_cpcff_nonce" value="<?php echo esc_attr( wp_create_nonce( 'cff-default-settings' ) ); ?>" />
|
365 |
+
</form>
|
366 |
+
</div>
|
367 |
+
</div>
|
368 |
+
<div style="border:1px solid #F0AD4E;background:#FBE6CA;padding:10px;margin:10px 0;font-size:1.3em;">
|
369 |
<div><?php esc_html_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 esc_html_e( 'Marketplace', 'calculated-fields-form' ); ?></a></div>
|
370 |
+
<div class="cff-bundles-plugin"></div>
|
371 |
+
</div>
|
372 |
<div id="metabox_troubleshoot_area" class="postbox cff-metabox <?php print esc_attr( $cpcff_main->metabox_status( 'metabox_troubleshoot_area' ) ); ?>" >
|
373 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Troubleshoot Area & General Settings', 'calculated-fields-form' ); ?></span></h3>
|
374 |
+
<div class="inside">
|
375 |
+
<form name="updatesettings">
|
376 |
+
<div style="border:1px solid #DADADA; padding:10px;">
|
377 |
<p><?php _e( '<strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins, with the theme scripts or with the character encoding.', 'calculated-fields-form' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
|
378 |
<?php esc_html_e( 'Script load method', 'calculated-fields-form' ); ?>:<br />
|
379 |
+
<select id="ccscriptload" name="ccscriptload" class="width50">
|
380 |
<option value="0" <?php if ( get_option( 'CP_CFF_LOAD_SCRIPTS', '0' ) == '1' ) {
|
381 |
echo 'selected';} ?>><?php esc_html_e( 'Classic (Recommended)', 'calculated-fields-form' ); ?></option>
|
382 |
<option value="1" <?php if ( get_option( 'CP_CFF_LOAD_SCRIPTS', '0' ) != '1' ) {
|
383 |
echo 'selected';} ?>><?php esc_html_e( 'Direct', 'calculated-fields-form' ); ?></option>
|
384 |
+
</select><br />
|
385 |
<em><?php esc_html_e( '* Change the script load method if the form doesn\'t appear in the public website.', 'calculated-fields-form' ); ?></em>
|
386 |
+
<br /><br />
|
387 |
<?php esc_html_e( 'Character encoding', 'calculated-fields-form' ); ?>:<br />
|
388 |
+
<select id="cccharsets" name="cccharsets" class="width50">
|
389 |
<option value=""><?php esc_html_e( 'Keep current charset (Recommended)', 'calculated-fields-form' ); ?></option>
|
390 |
<option value="utf8_general_ci">UTF-8 (<?php esc_html_e( 'try this first', 'calculated-fields-form' ); ?>)</option>
|
391 |
<option value="utf8mb4_general_ci">UTF-8mb4 (<?php esc_html_e( 'Only from MySQL 5.5', 'calculated-fields-form' ); ?>)</option>
|
392 |
+
<option value="latin1_swedish_ci">latin1_swedish_ci</option>
|
393 |
+
</select><br />
|
394 |
<em><?php esc_html_e( '* Update the charset if you are getting problems displaying special/non-latin characters. After updated you need to edit the special characters again.', 'calculated-fields-form' ); ?></em>
|
395 |
+
<br /><br />
|
396 |
<?php
|
397 |
$compatibility_warnings = $cpcff_main->compatibility_warnings();
|
398 |
if ( ! empty( $compatibility_warnings ) ) {
|
405 |
print '</div>';
|
406 |
}
|
407 |
?>
|
408 |
+
</div>
|
409 |
+
<br />
|
410 |
<input type="checkbox" name="ccdisablerevisions" id="ccdisablerevisions" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_DISABLE_REVISIONS', CP_CALCULATEDFIELDSF_DISABLE_REVISIONS ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Disable Form Revisions', 'calculated-fields-form' ); ?>
|
411 |
+
<br /><br />
|
412 |
<input type="checkbox" name="ccjscache" id="ccjscache" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_USE_CACHE', CP_CALCULATEDFIELDSF_USE_CACHE ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Activate Javascript Cache', 'calculated-fields-form' ); ?>
|
413 |
+
<br /><br />
|
414 |
<input type="checkbox" name="ccdirectform" id="ccdirectform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS', CP_CALCULATEDFIELDSF_DIRECT_FORM_ACCESS ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Allows to access the forms directly', 'calculated-fields-form' ); ?>
|
415 |
+
<br /><br />
|
416 |
<input type="checkbox" name="ccampform" id="ccampform" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_AMP', CP_CALCULATEDFIELDSF_AMP ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Allows to access the forms from amp pages', 'calculated-fields-form' ); ?>
|
417 |
+
<br /><br />
|
418 |
<input type="checkbox" name="ccexcludecrawler" id="ccexcludecrawler" <?php echo ( get_option( 'CP_CALCULATEDFIELDSF_EXCLUDE_CRAWLERS', false ) ) ? 'CHECKED' : ''; ?> /> <?php esc_html_e( 'Do not load the forms with crawlers', 'calculated-fields-form' ); ?>
|
419 |
<br /><i><?php esc_html_e( '* The forms are not loaded when website is being indexed by searchers.', 'calculated-fields-form' ); ?></i>
|
420 |
+
<br /><br />
|
421 |
<input type="button" onclick="cp_updateConfig();" name="gobtn" value="<?php esc_attr_e( 'UPDATE', 'calculated-fields-form' ); ?>" class="button-secondary" />
|
422 |
+
<br />
|
423 |
+
</form>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
</div>
|
427 |
</div><!-- End Forms & Settings Section -->
|
428 |
<div style="margin-top:20px;display:<?php print ( ! empty( $_GET['cff-tab'] ) && 'marketplace' == $_GET['cff-tab'] ) ? 'block' : 'none'; ?>;"><!-- Marketplace Section -->
|
429 |
+
<div id="metabox_basic_settings" class="postbox" >
|
430 |
<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Calculated Fields Form Marketplace', 'calculated-fields-form' ); ?></span></h3>
|
431 |
+
<div class="inside">
|
432 |
+
<div class="cff-marketplace"></div>
|
433 |
+
</div>
|
434 |
+
</div>
|
435 |
</div><!-- End Marketplace Section -->
|
436 |
[<a href="https://cff.dwbooster.com/customization" target="_blank"><?php esc_html_e( 'Request Custom Modifications', 'calculated-fields-form' ); ?></a>] | [<a href="https://cff.dwbooster.com/download" target="_blank"><?php esc_html_e( 'Upgrade', 'calculated-fields-form' ); ?></a>] | [<a href="https://wordpress.org/support/plugin/calculated-fields-form#new-post" target="_blank"><?php esc_html_e( 'Help', 'calculated-fields-form' ); ?></a>]
|
437 |
</div>
|
inc/cpcff_public_int.inc.php
CHANGED
@@ -46,7 +46,7 @@ if ( ! empty( $form_data ) ) {
|
|
46 |
}
|
47 |
}
|
48 |
$form_data[1]['formid'] = 'cp_calculatedfieldsf_pform_' . CPCFF_MAIN::$form_counter;
|
49 |
-
?>
|
50 |
<form name="<?php echo esc_attr( $form_data[1]['formid'] ); ?>" id="<?php echo esc_attr( $form_data[1]['formid'] ); ?>" action="?" method="post" enctype="multipart/form-data" class="cff-form <?php
|
51 |
if ( ! empty( $form_data[1][0] ) && ! empty( $form_data[1][0]->persistence ) ) {
|
52 |
echo ' persist-form';
|
@@ -71,10 +71,10 @@ if ( ! empty( $atts ) && ! empty( $atts['class'] ) ) {
|
|
71 |
<div id="fbuilder_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>">
|
72 |
<div id="formheader_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>"></div>
|
73 |
<div id="fieldlist_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>"></div>
|
74 |
-
<div class="clearer"></div>
|
75 |
</div>
|
76 |
</div>
|
77 |
<div class="clearer"></div>
|
78 |
</form>
|
79 |
-
<?php
|
80 |
}
|
46 |
}
|
47 |
}
|
48 |
$form_data[1]['formid'] = 'cp_calculatedfieldsf_pform_' . CPCFF_MAIN::$form_counter;
|
49 |
+
?>
|
50 |
<form name="<?php echo esc_attr( $form_data[1]['formid'] ); ?>" id="<?php echo esc_attr( $form_data[1]['formid'] ); ?>" action="?" method="post" enctype="multipart/form-data" class="cff-form <?php
|
51 |
if ( ! empty( $form_data[1][0] ) && ! empty( $form_data[1][0]->persistence ) ) {
|
52 |
echo ' persist-form';
|
71 |
<div id="fbuilder_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>">
|
72 |
<div id="formheader_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>"></div>
|
73 |
<div id="fieldlist_<?php echo esc_attr( CPCFF_MAIN::$form_counter ); ?>"></div>
|
74 |
+
<div class="clearer"></div>
|
75 |
</div>
|
76 |
</div>
|
77 |
<div class="clearer"></div>
|
78 |
</form>
|
79 |
+
<?php
|
80 |
}
|
js/fbuilder-loader-admin.php
CHANGED
@@ -64,11 +64,11 @@ try {
|
|
64 |
};
|
65 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
66 |
fbuilderjQuery(window).on('load',function(){
|
67 |
-
fbuilderjQuery.fbuilderjQueryGenerator();
|
68 |
-
if(!fbuilderjQuery('[href*="jquery-ui"]').length)
|
69 |
-
{
|
70 |
-
fbuilderjQuery('body').append(
|
71 |
'<link href="<?php print esc_attr( plugins_url( '/vendors/jquery-ui/jquery-ui.min.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) ); // phpcs:ignore WordPress.WP.EnqueuedResources ?>" type="text/css" rel="stylesheet" property="stylesheet" />'
|
72 |
-
);
|
73 |
-
}
|
74 |
});
|
64 |
};
|
65 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
66 |
fbuilderjQuery(window).on('load',function(){
|
67 |
+
fbuilderjQuery.fbuilderjQueryGenerator();
|
68 |
+
if(!fbuilderjQuery('[href*="jquery-ui"]').length)
|
69 |
+
{
|
70 |
+
fbuilderjQuery('body').append(
|
71 |
'<link href="<?php print esc_attr( plugins_url( '/vendors/jquery-ui/jquery-ui.min.css', CP_CALCULATEDFIELDSF_MAIN_FILE_PATH ) ); // phpcs:ignore WordPress.WP.EnqueuedResources ?>" type="text/css" rel="stylesheet" property="stylesheet" />'
|
72 |
+
);
|
73 |
+
}
|
74 |
});
|
js/fbuilder-loader-public.php
CHANGED
@@ -14,10 +14,10 @@ fbuilderjQuery(window).bind( 'pageshow', function( event ){ if( typeof event.ori
|
|
14 |
fbuilderjQuery.fbuilderjQueryGenerator = function(){
|
15 |
(function($) {
|
16 |
// Namespace of fbuilder
|
17 |
-
if(!('fbuilder' in $))
|
18 |
-
{
|
19 |
-
$.fbuilder = $.fbuilder || {};
|
20 |
-
$.fbuilder[ 'objName' ] = 'fbuilderjQuery';
|
21 |
|
22 |
<?php
|
23 |
// Load Module files
|
@@ -66,64 +66,64 @@ try {
|
|
66 |
error_log( $e->getMessage() );
|
67 |
}
|
68 |
?>
|
69 |
-
$.fbuilder.generate_form = function(fnum){
|
70 |
-
try {
|
71 |
-
var cp_calculatedfieldsf_fbuilder_config = window["cp_calculatedfieldsf_fbuilder_config"+fnum];
|
72 |
-
if(
|
73 |
-
cp_calculatedfieldsf_fbuilder_config &&
|
74 |
-
$("#fbuilder"+fnum).length &&
|
75 |
-
$("#fbuilder"+fnum).attr('data-processed') == undefined
|
76 |
-
)
|
77 |
-
{
|
78 |
-
if($("#fbuilder"+fnum).is(':visible'))
|
79 |
-
{
|
80 |
-
var f = $("#fbuilder"+fnum).fbuilder(( typeof cp_calculatedfieldsf_fbuilder_config.obj == 'string' ) ? $.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj) : cp_calculatedfieldsf_fbuilder_config.obj );
|
81 |
-
f.attr('data-processed', 1);
|
82 |
-
f.fBuild.loadData("form_structure"+fnum);
|
83 |
-
}
|
84 |
-
else
|
85 |
-
{
|
86 |
-
$.fbuilder.form_become_visible(
|
87 |
-
"#fbuilder"+fnum,
|
88 |
-
(function(n){ return function(){
|
89 |
-
$.fbuilder.generate_form(n);};
|
90 |
-
})(fnum)
|
91 |
-
);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
} catch (e) {if(typeof console != 'undefined') console.log(e);}
|
95 |
-
}; // End generate_form
|
96 |
|
97 |
-
$.fbuilder.form_become_visible = function(element, callback){
|
98 |
-
if(!('hidden_forms' in $.fbuilder)) $.fbuilder.hidden_forms = [];
|
99 |
-
$.fbuilder.hidden_forms.push({'element':element, 'callback':callback});
|
100 |
|
101 |
-
if('form_become_visible_interval' in $.fbuilder) clearInterval($.fbuilder['form_become_visible_interval']);
|
102 |
|
103 |
-
$.fbuilder['form_become_visible_interval'] = setInterval(function(){
|
104 |
-
for(var i = $.fbuilder.hidden_forms.length - 1; 0<=i; i--)
|
105 |
-
{
|
106 |
-
if($($.fbuilder.hidden_forms[i]['element']).is(':visible'))
|
107 |
-
{
|
108 |
-
$.fbuilder.hidden_forms[i]['callback'].call();
|
109 |
-
$.fbuilder.hidden_forms.splice(i,1);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
if($.fbuilder.hidden_forms.length == 0) clearInterval($.fbuilder['form_become_visible_interval']);
|
113 |
-
}, 500);
|
114 |
-
}; // End form_become_visible
|
115 |
|
116 |
-
} // End if(!('fbuilder' in $))
|
117 |
|
118 |
-
var fcount = 1;
|
119 |
-
var fnum = "_"+fcount;
|
120 |
|
121 |
-
while(typeof window["cp_calculatedfieldsf_fbuilder_config"+fnum] != 'undefined' || fcount < 10 )
|
122 |
-
{
|
123 |
-
$.fbuilder.generate_form(fnum);
|
124 |
-
fcount++;
|
125 |
-
fnum = "_"+fcount;
|
126 |
-
}
|
127 |
})(fbuilderjQuery);
|
128 |
};
|
129 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
14 |
fbuilderjQuery.fbuilderjQueryGenerator = function(){
|
15 |
(function($) {
|
16 |
// Namespace of fbuilder
|
17 |
+
if(!('fbuilder' in $))
|
18 |
+
{
|
19 |
+
$.fbuilder = $.fbuilder || {};
|
20 |
+
$.fbuilder[ 'objName' ] = 'fbuilderjQuery';
|
21 |
|
22 |
<?php
|
23 |
// Load Module files
|
66 |
error_log( $e->getMessage() );
|
67 |
}
|
68 |
?>
|
69 |
+
$.fbuilder.generate_form = function(fnum){
|
70 |
+
try {
|
71 |
+
var cp_calculatedfieldsf_fbuilder_config = window["cp_calculatedfieldsf_fbuilder_config"+fnum];
|
72 |
+
if(
|
73 |
+
cp_calculatedfieldsf_fbuilder_config &&
|
74 |
+
$("#fbuilder"+fnum).length &&
|
75 |
+
$("#fbuilder"+fnum).attr('data-processed') == undefined
|
76 |
+
)
|
77 |
+
{
|
78 |
+
if($("#fbuilder"+fnum).is(':visible'))
|
79 |
+
{
|
80 |
+
var f = $("#fbuilder"+fnum).fbuilder(( typeof cp_calculatedfieldsf_fbuilder_config.obj == 'string' ) ? $.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj) : cp_calculatedfieldsf_fbuilder_config.obj );
|
81 |
+
f.attr('data-processed', 1);
|
82 |
+
f.fBuild.loadData("form_structure"+fnum);
|
83 |
+
}
|
84 |
+
else
|
85 |
+
{
|
86 |
+
$.fbuilder.form_become_visible(
|
87 |
+
"#fbuilder"+fnum,
|
88 |
+
(function(n){ return function(){
|
89 |
+
$.fbuilder.generate_form(n);};
|
90 |
+
})(fnum)
|
91 |
+
);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
} catch (e) {if(typeof console != 'undefined') console.log(e);}
|
95 |
+
}; // End generate_form
|
96 |
|
97 |
+
$.fbuilder.form_become_visible = function(element, callback){
|
98 |
+
if(!('hidden_forms' in $.fbuilder)) $.fbuilder.hidden_forms = [];
|
99 |
+
$.fbuilder.hidden_forms.push({'element':element, 'callback':callback});
|
100 |
|
101 |
+
if('form_become_visible_interval' in $.fbuilder) clearInterval($.fbuilder['form_become_visible_interval']);
|
102 |
|
103 |
+
$.fbuilder['form_become_visible_interval'] = setInterval(function(){
|
104 |
+
for(var i = $.fbuilder.hidden_forms.length - 1; 0<=i; i--)
|
105 |
+
{
|
106 |
+
if($($.fbuilder.hidden_forms[i]['element']).is(':visible'))
|
107 |
+
{
|
108 |
+
$.fbuilder.hidden_forms[i]['callback'].call();
|
109 |
+
$.fbuilder.hidden_forms.splice(i,1);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
if($.fbuilder.hidden_forms.length == 0) clearInterval($.fbuilder['form_become_visible_interval']);
|
113 |
+
}, 500);
|
114 |
+
}; // End form_become_visible
|
115 |
|
116 |
+
} // End if(!('fbuilder' in $))
|
117 |
|
118 |
+
var fcount = 1;
|
119 |
+
var fnum = "_"+fcount;
|
120 |
|
121 |
+
while(typeof window["cp_calculatedfieldsf_fbuilder_config"+fnum] != 'undefined' || fcount < 10 )
|
122 |
+
{
|
123 |
+
$.fbuilder.generate_form(fnum);
|
124 |
+
fcount++;
|
125 |
+
fnum = "_"+fcount;
|
126 |
+
}
|
127 |
})(fbuilderjQuery);
|
128 |
};
|
129 |
fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);
|
js/fbuilder-pro-public.jquery.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
$.fbuilder['version'] = '1.1.
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
1 |
+
$.fbuilder['version'] = '1.1.119';
|
2 |
$.fbuilder['controls'] = $.fbuilder['controls'] || {};
|
3 |
$.fbuilder['forms'] = $.fbuilder['forms'] || {};
|
4 |
|
js/modules/02_datetime/admin/module_admin.js
CHANGED
@@ -20,6 +20,7 @@ fbuilderjQuery[ 'fbuilder' ][ 'modules' ][ 'datetime' ] = {
|
|
20 |
{ "value" : "NOW", "code" : "NOW(", "tip" : "<p>Get a date object with the current day-time information. <strong>NOW()</strong></p><p><strong>NOW()</strong></p><p>Result: <strong>2013-10-27 01:42:19</strong></p>" },
|
21 |
{ "value" : "TODAY", "code" : "TODAY(", "tip" : "<p>Get a date object with the current day information, without the time part. <strong>TODAY()</strong></p>" },
|
22 |
{ "value" : "EOMONTH", "code" : "EOMONTH(", "tip" : "<p>Get the last day of the month. <strong>EOMONTH(date_obj, number)</strong> where the number parameter is optional.</p><p><strong>EOMONTH(DATEOBJ("2021-03-04"))</strong> Result: <strong>Mar 31 2021</strong></p><p><strong>EOMONTH(DATEOBJ("2021-03-04"), 4)</strong> Result: <strong>Jul 31 2021</strong></p><p><strong>EOMONTH(DATEOBJ("2021-03-04"), -3)</strong> Result: <strong>Dec 31 2020</strong></p>" },
|
|
|
23 |
{ "value" : "DATEDIFF", "code" : "DATEDIFF(", "tip" : "<p>Get the difference between two dates strings representation</p><p><strong>DATEDIFF(date_one, date_two, date_format, return)</strong></p><p>The function return an object, whose value depends of argument "return"</p><p>Possible values of return argument:<br />d - return the number of days between two dates<br />m - return the number of months between two dates, and remaining days<br />y - return the number of years between two dates, remaining months, and remaining days</p><p><strong>DATEDIFF("2013-10-27", "2012-06-22", "yyyy-mm-dd", "y")["months"]</strong><p><p>Result:<strong> 5 </strong></p>" },
|
24 |
{ "value" : "DATETIMESUM", "code" : "DATETIMESUM(", "tip" : "<p>Increases the date-time string representation in the number of seconds, minutes, hours, days, months, or years, passed as parameter.</p><p><strong>DATETIMESUM( date_string, format, number, to_increase, ignore_weekend )</strong></p><p>ignore_weekend is an optional parameter that applies only to days sum. It ignores Saturdays and Sundays.</p><p>DATETIMESUM("2013-10-27", "yyyy-mm-dd", 5, "d")</p><p>Result: <strong>The date object representation of 2013/11/01</strong></p>" },
|
25 |
{ "value" : "DECIMALTOTIME", "code" : "DECIMALTOTIME(", "tip" : "<p>Converts a decimal number to a time format text. The operation requires three parameters, the decimal number, character indicating the decimal representation ("y" for years, "m" for months, "d" for days, "h" for hours, "i" for minutes, and "s" for seconds), text for time format ("h:i:s").</p><p><strong>DECIMALTOTIME( decimal, format, time format )</strong></p><p>DECIMALTOTIME(938405,"s","d days, h hours, i minutes, and s seconds")</p><p>Result: <strong>10 days, 20 hours, 40 minutes, and 5 seconds</strong></p>" },
|
20 |
{ "value" : "NOW", "code" : "NOW(", "tip" : "<p>Get a date object with the current day-time information. <strong>NOW()</strong></p><p><strong>NOW()</strong></p><p>Result: <strong>2013-10-27 01:42:19</strong></p>" },
|
21 |
{ "value" : "TODAY", "code" : "TODAY(", "tip" : "<p>Get a date object with the current day information, without the time part. <strong>TODAY()</strong></p>" },
|
22 |
{ "value" : "EOMONTH", "code" : "EOMONTH(", "tip" : "<p>Get the last day of the month. <strong>EOMONTH(date_obj, number)</strong> where the number parameter is optional.</p><p><strong>EOMONTH(DATEOBJ("2021-03-04"))</strong> Result: <strong>Mar 31 2021</strong></p><p><strong>EOMONTH(DATEOBJ("2021-03-04"), 4)</strong> Result: <strong>Jul 31 2021</strong></p><p><strong>EOMONTH(DATEOBJ("2021-03-04"), -3)</strong> Result: <strong>Dec 31 2020</strong></p>" },
|
23 |
+
{ "value" : "NETWORKDAYS", "code" : "NETWORKDAYS(", "tip" : "<p>Obtains the difference in days between two dates ignoring weekends (Saturdays and Sundays) and holidays.</p><p><strong>NETWORKDAYS(date_one, date_two, date_format, holidays, holidays_format)</strong></p><p>If holidays format is ignored, the plugin uses date_format.</p><p><strong>NETWORKDAYS("10/1/2012", "3/1/2013", "mm/dd/yyyy")</strong><p><p>Result:<strong> 110 </strong></p><p><strong>NETWORKDAYS("10/1/2012", "3/1/2013", "mm/dd/yyyy", ["12/24/2012", "12/31/2012"], "mm/dd/yyyy")</strong><p><p>Result:<strong> 108 </strong></p>" },
|
24 |
{ "value" : "DATEDIFF", "code" : "DATEDIFF(", "tip" : "<p>Get the difference between two dates strings representation</p><p><strong>DATEDIFF(date_one, date_two, date_format, return)</strong></p><p>The function return an object, whose value depends of argument "return"</p><p>Possible values of return argument:<br />d - return the number of days between two dates<br />m - return the number of months between two dates, and remaining days<br />y - return the number of years between two dates, remaining months, and remaining days</p><p><strong>DATEDIFF("2013-10-27", "2012-06-22", "yyyy-mm-dd", "y")["months"]</strong><p><p>Result:<strong> 5 </strong></p>" },
|
25 |
{ "value" : "DATETIMESUM", "code" : "DATETIMESUM(", "tip" : "<p>Increases the date-time string representation in the number of seconds, minutes, hours, days, months, or years, passed as parameter.</p><p><strong>DATETIMESUM( date_string, format, number, to_increase, ignore_weekend )</strong></p><p>ignore_weekend is an optional parameter that applies only to days sum. It ignores Saturdays and Sundays.</p><p>DATETIMESUM("2013-10-27", "yyyy-mm-dd", 5, "d")</p><p>Result: <strong>The date object representation of 2013/11/01</strong></p>" },
|
26 |
{ "value" : "DECIMALTOTIME", "code" : "DECIMALTOTIME(", "tip" : "<p>Converts a decimal number to a time format text. The operation requires three parameters, the decimal number, character indicating the decimal representation ("y" for years, "m" for months, "d" for days, "h" for hours, "i" for minutes, and "s" for seconds), text for time format ("h:i:s").</p><p><strong>DECIMALTOTIME( decimal, format, time format )</strong></p><p>DECIMALTOTIME(938405,"s","d days, h hours, i minutes, and s seconds")</p><p>Result: <strong>10 days, 20 hours, 40 minutes, and 5 seconds</strong></p>" },
|
js/modules/02_datetime/public/01_datetime.js
CHANGED
@@ -282,6 +282,42 @@
|
|
282 |
return r;
|
283 |
};
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
/*
|
286 |
* DATETIMESUM( datetime_string, format, number, to_increase, ignore_weekend )
|
287 |
* to_increase:
|
282 |
return r;
|
283 |
};
|
284 |
|
285 |
+
if ( typeof NETWORKDAYS == 'undefined' ) {
|
286 |
+
lib.NETWORKDAYS = lib.NETWORKDAYS = function( start_date, end_date, date_format, holidays, holidays_format ) {
|
287 |
+
var tmp,
|
288 |
+
result = 0,
|
289 |
+
min_date_tmp, max_date_tmp;
|
290 |
+
|
291 |
+
date_format = date_format || 'mm/dd/yyyy';
|
292 |
+
holidays = holidays || [];
|
293 |
+
holidays_format = holidays_format || date_format;
|
294 |
+
start_date = DATEOBJ(start_date, date_format);
|
295 |
+
end_date = DATEOBJ(end_date, date_format);
|
296 |
+
|
297 |
+
min_date_tmp = Math.min(start_date, end_date);
|
298 |
+
max_date_tmp = Math.max(start_date, end_date);
|
299 |
+
|
300 |
+
start_date = new Date(min_date_tmp);
|
301 |
+
end_date = new Date(max_date_tmp);
|
302 |
+
|
303 |
+
if( ! Array.isArray(holidays) ) holidays = [holidays];
|
304 |
+
|
305 |
+
for( var i = 0, h = holidays.length; i < h; i++ ) {
|
306 |
+
holidays[i] = GETDATETIMESTRING( DATEOBJ( holidays[i], holidays_format), 'yyyy-mm-dd');
|
307 |
+
}
|
308 |
+
|
309 |
+
while( start_date <= end_date ) {
|
310 |
+
tmp = start_date.getDay();
|
311 |
+
if(0 != tmp && 6 != tmp) {
|
312 |
+
tmp = GETDATETIMESTRING(start_date, 'yyyy-mm-dd');
|
313 |
+
if( holidays.indexOf( tmp ) == -1 ) result++;
|
314 |
+
}
|
315 |
+
start_date.setDate(start_date.getDate()+1);
|
316 |
+
}
|
317 |
+
return result;
|
318 |
+
};
|
319 |
+
}
|
320 |
+
|
321 |
/*
|
322 |
* DATETIMESUM( datetime_string, format, number, to_increase, ignore_weekend )
|
323 |
* to_increase:
|
templates/13/style.css
CHANGED
@@ -151,6 +151,7 @@
|
|
151 |
.cp_cff_13 #fbuilder .fields:not(.cff-switch-container) input[type="checkbox"]:checked::before,
|
152 |
.cp_cff_13 #fbuilder .fields:not(.cff-switch-container) input[type="radio"]:checked::before {
|
153 |
float: left;
|
|
|
154 |
display: inline-block;
|
155 |
vertical-align: middle;
|
156 |
width: 16px;
|
151 |
.cp_cff_13 #fbuilder .fields:not(.cff-switch-container) input[type="checkbox"]:checked::before,
|
152 |
.cp_cff_13 #fbuilder .fields:not(.cff-switch-container) input[type="radio"]:checked::before {
|
153 |
float: left;
|
154 |
+
position:relative;
|
155 |
display: inline-block;
|
156 |
vertical-align: middle;
|
157 |
width: 16px;
|