PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
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 / button-settings.php

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

75 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PayPal button settings view
4 *
5 * @package Formidable
6 *
7 * @since 6.31
8 *
9 * @var array $settings PayPal button settings array
10 * @var array $args Additional arguments for the view
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 die( 'You are not allowed to call this page directly.' );
15 }
16
17 // Extract button settings with defaults
18 $button_color = $form_action->post_content['button_color'] ?? 'default';
19 $button_label = $form_action->post_content['button_label'] ?? 'paypal';
20 $button_border_radius = $form_action->post_content['button_border_radius'] ?? 10;
21 ?>
22 <?php $layout_value = ! empty( $form_action->post_content['paypal_layout'] ) ? $form_action->post_content['paypal_layout'] : 'card_and_checkout'; ?>
23 <div class="show_paypal frm_paypal_button_settings<?php FrmTransLitePaymentsController::maybe_hide_payment_setting( 'paypal', $form_action->post_content['gateway'] ); ?><?php echo 'card_only' === $layout_value ? ' frm_hidden' : ''; ?>">
24 <div class="frm_grid_container">
25 <h3><?php esc_html_e( 'PayPal Button Settings', 'formidable' ); ?></h3>
26
27 <p class="frm4">
28 <label>
29 <?php esc_html_e( 'Color', 'formidable' ); ?>
30 </label>
31 <select name="<?php echo esc_attr( $action_control->get_field_name( 'button_color' ) ); ?>">
32 <option value="default" <?php selected( $button_color, 'default' ); ?>><?php esc_html_e( 'Use Defaults', 'formidable' ); ?></option>
33 <option value="gold" <?php selected( $button_color, 'gold' ); ?>><?php esc_html_e( 'Gold', 'formidable' ); ?></option>
34 <option value="blue" <?php selected( $button_color, 'blue' ); ?>><?php esc_html_e( 'Blue', 'formidable' ); ?></option>
35 <option value="silver" <?php selected( $button_color, 'silver' ); ?>><?php esc_html_e( 'Silver', 'formidable' ); ?></option>
36 <option value="white" <?php selected( $button_color, 'white' ); ?>><?php esc_html_e( 'White', 'formidable' ); ?></option>
37 <option value="black" <?php selected( $button_color, 'black' ); ?>><?php esc_html_e( 'Black', 'formidable' ); ?></option>
38 </select>
39 </p>
40
41 <p class="frm4">
42 <label>
43 <?php esc_html_e( 'Label', 'formidable' ); ?>
44 </label>
45 <select name="<?php echo esc_attr( $action_control->get_field_name( 'button_label' ) ); ?>">
46 <option value="paypal" <?php selected( $button_label, 'paypal' ); ?>><?php esc_html_e( 'PayPal', 'formidable' ); ?></option>
47 <option value="checkout" <?php selected( $button_label, 'checkout' ); ?>><?php esc_html_e( 'PayPal Checkout', 'formidable' ); ?></option>
48 <option value="buynow" <?php selected( $button_label, 'buynow' ); ?>><?php esc_html_e( 'Buy Now', 'formidable' ); ?></option>
49 <option value="pay" <?php selected( $button_label, 'pay' ); ?>><?php esc_html_e( 'Pay with PayPal', 'formidable' ); ?></option>
50 </select>
51 </p>
52
53 <p class="frm4">
54 <label>
55 <?php esc_html_e( 'Border Radius', 'formidable' ); ?>
56 </label>
57 <?php
58 FrmHtmlHelper::echo_unit_input(
59 array(
60 'value' => (int) $button_border_radius,
61 'field_attrs' => array(
62 'id' => 'button_border_radius',
63 'name' => $action_control->get_field_name( 'button_border_radius' ),
64 ),
65 'input_number_attrs' => array(
66 'class' => 'frm-w-full',
67 ),
68 'units' => array( 'px' ),
69 )
70 );
71 ?>
72 </p>
73 </div>
74 </div>
75