PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.2.2
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.2.2
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 1.0.5 1.0.6 All 66 releases
better-payment / includes / Admin / views / elementor / layouts / layout-1.php

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

200 lines 18.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="better-payment">
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 $render_attribute_default_text = $this->render_attribute_default_text( $settings );
12 ?>
13
14 <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">
15 <input type="hidden" name="better_payment_page_id" value="<?php echo esc_attr( get_the_ID() ); ?>">
16 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr($widgetObj->get_id()); ?>">
17 <?php
18 if ( method_exists( $widgetObj, 'render_campaign_id_hidden_field' ) ) {
19 echo $widgetObj->render_campaign_id_hidden_field( $settings );
20 }
21 ?>
22
23 <div class="payment-form-layout-1 payment-form-layout">
24 <div class="tile is-ancestor m-0">
25 <?php if ( $sidebar_show ) : ?>
26 <div class="tile is-parent dynamic-amount-section ">
27 <div class="tile is-child">
28 <div class="dynamic-amount-section-inner has-text-white p-6">
29 <div class="pt-3 pb-3">
30 <h4 class="is-size-2-fix bp-dynamic-amount-section-amount-summary">
31 <?php
32 echo wp_kses(
33 __(
34 sprintf('%s<span class="bp-transaction-details-amount-text">%s</span>%s',
35 wp_kses( $layout_form_currency_left, $valid_html_tags ),
36 '' !== $product_price ? floatval($product_price) : $render_attribute_default_text,
37 wp_kses( $layout_form_currency_right, $valid_html_tags )
38 ),
39 'better-payment'
40 ),
41 $valid_html_tags
42 );
43 ?>
44 </h4>
45 <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>
46 <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>
47 <p class="is-size-6-fix pt-2 bp-dynamic-amount-section-amount">
48 <?php echo wp_kses( __(sprintf("%s <a class='has-text-white %s ' href='%s'>%s</a>", $layout_form_transaction_details_product_title, $layout_dynamic_payment_hide_show, $product_permalink, $product_name), 'better-payment'), $valid_html_tags ); ?><br>
49 <?php echo wp_kses( __(sprintf("%s <span class='bp-transaction-details-amount-text'>%s</span>", $layout_form_transaction_details_amount_text, '' !== $product_price ? floatval($product_price) : $render_attribute_default_text), 'better-payment'), $valid_html_tags ); ?>
50 </p>
51 </div>
52 </div>
53 </div>
54 </div>
55 <?php endif; ?>
56
57 <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'); ?>">
58 <div class="tile is-child">
59 <div class="form-content-section-inner p-6">
60 <div class="pt-3 pb-3">
61 <div class="form-content-section-fields">
62 <?php
63 $bp_paypal_button_enable = !empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable'];
64 $bp_stripe_button_enable = !empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable'];
65 $bp_paystack_button_enable = !empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable'];
66 $bp_number_of_items_enable_class = $bp_paypal_button_enable && $bp_stripe_button_enable && $bp_paystack_button_enable ? 'bp-three-items-enabled' : '';
67 ?>
68 <div class="field-payment_method <?php echo esc_attr( $bp_number_of_items_enable_class . '-wrap' ); ?>">
69 <div class="control bp-radio-box">
70
71 <?php if (true === $bp_paypal_button_enable) : ?>
72 <?php if ( true == $bp_stripe_button_enable || true == $bp_paystack_button_enable ) : ?>
73 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-paypal <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
74 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
75 <?php esc_html_e('PayPal', 'better-payment'); ?>
76 </label>
77 <?php else : ?>
78 <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 ); ?>">
79 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
80 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
81 </label>
82 <?php endif; ?>
83 <?php endif; ?>
84
85 <?php if (true === $bp_stripe_button_enable) : ?>
86 <?php if (true === $bp_paypal_button_enable || true === $bp_paystack_button_enable) : ?>
87 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-stripe <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
88 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?> >
89 <?php esc_html_e('Stripe', 'better-payment'); ?>
90 </label>
91 <?php else : ?>
92 <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 ); ?>">
93 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo 'checked'; ?>>
94 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
95 </label>
96 <?php endif; ?>
97 <?php endif; ?>
98
99 <?php if (true === $bp_paystack_button_enable) : ?>
100 <?php if (true === $bp_paypal_button_enable || true === $bp_stripe_button_enable) : ?>
101 <label class="radio payment-method-checkbox payment-method-checkbox-paystack <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
102 <input type="radio" name="payment_method" class="layout-payment-method-paystack">
103 <?php esc_html_e('Paystack', 'better-payment'); ?>
104 </label>
105 <?php else : ?>
106 <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 ); ?>">
107 <input type="radio" name="payment_method" class="layout-payment-method-paystack" <?php echo 'checked'; ?>>
108 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="">
109 </label>
110 <?php endif; ?>
111 <?php endif; ?>
112 </div>
113 </div>
114
115 <?php
116 if (!empty($settings['better_payment_form_fields'])) :
117 foreach ($settings['better_payment_form_fields'] as $item) :
118 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
119
120 if ($is_payment_amount_field) : ?>
121 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
122 <?php
123 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
124 $this->render_amount_element($settings);
125 }
126 ?>
127 </div>
128 <?php endif; ?>
129
130 <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 ); ?>">
131 <div class="control has-icons-left">
132 <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; ?>>
133 <span class="icon is-medium is-left">
134 <?php
135 $show_payment_default_symbol = 0;
136 if ( $is_payment_amount_field ) {
137 $show_payment_default_symbol = 'bp-icon bp-envelope' === $render_attribute_icon || 'bp-icon bp-user' === $render_attribute_icon;
138
139 if( $show_payment_default_symbol ){
140 ?>
141 <span class="icon is-medium is-left">
142 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
143 </span>
144 <?php
145 }
146 } ?>
147
148 <?php if ($layout_show_image) : ?>
149 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
150 <?php elseif( ! $show_payment_default_symbol ) : ?>
151 <?php
152 // Use Elementor's Icons_Manager to properly render icons with FontAwesome support
153 if (!empty($item['better_payment_field_icon']['value'])) {
154 \Elementor\Icons_Manager::render_icon($item['better_payment_field_icon'], ['aria-hidden' => 'true']);
155 } else {
156 // Fallback to default icons
157 echo '<i class="' . esc_attr($render_attribute_icon) . '"></i>';
158 }
159 ?>
160 <?php endif; ?>
161 </span>
162 </div>
163 </div>
164 <?php
165 endforeach;
166 endif;
167 ?>
168
169 <div class="pb-5"></div>
170
171 <div class="field-process_payment_button pt-3">
172 <div class="control">
173 <div class="payment__option">
174 <?php
175 if (!empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable']) {
176 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
177 }
178
179 if (!empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable']) {
180 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
181 }
182
183 if (!empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable']) {
184 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
185 }
186 ?>
187 </div>
188 </div>
189 </div>
190 </div>
191 </div>
192 </div>
193 </div>
194 </div>
195 </div>
196 </form>
197
198 </div>
199 </div>
200 </div>