PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 0.0.6
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v0.0.6
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-3.php

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

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