PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.3.3
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.3.3
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / includes / Admin / views / elementor / layouts-block / layout-1.php

layout-1.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.3.3, at includes/Admin/views/elementor/layouts-block/layout-1.php

186 lines 17.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="better-payment <?php echo esc_attr( ! empty( $extraDatas['block_id'] ) ? 'bp-' . $extraDatas['block_id'] : '' ); ?>">
2 <div class="better-payment--wrapper">
3 <div class="better-payment--container">
4 <?php
5 use Better_Payment\Lite\Classes\Helper;
6
7 $better_payment_helper_obj = new Helper();
8
9 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-vars.php";
10
11 // Block only: treat 'stripe' product source the same as woocommerce/fluentcart —
12 // hide the manual amount field and show the product price section.
13 if ( ! empty( $settings['better_payment_form_payment_source'] ) && 'stripe' === $settings['better_payment_form_payment_source'] ) {
14 $layout_put_amount_field_hide_show = 'is-hidden';
15 $layout_dynamic_payment_hide_show = '';
16 }
17
18 $render_attribute_default_text = $this->render_attribute_default_text( $settings );
19 ?>
20
21 <form name="better-payment-form-<?php echo esc_attr($widgetObj->get_id()); ?>" data-better-payment="<?php echo esc_attr($layout_setting_meta); ?>" class="better-payment-form" id="better-payment-form-<?php echo esc_attr($widgetObj->get_id()); ?>" action="<?php echo esc_url($layout_action); ?>" method="post">
22 <input type="hidden" name="better_payment_page_id" value="<?php echo esc_attr( get_the_ID() ); ?>">
23 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr($widgetObj->get_id()); ?>">
24 <input type="hidden" name="better_payment_source" value="gutenberg">
25 <?php
26 if ( method_exists( $widgetObj, 'render_campaign_id_hidden_field' ) ) {
27 echo $widgetObj->render_campaign_id_hidden_field( $settings );
28 }
29 ?>
30
31 <div class="payment-form-layout-1 payment-form-layout">
32 <div class="tile is-ancestor m-0">
33 <?php if ( $sidebar_show ) : ?>
34 <div class="tile is-parent dynamic-amount-section ">
35 <div class="tile is-child">
36 <div class="dynamic-amount-section-inner has-text-white p-6">
37 <div class="pt-3 pb-3">
38 <h4 class="is-size-2-fix bp-dynamic-amount-section-amount-summary">
39 <?php
40 printf(
41 wp_kses( __( '%1$s<span class="bp-transaction-details-amount-text">%2$s</span>%3$s', 'better-payment' ), $valid_html_tags ),
42 wp_kses( $layout_form_currency_left, $valid_html_tags ),
43 '' !== $product_price ? floatval( $product_price ) : esc_html( $render_attribute_default_text ),
44 wp_kses( $layout_form_currency_right, $valid_html_tags )
45 );
46 ?>
47 </h4>
48 <h4 class="is-size-5-fix pt-5 bp-dynamic-amount-section-title"><?php esc_html_e($layout_form_transaction_details_heading, 'better-payment'); ?></h4>
49 <p class="is-size-6-fix pt-3 bp-dynamic-amount-section-sub-title"><?php esc_html_e($layout_form_transaction_details_sub_heading, 'better-payment'); ?></p>
50 <p class="is-size-6-fix pt-2 bp-dynamic-amount-section-amount">
51 <?php if ( $is_payment_type_woocommerce || $is_payment_type_fluentcart ) : ?>
52 <?php printf( wp_kses( __( '%1$s <a class="has-text-white" href="%2$s">%3$s</a>', 'better-payment' ), $valid_html_tags ), esc_html( $layout_form_transaction_details_product_title ), esc_url( $product_permalink ), esc_html( $product_name ) ); ?><br>
53 <?php endif; ?>
54 <?php printf( wp_kses( __( '%1$s <span class="bp-transaction-details-amount-text">%2$s</span>', 'better-payment' ), $valid_html_tags ), esc_html( $layout_form_transaction_details_amount_text ), '' !== $product_price ? floatval( $product_price ) : esc_html( $render_attribute_default_text ) ); ?>
55 </p>
56 </div>
57 </div>
58 </div>
59 </div>
60 <?php endif; ?>
61
62 <div class="tile is-parent has-background-white-fix form-content-section <?php echo ( intval( $sidebar_show ) ? esc_attr('is-8') : esc_attr('is-12') ); ?> <?php esc_attr_e($layout_form_content_offset_class, 'better-payment'); ?>">
63 <div class="tile is-child">
64 <div class="form-content-section-inner p-6">
65 <div class="pt-3 pb-3">
66 <div class="form-content-section-fields">
67 <?php
68 $bp_paypal_button_enable = !empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable'];
69 $bp_stripe_button_enable = !empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable'];
70 $bp_paystack_button_enable = !empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable'];
71 $bp_number_of_items_enable_class = $bp_paypal_button_enable && $bp_stripe_button_enable && $bp_paystack_button_enable ? 'bp-three-items-enabled' : '';
72 ?>
73 <div class="field-payment_method <?php echo esc_attr( $bp_number_of_items_enable_class . '-wrap' ); ?>">
74 <div class="control bp-radio-box">
75
76 <?php if (true === $bp_paypal_button_enable) : ?>
77 <?php if ( true == $bp_stripe_button_enable || true == $bp_paystack_button_enable ) : ?>
78 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-paypal <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
79 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
80 <?php esc_html_e('PayPal', 'better-payment'); ?>
81 </label>
82 <?php else : ?>
83 <label class="radio pr-6 mb-5 payment-method-checkbox payment-method-checkbox-paypal single-item active column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
84 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
85 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
86 </label>
87 <?php endif; ?>
88 <?php endif; ?>
89
90 <?php if (true === $bp_stripe_button_enable) : ?>
91 <?php if (true === $bp_paypal_button_enable || true === $bp_paystack_button_enable) : ?>
92 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-stripe <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
93 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?> >
94 <?php esc_html_e('Stripe', 'better-payment'); ?>
95 </label>
96 <?php else : ?>
97 <label class="radio pr-6 mb-5 payment-method-checkbox payment-method-checkbox-stripe single-item <?php echo esc_attr('active'); ?> column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
98 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo 'checked'; ?>>
99 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
100 </label>
101 <?php endif; ?>
102 <?php endif; ?>
103
104 <?php if (true === $bp_paystack_button_enable) : ?>
105 <?php if (true === $bp_paypal_button_enable || true === $bp_stripe_button_enable) : ?>
106 <label class="radio payment-method-checkbox payment-method-checkbox-paystack <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
107 <input type="radio" name="payment_method" class="layout-payment-method-paystack">
108 <?php esc_html_e('Paystack', 'better-payment'); ?>
109 </label>
110 <?php else : ?>
111 <label class="radio mb-5 payment-method-checkbox payment-method-checkbox-paystack single-item <?php echo esc_attr('active'); ?> column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
112 <input type="radio" name="payment_method" class="layout-payment-method-paystack" <?php echo 'checked'; ?>>
113 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="">
114 </label>
115 <?php endif; ?>
116 <?php endif; ?>
117 </div>
118 </div>
119
120 <?php
121 if (!empty($settings['better_payment_form_fields'])) :
122 foreach ($settings['better_payment_form_fields'] as $item) :
123 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
124
125 if ($is_payment_amount_field) : ?>
126 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
127 <?php
128 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
129 $this->render_amount_element($settings);
130 }
131 ?>
132 </div>
133 <?php endif; ?>
134
135 <div class="better-payment-field-advanced-layout field-<?php echo esc_attr($render_attribute_name); ?> pt-5 elementor-repeater-item-<?php echo esc_attr($item['_id']); ?> <?php echo esc_attr( $payment_amount_field_class ); ?> <?php echo esc_attr( $item_visible_class ); ?>">
136 <div class="control has-icons-left">
137 <input class="input is-medium <?php echo esc_attr($render_attribute_class); ?>" type="<?php echo esc_attr($render_attribute_type); ?>" placeholder="<?php echo esc_attr($render_attribute_placeholder); ?>" name="<?php echo esc_attr($render_attribute_name); ?>" <?php if ($render_attribute_required) : ?> required="<?php echo esc_attr($render_attribute_required); ?>" <?php endif; ?> <?php if ($is_payment_amount_field) : ?> step="any" min="<?php echo esc_attr( $render_attribute_min ); ?>" max="<?php echo esc_attr( $render_attribute_max ); ?>" value="<?php echo $is_payment_type_woocommerce || $is_payment_type_fluentcart || $is_payment_type_stripe ? floatval($product_price) : esc_attr( $render_attribute_default ); ?>" <?php echo esc_attr( $render_attribute_default_fixed ); ?> <?php endif; ?>>
138 <span class="icon is-medium is-left">
139 <?php if ( $is_payment_amount_field ) : ?>
140 <?php printf( '<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
141 <?php elseif ($layout_show_image) : ?>
142 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
143 <?php else : ?>
144 <i class="<?php echo esc_attr($render_attribute_icon); ?>"></i>
145 <?php endif; ?>
146 </span>
147 </div>
148 </div>
149 <?php
150 endforeach;
151 endif;
152 ?>
153
154 <div class="pb-5"></div>
155
156 <div class="field-process_payment_button pt-3">
157 <div class="control">
158 <div class="payment__option">
159 <?php
160 if (!empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable']) {
161 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
162 }
163
164 if (!empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable']) {
165 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
166 }
167
168 if (!empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable']) {
169 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
170 }
171 ?>
172 </div>
173 </div>
174 </div>
175 </div>
176 </div>
177 </div>
178 </div>
179 </div>
180 </div>
181 </form>
182
183 </div>
184 </div>
185 </div>
186