PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / paypal / views / settings / action-settings-options.php

action-settings-options.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at paypal/views/settings/action-settings-options.php

74 lines 5.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 $pay_later_value = $form_action->post_content['pay_later'] ?? 'auto';
7 ?>
8 <div class="show_paypal<?php FrmTransLitePaymentsController::maybe_hide_payment_setting( 'paypal', $form_action->post_content['gateway'] ); ?>">
9 <div class="frm_grid_container">
10 <h3><?php esc_html_e( 'PayPal Settings', 'formidable' ); ?></h3>
11
12 <p class="frm6 frm_paypal_layout_setting<?php echo 'recurring' === $form_action->post_content['type'] ? ' frm_hidden' : ''; ?>">
13 <label for="<?php echo esc_attr( $action_control->get_field_id( 'paypal_layout' ) ); ?>">
14 <?php esc_html_e( 'Layout', 'formidable' ); ?>
15 </label>
16 <?php $layout_value = ! empty( $form_action->post_content['paypal_layout'] ) ? $form_action->post_content['paypal_layout'] : 'card_and_checkout'; ?>
17 <select id="<?php echo esc_attr( $action_control->get_field_id( 'paypal_layout' ) ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'paypal_layout' ) ); ?>">
18 <option value="card_and_checkout" <?php selected( $layout_value, 'card_and_checkout' ); ?>><?php esc_html_e( 'Card and checkout buttons', 'formidable' ); ?></option>
19 <option value="checkout_only" <?php selected( $layout_value, 'checkout_only' ); ?>><?php esc_html_e( 'Checkout buttons only', 'formidable' ); ?></option>
20 <option value="card_only" <?php selected( $layout_value, 'card_only' ); ?>><?php esc_html_e( 'Card only', 'formidable' ); ?></option>
21 </select>
22 </p>
23 <p class="frm6">
24 <label for="<?php echo esc_attr( $action_control->get_field_id( 'pay_later' ) ); ?>">
25 <?php esc_html_e( 'Pay Later', 'formidable' ); ?>
26 </label>
27 <select id="<?php echo esc_attr( $action_control->get_field_id( 'pay_later' ) ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'pay_later' ) ); ?>">
28 <option value="auto" <?php selected( $pay_later_value, 'auto' ); ?>><?php esc_html_e( 'Automatic', 'formidable' ); ?></option>
29 <option value="no-messaging" <?php selected( $pay_later_value, 'no-messaging' ); ?>><?php esc_html_e( 'Turn off messaging', 'formidable' ); ?></option>
30 <option value="off" <?php selected( $pay_later_value, 'off' ); ?>><?php esc_html_e( 'Always Disable', 'formidable' ); ?></option>
31 </select>
32 </p>
33 <p class="frm6">
34 <label for="<?php echo esc_attr( $action_control->get_field_id( 'entry_data_sync' ) ); ?>">
35 <?php esc_html_e( 'Order Sync', 'formidable' ); ?>
36 </label>
37 <?php $entry_data_sync_value = $form_action->post_content['entry_data_sync'] ?? 'overwrite'; ?>
38 <select id="<?php echo esc_attr( $action_control->get_field_id( 'entry_data_sync' ) ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'entry_data_sync' ) ); ?>">
39 <option value="overwrite" <?php selected( $entry_data_sync_value, 'overwrite' ); ?>><?php esc_html_e( 'Overwrite entry data', 'formidable' ); ?></option>
40 <option value="new_fields" <?php selected( $entry_data_sync_value, 'new_fields' ); ?>><?php esc_html_e( 'Create new order data fields', 'formidable' ); ?></option>
41 </select>
42
43 <?php
44 /**
45 * These hidden fields are required to prevent more than one set of order data fields from being created.
46 */
47 ?>
48 <?php if ( ! empty( $form_action->post_content['paypal_order_email'] ) ) : ?>
49 <input type="hidden" value="<?php echo esc_attr( $form_action->post_content['paypal_order_email'] ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'paypal_order_email' ) ); ?>">
50 <?php endif; ?>
51 <?php if ( ! empty( $form_action->post_content['paypal_order_name'] ) ) : ?>
52 <input type="hidden" value="<?php echo esc_attr( $form_action->post_content['paypal_order_name'] ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'paypal_order_name' ) ); ?>">
53 <?php endif; ?>
54 <?php if ( ! empty( $form_action->post_content['paypal_order_address'] ) ) : ?>
55 <input type="hidden" value="<?php echo esc_attr( $form_action->post_content['paypal_order_address'] ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'paypal_order_address' ) ); ?>">
56 <?php endif; ?>
57 </p>
58 <p class="frm6">
59 <label for="<?php echo esc_attr( $action_control->get_field_id( 'shipping_preference' ) ); ?>">
60 <?php esc_html_e( 'Shipping Preference', 'formidable' ); ?>
61 </label>
62 <?php $shipping_preference_value = $form_action->post_content['shipping_preference'] ?? 'use_paypal_account_data'; ?>
63 <select id="<?php echo esc_attr( $action_control->get_field_id( 'shipping_preference' ) ); ?>" name="<?php echo esc_attr( $action_control->get_field_name( 'shipping_preference' ) ); ?>">
64 <?php if ( FrmAppHelper::pro_is_installed() ) { ?>
65 <option value="use_address_field_data" <?php selected( $shipping_preference_value, 'use_address_field_data' ); ?>><?php esc_html_e( 'Use Address Field Data', 'formidable' ); ?></option>
66 <?php } ?>
67 <option value="use_paypal_account_data" <?php selected( $shipping_preference_value, 'use_paypal_account_data' ); ?>><?php esc_html_e( 'Use PayPal Account Data', 'formidable' ); ?></option>
68 <option value="no_shipping" <?php selected( $shipping_preference_value, 'no_shipping' ); ?>><?php esc_html_e( 'No Shipping', 'formidable' ); ?></option>
69 </select>
70 </p>
71 </div>
72
73 </div>
74