PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 0.0.7
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v0.0.7
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 / layout-1.php

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

179 lines 16.1 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\Better_Payment_Helper;
6
7 $better_payment_helper_obj = new Better_Payment_Helper();
8
9 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-vars.php";
10 ?>
11
12 <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">
13 <input type="hidden" name="better_payment_page_id" value="<?php echo get_the_ID(); ?>">
14 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr($widgetObj->get_id()); ?>">
15
16 <div class="payment-form-layout-1 payment-form-layout">
17 <div class="tile is-ancestor m-0">
18 <div class="tile is-parent dynamic-amount-section ">
19 <div class="tile is-child">
20 <div class="dynamic-amount-section-inner has-text-white p-6">
21 <div class="pt-3 pb-3">
22 <h4 class="is-size-2-fix bp-dynamic-amount-section-amount-summary"><?php _e(sprintf('%s<span class="bp-transaction-details-amount-text">%s</span>%s', esc_html( $layout_form_currency_left ), '' !== $product_price ? floatval($product_price) : '', esc_html( $layout_form_currency_right ) ), 'better-payment'); ?></h4>
23 <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>
24 <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>
25 <p class="is-size-6-fix pt-2 bp-dynamic-amount-section-amount">
26 <?php _e(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'); ?><br>
27 <?php _e(sprintf("%s <span class='bp-transaction-details-amount-text'>%s</span>", $layout_form_transaction_details_amount_text, '' !== $product_price ? floatval($product_price) : ''), 'better-payment'); ?>
28 </p>
29 </div>
30 </div>
31 </div>
32 </div>
33
34 <div class="tile is-parent has-background-white-fix form-content-section is-8 <?php esc_attr_e($layout_form_content_offset_class, 'better-payment'); ?>">
35 <div class="tile is-child">
36 <div class="form-content-section-inner p-6">
37 <div class="pt-3 pb-3">
38 <div class="form-content-section-fields">
39 <div class="field-payment_method">
40 <div class="control bp-radio-box">
41 <?php
42 $bp_paypal_button_enable = !empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable'];
43 $bp_stripe_button_enable = !empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable'];
44 ?>
45 <?php if (true === $bp_paypal_button_enable) : ?>
46 <?php if (true == $bp_stripe_button_enable) : ?>
47 <label class="radio pr-6 payment-method-checkbox">
48 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
49 <?php esc_html_e('PayPal', 'better-payment'); ?>
50 </label>
51 <?php else : ?>
52 <label class="radio pr-6 mb-5 payment-method-checkbox single-item active column has-text-centered">
53 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
54 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="">
55 </label>
56 <?php endif; ?>
57 <?php endif; ?>
58
59 <?php if (true === $bp_stripe_button_enable) : ?>
60 <?php if (true === $bp_paypal_button_enable) : ?>
61 <label class="radio payment-method-checkbox">
62 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?>>
63 <?php esc_html_e('Stripe', 'better-payment'); ?>
64 </label>
65 <?php else : ?>
66 <label class="radio mb-5 payment-method-checkbox single-item <?php echo empty($settings['better_payment_form_paypal_enable']) ? esc_attr('active') : '' ?> column has-text-centered">
67 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?>>
68 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="">
69 </label>
70 <?php endif; ?>
71 <?php endif; ?>
72 </div>
73 </div>
74
75 <?php
76 if (!empty($settings['better_payment_form_fields'])) :
77 foreach ($settings['better_payment_form_fields'] as $item) :
78 if (isset($item["better_payment_field_name_show"]) && 'yes' !== $item["better_payment_field_name_show"]) {
79 $item_primary_field_type = !empty($item["better_payment_primary_field_type"]) ? $item["better_payment_primary_field_type"] : "";
80 $is_payment_amount_field = 'primary_payment_amount' === $item_primary_field_type ? 1 : 0;
81 $is_payment_amount_field_hidden = $is_payment_amount_field ? 1 : 0;
82
83 continue;
84 }
85
86 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
87
88 if ($is_payment_amount_field) : ?>
89 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
90 <?php
91 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
92 $this->render_amount_element($settings);
93 }
94 ?>
95 </div>
96 <?php endif; ?>
97
98 <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 ); ?>">
99 <div class="control has-icons-left">
100 <input class="input is-medium
101 <?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) : ?> min="1" value="<?php echo $is_payment_type_woocommerce ? floatval($product_price) : ''; ?>" <?php endif; ?>>
102 <span class="icon is-medium is-left">
103 <?php
104 $show_payment_default_symbol = 0;
105 if ( $is_payment_amount_field ) {
106 $show_payment_default_symbol = 'bp-icon bp-envelope' === $render_attribute_icon || 'bp-icon bp-user' === $render_attribute_icon;
107
108 if( $show_payment_default_symbol ){
109 ?>
110 <span class="icon is-medium is-left">
111 <?php printf('<span class="bp-currency-symbol">%s</span>', $layout_form_currency_symbol); ?>
112 </span>
113 <?php
114 }
115 } ?>
116
117 <?php if ($layout_show_image) : ?>
118 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="" width="20">
119 <?php elseif( ! $show_payment_default_symbol ) : ?>
120 <i class="<?php echo esc_attr($render_attribute_icon); ?>"></i>
121 <?php endif; ?>
122 </span>
123 </div>
124 </div>
125 <?php
126 endforeach;
127 endif;
128 ?>
129
130 <?php if ( 0 === $payment_amount_field_exists ) : ?>
131 <div class="bp-payment-amount-wrap <?php echo esc_attr($layout_put_amount_field_hide_show); ?> <?php echo esc_attr( $payment_amount_field_class ); ?>">
132 <?php
133 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
134 $this->render_amount_element($settings);
135 }
136 ?>
137 </div>
138
139 <?php if ( 0 === $is_payment_amount_field_hidden ) : ?>
140 <div class="field-payment_amount pt-5 is-hidden1 <?php echo esc_attr( $payment_amount_field_class ); ?>">
141 <div class="control has-icons-left">
142 <input class="input is-medium bp-custom-payment-amount" type="number" placeholder="<?php esc_attr_e('Payment Amount', 'better-payment'); ?>" name="primary_payment_amount" required min="1" value="">
143 <span class="icon is-medium is-left">
144 <?php printf('<span class="bp-currency-symbol">%s</span>', $layout_form_currency_symbol); ?>
145 </span>
146 </div>
147 </div>
148 <?php endif; ?>
149
150 <?php endif; ?>
151
152 <div class="pb-5"></div>
153
154 <div class="field-process_payment_button pt-3">
155 <div class="control">
156 <div class="payment__option">
157 <?php
158 if (!empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable']) {
159 echo Better_Payment\Lite\Classes\Better_Payment_Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
160 }
161
162 if (!empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable']) {
163 echo Better_Payment\Lite\Classes\Better_Payment_Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
164 }
165 ?>
166 </div>
167 </div>
168 </div>
169 </div>
170 </div>
171 </div>
172 </div>
173 </div>
174 </div>
175 </form>
176
177 </div>
178 </div>
179 </div>