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-2.php

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

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