@@ -163,9 +163,12 @@ discard block |
||
163 | 163 | <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
164 | 164 | </span> |
165 | 165 | </div> |
166 | - <?php else : ?> |
|
166 | + <?php else { |
|
167 | + : ?> |
|
167 | 168 | <span class="input-group-text"> |
168 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
169 | + <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); |
|
170 | +} |
|
171 | +?></span> |
|
169 | 172 | </span> |
170 | 173 | <?php endif; ?> |
171 | 174 | <?php endif; ?> |
@@ -185,9 +188,12 @@ discard block |
||
185 | 188 | <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
186 | 189 | </span> |
187 | 190 | </div> |
188 | - <?php else : ?> |
|
191 | + <?php else { |
|
192 | + : ?> |
|
189 | 193 | <span class="input-group-text"> |
190 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
194 | + <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); |
|
195 | +} |
|
196 | +?></span> |
|
191 | 197 | </span> |
192 | 198 | <?php endif; ?> |
193 | 199 | <?php endif; ?> |
@@ -26,71 +26,71 @@ discard block |
||
26 | 26 | |
27 | 27 | <?php |
28 | 28 | |
29 | - // Fires before printing a line item column. |
|
30 | - do_action( "getpaid_form_cart_item_before_$key", $item, $form ); |
|
29 | + // Fires before printing a line item column. |
|
30 | + do_action( "getpaid_form_cart_item_before_$key", $item, $form ); |
|
31 | 31 | |
32 | - // Item name. |
|
33 | - if ( 'name' === $key ) { |
|
32 | + // Item name. |
|
33 | + if ( 'name' === $key ) { |
|
34 | 34 | |
35 | 35 | |
36 | - ob_start(); |
|
36 | + ob_start(); |
|
37 | 37 | |
38 | - // Add an optional description. |
|
39 | - $description = $item->get_description(); |
|
38 | + // Add an optional description. |
|
39 | + $description = $item->get_description(); |
|
40 | 40 | |
41 | - if ( ! empty( $description ) ) { |
|
42 | - echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
43 | - } |
|
41 | + if ( ! empty( $description ) ) { |
|
42 | + echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
43 | + } |
|
44 | 44 | |
45 | - // Price help text. |
|
46 | - $description = getpaid_item_recurring_price_help_text( $item, $currency ); |
|
47 | - if ( $description ) { |
|
48 | - echo "<small class='getpaid-form-item-price-desc form-text text-muted font-italic pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
49 | - } |
|
45 | + // Price help text. |
|
46 | + $description = getpaid_item_recurring_price_help_text( $item, $currency ); |
|
47 | + if ( $description ) { |
|
48 | + echo "<small class='getpaid-form-item-price-desc form-text text-muted font-italic pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
49 | + } |
|
50 | 50 | |
51 | - do_action( 'getpaid_payment_form_cart_item_description', $item, $form ); |
|
51 | + do_action( 'getpaid_payment_form_cart_item_description', $item, $form ); |
|
52 | 52 | |
53 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
53 | + if ( wpinv_current_user_can_manage_invoicing() ) { |
|
54 | 54 | |
55 | - edit_post_link( |
|
56 | - __( 'Edit this item.', 'invoicing' ), |
|
57 | - '<small class="form-text text-muted">', |
|
58 | - '</small>', |
|
59 | - $item->get_id(), |
|
60 | - 'text-danger' |
|
61 | - ); |
|
55 | + edit_post_link( |
|
56 | + __( 'Edit this item.', 'invoicing' ), |
|
57 | + '<small class="form-text text-muted">', |
|
58 | + '</small>', |
|
59 | + $item->get_id(), |
|
60 | + 'text-danger' |
|
61 | + ); |
|
62 | 62 | |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | - $description = ob_get_clean(); |
|
65 | + $description = ob_get_clean(); |
|
66 | 66 | |
67 | - // Display the name. |
|
68 | - $tootip = empty( $description ) ? '' : ' <i class="fas fa-xs fa-info gp-tooltip d-sm-none text-muted"></i>'; |
|
67 | + // Display the name. |
|
68 | + $tootip = empty( $description ) ? '' : ' <i class="fas fa-xs fa-info gp-tooltip d-sm-none text-muted"></i>'; |
|
69 | 69 | |
70 | - $has_featured_image = has_post_thumbnail( $item->get_id() ); |
|
70 | + $has_featured_image = has_post_thumbnail( $item->get_id() ); |
|
71 | 71 | |
72 | - if ( $has_featured_image ) { |
|
73 | - echo '<div class="d-flex align-items-center getpaid-form-item-has-featured-image">'; |
|
74 | - echo '<div class="getpaid-form-item-image-container mr-2" style="width:85px;">'; |
|
75 | - echo get_the_post_thumbnail( $item->get_id(), array( 75, 75 ), array( 'class' => 'getpaid-form-item-image mb-0' ) ); |
|
76 | - echo '</div>'; |
|
77 | - echo '<div class="getpaid-form-item-name-container">'; |
|
78 | - } |
|
72 | + if ( $has_featured_image ) { |
|
73 | + echo '<div class="d-flex align-items-center getpaid-form-item-has-featured-image">'; |
|
74 | + echo '<div class="getpaid-form-item-image-container mr-2" style="width:85px;">'; |
|
75 | + echo get_the_post_thumbnail( $item->get_id(), array( 75, 75 ), array( 'class' => 'getpaid-form-item-image mb-0' ) ); |
|
76 | + echo '</div>'; |
|
77 | + echo '<div class="getpaid-form-item-name-container">'; |
|
78 | + } |
|
79 | 79 | |
80 | - echo '<div class="mb-1 font-weight-bold">' . esc_html( $item->get_name() ) . wp_kses_post( $tootip ) . '</div>'; |
|
80 | + echo '<div class="mb-1 font-weight-bold">' . esc_html( $item->get_name() ) . wp_kses_post( $tootip ) . '</div>'; |
|
81 | 81 | |
82 | - if ( ! empty( $description ) ) { |
|
83 | - printf( '<span class="d-none d-sm-block getpaid-item-desc">%s</span>', wp_kses_post( $description ) ); |
|
84 | - } |
|
82 | + if ( ! empty( $description ) ) { |
|
83 | + printf( '<span class="d-none d-sm-block getpaid-item-desc">%s</span>', wp_kses_post( $description ) ); |
|
84 | + } |
|
85 | 85 | |
86 | - if ( $item->allows_quantities() ) { |
|
87 | - printf( |
|
88 | - '<small class="d-sm-none text-muted form-text">%s</small>', |
|
89 | - sprintf( |
|
90 | - // translators: %s is the item quantity. |
|
91 | - esc_html__( 'Qty %s', 'invoicing' ), |
|
92 | - sprintf( |
|
93 | - '<input |
|
86 | + if ( $item->allows_quantities() ) { |
|
87 | + printf( |
|
88 | + '<small class="d-sm-none text-muted form-text">%s</small>', |
|
89 | + sprintf( |
|
90 | + // translators: %s is the item quantity. |
|
91 | + esc_html__( 'Qty %s', 'invoicing' ), |
|
92 | + sprintf( |
|
93 | + '<input |
|
94 | 94 | type="number" |
95 | 95 | step="0.01" |
96 | 96 | style="width: 48px;" |
@@ -99,62 +99,62 @@ discard block |
||
99 | 99 | min="1" |
100 | 100 | max="%s" |
101 | 101 | >', |
102 | - (float) $item->get_quantity() == 0 ? 1 : (float) $item->get_quantity(), |
|
103 | - floatval( null !== $max_qty ? $max_qty : 1000000000000 ) |
|
104 | - ) |
|
105 | - ) |
|
106 | - ); |
|
107 | - } else { |
|
108 | - printf( |
|
109 | - '<small class="d-sm-none text-muted form-text">%s</small>', |
|
110 | - sprintf( |
|
111 | - // translators: %s is the item quantity. |
|
112 | - esc_html__( 'Qty %s', 'invoicing' ), |
|
113 | - (float) $item->get_quantity() |
|
114 | - ) |
|
115 | - ); |
|
116 | - } |
|
117 | - |
|
118 | - if ( $has_featured_image ) { |
|
119 | - echo '</div>'; |
|
120 | - echo '</div>'; |
|
121 | - } |
|
122 | - } |
|
123 | - |
|
124 | - // Item price. |
|
125 | - if ( 'price' === $key ) { |
|
126 | - |
|
127 | - // Set the currency position. |
|
128 | - $position = wpinv_currency_position(); |
|
129 | - |
|
130 | - if ( 'left_space' === $position ) { |
|
131 | - $position = 'left'; |
|
132 | - } |
|
133 | - |
|
134 | - if ( 'right_space' === $position ) { |
|
135 | - $position = 'right'; |
|
136 | - } |
|
137 | - |
|
138 | - if ( $item->user_can_set_their_price() ) { |
|
139 | - $price = max( (float) $item->get_price(), (float) $item->get_minimum_price() ); |
|
140 | - $minimum = (float) $item->get_minimum_price(); |
|
141 | - $validate_minimum = ''; |
|
142 | - $class = ''; |
|
143 | - $data_minimum = ''; |
|
144 | - |
|
145 | - if ( $minimum > 0 ) { |
|
146 | - $validate_minimum = sprintf( |
|
147 | - // translators: %s is the minimum price. |
|
148 | - esc_attr__( 'The minimum allowed amount is %s', 'invoicing' ), |
|
149 | - wp_strip_all_tags( wpinv_price( $minimum, $currency ) ) |
|
150 | - ); |
|
151 | - |
|
152 | - $class = 'getpaid-validate-minimum-amount'; |
|
153 | - |
|
154 | - $data_minimum = "data-minimum-amount='" . esc_attr( getpaid_unstandardize_amount( $minimum ) ) . "'"; |
|
155 | - } |
|
156 | - |
|
157 | - ?> |
|
102 | + (float) $item->get_quantity() == 0 ? 1 : (float) $item->get_quantity(), |
|
103 | + floatval( null !== $max_qty ? $max_qty : 1000000000000 ) |
|
104 | + ) |
|
105 | + ) |
|
106 | + ); |
|
107 | + } else { |
|
108 | + printf( |
|
109 | + '<small class="d-sm-none text-muted form-text">%s</small>', |
|
110 | + sprintf( |
|
111 | + // translators: %s is the item quantity. |
|
112 | + esc_html__( 'Qty %s', 'invoicing' ), |
|
113 | + (float) $item->get_quantity() |
|
114 | + ) |
|
115 | + ); |
|
116 | + } |
|
117 | + |
|
118 | + if ( $has_featured_image ) { |
|
119 | + echo '</div>'; |
|
120 | + echo '</div>'; |
|
121 | + } |
|
122 | + } |
|
123 | + |
|
124 | + // Item price. |
|
125 | + if ( 'price' === $key ) { |
|
126 | + |
|
127 | + // Set the currency position. |
|
128 | + $position = wpinv_currency_position(); |
|
129 | + |
|
130 | + if ( 'left_space' === $position ) { |
|
131 | + $position = 'left'; |
|
132 | + } |
|
133 | + |
|
134 | + if ( 'right_space' === $position ) { |
|
135 | + $position = 'right'; |
|
136 | + } |
|
137 | + |
|
138 | + if ( $item->user_can_set_their_price() ) { |
|
139 | + $price = max( (float) $item->get_price(), (float) $item->get_minimum_price() ); |
|
140 | + $minimum = (float) $item->get_minimum_price(); |
|
141 | + $validate_minimum = ''; |
|
142 | + $class = ''; |
|
143 | + $data_minimum = ''; |
|
144 | + |
|
145 | + if ( $minimum > 0 ) { |
|
146 | + $validate_minimum = sprintf( |
|
147 | + // translators: %s is the minimum price. |
|
148 | + esc_attr__( 'The minimum allowed amount is %s', 'invoicing' ), |
|
149 | + wp_strip_all_tags( wpinv_price( $minimum, $currency ) ) |
|
150 | + ); |
|
151 | + |
|
152 | + $class = 'getpaid-validate-minimum-amount'; |
|
153 | + |
|
154 | + $data_minimum = "data-minimum-amount='" . esc_attr( getpaid_unstandardize_amount( $minimum ) ) . "'"; |
|
155 | + } |
|
156 | + |
|
157 | + ?> |
|
158 | 158 | <div class="input-group input-group-sm"> |
159 | 159 | <?php if ( 'left' === $position ) : ?> |
160 | 160 | <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
@@ -195,46 +195,46 @@ discard block |
||
195 | 195 | |
196 | 196 | <?php |
197 | 197 | |
198 | - } else { |
|
199 | - ?> |
|
198 | + } else { |
|
199 | + ?> |
|
200 | 200 | <span class="getpaid-items-<?php echo (int) $item->get_id(); ?>-view-price"> |
201 | 201 | <?php echo wp_kses_post( wpinv_price( $item->get_price(), $currency ) ); ?> |
202 | 202 | </span> |
203 | 203 | <input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][price]' type='hidden' class='getpaid-item-price-input' value='<?php echo esc_attr( $item->get_price() ); ?>'> |
204 | 204 | <?php |
205 | - } |
|
205 | + } |
|
206 | 206 | |
207 | - printf( |
|
207 | + printf( |
|
208 | 208 | '<small class="d-sm-none text-muted form-text getpaid-mobile-item-subtotal">%s</small>', |
209 | - // translators: %s is the item subtotal. |
|
209 | + // translators: %s is the item subtotal. |
|
210 | 210 | sprintf( esc_html__( 'Subtotal: %s', 'invoicing' ), wp_kses_post( wpinv_price( $item->get_sub_total(), $currency ) ) ) |
211 | 211 | ); |
212 | - } |
|
212 | + } |
|
213 | 213 | |
214 | - // Item quantity. |
|
215 | - if ( 'quantity' === $key ) { |
|
214 | + // Item quantity. |
|
215 | + if ( 'quantity' === $key ) { |
|
216 | 216 | |
217 | - if ( $item->allows_quantities() ) { |
|
218 | - ?> |
|
217 | + if ( $item->allows_quantities() ) { |
|
218 | + ?> |
|
219 | 219 | <input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][quantity]' type="number" step="any" style='width: 64px; line-height: 1; min-height: 35px;' class='getpaid-item-quantity-input p-1 align-middle font-weight-normal shadow-none m-0 rounded-0 text-center border' value='<?php echo (float) $item->get_quantity() == 0 ? 1 : (float) $item->get_quantity(); ?>' min='1' <?php echo null !== $max_qty ? 'max="' . (float) $max_qty . '"' : ''; ?> required> |
220 | 220 | <?php |
221 | - } else { |
|
222 | - ?> |
|
221 | + } else { |
|
222 | + ?> |
|
223 | 223 | <span class="getpaid-items-<?php echo (int) $item->get_id(); ?>-view-quantity"> |
224 | 224 | <?php echo (float) $item->get_quantity(); ?> |
225 | 225 | </span> |
226 | 226 | <input type='hidden' name='getpaid-items[<?php echo (int) $item->get_id(); ?>][quantity]' class='getpaid-item-quantity-input' value='<?php echo (float) $item->get_quantity(); ?>'> |
227 | 227 | <?php |
228 | - } |
|
228 | + } |
|
229 | 229 | } |
230 | 230 | |
231 | - // Item sub total. |
|
232 | - if ( 'subtotal' === $key ) { |
|
233 | - echo wp_kses_post( wpinv_price( $item->get_sub_total(), $currency ) ); |
|
234 | - } |
|
231 | + // Item sub total. |
|
232 | + if ( 'subtotal' === $key ) { |
|
233 | + echo wp_kses_post( wpinv_price( $item->get_sub_total(), $currency ) ); |
|
234 | + } |
|
235 | 235 | |
236 | - do_action( "getpaid_payment_form_cart_item_$key", $item, $form ); |
|
237 | - ?> |
|
236 | + do_action( "getpaid_payment_form_cart_item_$key", $item, $form ); |
|
237 | + ?> |
|
238 | 238 | |
239 | 239 | </div> |
240 | 240 |
@@ -9,28 +9,28 @@ discard block |
||
9 | 9 | * @var GetPaid_Form_Item $item |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) || exit; |
|
12 | +defined('ABSPATH') || exit; |
|
13 | 13 | |
14 | -do_action( 'getpaid_before_payment_form_cart_item', $form, $item ); |
|
14 | +do_action('getpaid_before_payment_form_cart_item', $form, $item); |
|
15 | 15 | |
16 | 16 | $currency = $form->get_currency(); |
17 | -$max_qty = wpinv_item_max_buyable_quantity( $item->get_id() ); |
|
17 | +$max_qty = wpinv_item_max_buyable_quantity($item->get_id()); |
|
18 | 18 | ?> |
19 | 19 | <div class='getpaid-payment-form-items-cart-item getpaid-<?php echo $item->is_required() ? 'required' : 'selectable'; ?> item-<?php echo (int) $item->get_id(); ?> border-bottom py-2 px-3'> |
20 | 20 | |
21 | 21 | <div class="form-row row align-items-center needs-validation"> |
22 | 22 | |
23 | - <?php foreach ( array_keys( $columns ) as $key ) : ?> |
|
23 | + <?php foreach (array_keys($columns) as $key) : ?> |
|
24 | 24 | |
25 | - <div class="<?php echo 'name' === $key ? 'col-6' : 'col'; ?> <?php echo ( in_array( $key, array( 'subtotal', 'quantity', 'tax_rate' ), true ) ) ? 'd-none d-sm-block' : ''; ?> position-relative getpaid-form-cart-item-<?php echo esc_attr( $key ); ?> getpaid-form-cart-item-<?php echo esc_attr( $key ); ?>-<?php echo (int) $item->get_id(); ?>"> |
|
25 | + <div class="<?php echo 'name' === $key ? 'col-6' : 'col'; ?> <?php echo (in_array($key, array('subtotal', 'quantity', 'tax_rate'), true)) ? 'd-none d-sm-block' : ''; ?> position-relative getpaid-form-cart-item-<?php echo esc_attr($key); ?> getpaid-form-cart-item-<?php echo esc_attr($key); ?>-<?php echo (int) $item->get_id(); ?>"> |
|
26 | 26 | |
27 | 27 | <?php |
28 | 28 | |
29 | 29 | // Fires before printing a line item column. |
30 | - do_action( "getpaid_form_cart_item_before_$key", $item, $form ); |
|
30 | + do_action("getpaid_form_cart_item_before_$key", $item, $form); |
|
31 | 31 | |
32 | 32 | // Item name. |
33 | - if ( 'name' === $key ) { |
|
33 | + if ('name' === $key) { |
|
34 | 34 | |
35 | 35 | |
36 | 36 | ob_start(); |
@@ -38,22 +38,22 @@ discard block |
||
38 | 38 | // Add an optional description. |
39 | 39 | $description = $item->get_description(); |
40 | 40 | |
41 | - if ( ! empty( $description ) ) { |
|
42 | - echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
41 | + if (!empty($description)) { |
|
42 | + echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post($description) . '</small>'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | // Price help text. |
46 | - $description = getpaid_item_recurring_price_help_text( $item, $currency ); |
|
47 | - if ( $description ) { |
|
48 | - echo "<small class='getpaid-form-item-price-desc form-text text-muted font-italic pr-2 m-0'>" . wp_kses_post( $description ) . '</small>'; |
|
46 | + $description = getpaid_item_recurring_price_help_text($item, $currency); |
|
47 | + if ($description) { |
|
48 | + echo "<small class='getpaid-form-item-price-desc form-text text-muted font-italic pr-2 m-0'>" . wp_kses_post($description) . '</small>'; |
|
49 | 49 | } |
50 | 50 | |
51 | - do_action( 'getpaid_payment_form_cart_item_description', $item, $form ); |
|
51 | + do_action('getpaid_payment_form_cart_item_description', $item, $form); |
|
52 | 52 | |
53 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
53 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
54 | 54 | |
55 | 55 | edit_post_link( |
56 | - __( 'Edit this item.', 'invoicing' ), |
|
56 | + __('Edit this item.', 'invoicing'), |
|
57 | 57 | '<small class="form-text text-muted">', |
58 | 58 | '</small>', |
59 | 59 | $item->get_id(), |
@@ -65,30 +65,30 @@ discard block |
||
65 | 65 | $description = ob_get_clean(); |
66 | 66 | |
67 | 67 | // Display the name. |
68 | - $tootip = empty( $description ) ? '' : ' <i class="fas fa-xs fa-info gp-tooltip d-sm-none text-muted"></i>'; |
|
68 | + $tootip = empty($description) ? '' : ' <i class="fas fa-xs fa-info gp-tooltip d-sm-none text-muted"></i>'; |
|
69 | 69 | |
70 | - $has_featured_image = has_post_thumbnail( $item->get_id() ); |
|
70 | + $has_featured_image = has_post_thumbnail($item->get_id()); |
|
71 | 71 | |
72 | - if ( $has_featured_image ) { |
|
72 | + if ($has_featured_image) { |
|
73 | 73 | echo '<div class="d-flex align-items-center getpaid-form-item-has-featured-image">'; |
74 | 74 | echo '<div class="getpaid-form-item-image-container mr-2" style="width:85px;">'; |
75 | - echo get_the_post_thumbnail( $item->get_id(), array( 75, 75 ), array( 'class' => 'getpaid-form-item-image mb-0' ) ); |
|
75 | + echo get_the_post_thumbnail($item->get_id(), array(75, 75), array('class' => 'getpaid-form-item-image mb-0')); |
|
76 | 76 | echo '</div>'; |
77 | 77 | echo '<div class="getpaid-form-item-name-container">'; |
78 | 78 | } |
79 | 79 | |
80 | - echo '<div class="mb-1 font-weight-bold">' . esc_html( $item->get_name() ) . wp_kses_post( $tootip ) . '</div>'; |
|
80 | + echo '<div class="mb-1 font-weight-bold">' . esc_html($item->get_name()) . wp_kses_post($tootip) . '</div>'; |
|
81 | 81 | |
82 | - if ( ! empty( $description ) ) { |
|
83 | - printf( '<span class="d-none d-sm-block getpaid-item-desc">%s</span>', wp_kses_post( $description ) ); |
|
82 | + if (!empty($description)) { |
|
83 | + printf('<span class="d-none d-sm-block getpaid-item-desc">%s</span>', wp_kses_post($description)); |
|
84 | 84 | } |
85 | 85 | |
86 | - if ( $item->allows_quantities() ) { |
|
86 | + if ($item->allows_quantities()) { |
|
87 | 87 | printf( |
88 | 88 | '<small class="d-sm-none text-muted form-text">%s</small>', |
89 | 89 | sprintf( |
90 | 90 | // translators: %s is the item quantity. |
91 | - esc_html__( 'Qty %s', 'invoicing' ), |
|
91 | + esc_html__('Qty %s', 'invoicing'), |
|
92 | 92 | sprintf( |
93 | 93 | '<input |
94 | 94 | type="number" |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | max="%s" |
101 | 101 | >', |
102 | 102 | (float) $item->get_quantity() == 0 ? 1 : (float) $item->get_quantity(), |
103 | - floatval( null !== $max_qty ? $max_qty : 1000000000000 ) |
|
103 | + floatval(null !== $max_qty ? $max_qty : 1000000000000) |
|
104 | 104 | ) |
105 | 105 | ) |
106 | 106 | ); |
@@ -109,85 +109,85 @@ discard block |
||
109 | 109 | '<small class="d-sm-none text-muted form-text">%s</small>', |
110 | 110 | sprintf( |
111 | 111 | // translators: %s is the item quantity. |
112 | - esc_html__( 'Qty %s', 'invoicing' ), |
|
112 | + esc_html__('Qty %s', 'invoicing'), |
|
113 | 113 | (float) $item->get_quantity() |
114 | 114 | ) |
115 | 115 | ); |
116 | 116 | } |
117 | 117 | |
118 | - if ( $has_featured_image ) { |
|
118 | + if ($has_featured_image) { |
|
119 | 119 | echo '</div>'; |
120 | 120 | echo '</div>'; |
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | 124 | // Item price. |
125 | - if ( 'price' === $key ) { |
|
125 | + if ('price' === $key) { |
|
126 | 126 | |
127 | 127 | // Set the currency position. |
128 | 128 | $position = wpinv_currency_position(); |
129 | 129 | |
130 | - if ( 'left_space' === $position ) { |
|
130 | + if ('left_space' === $position) { |
|
131 | 131 | $position = 'left'; |
132 | 132 | } |
133 | 133 | |
134 | - if ( 'right_space' === $position ) { |
|
134 | + if ('right_space' === $position) { |
|
135 | 135 | $position = 'right'; |
136 | 136 | } |
137 | 137 | |
138 | - if ( $item->user_can_set_their_price() ) { |
|
139 | - $price = max( (float) $item->get_price(), (float) $item->get_minimum_price() ); |
|
138 | + if ($item->user_can_set_their_price()) { |
|
139 | + $price = max((float) $item->get_price(), (float) $item->get_minimum_price()); |
|
140 | 140 | $minimum = (float) $item->get_minimum_price(); |
141 | 141 | $validate_minimum = ''; |
142 | 142 | $class = ''; |
143 | 143 | $data_minimum = ''; |
144 | 144 | |
145 | - if ( $minimum > 0 ) { |
|
145 | + if ($minimum > 0) { |
|
146 | 146 | $validate_minimum = sprintf( |
147 | 147 | // translators: %s is the minimum price. |
148 | - esc_attr__( 'The minimum allowed amount is %s', 'invoicing' ), |
|
149 | - wp_strip_all_tags( wpinv_price( $minimum, $currency ) ) |
|
148 | + esc_attr__('The minimum allowed amount is %s', 'invoicing'), |
|
149 | + wp_strip_all_tags(wpinv_price($minimum, $currency)) |
|
150 | 150 | ); |
151 | 151 | |
152 | 152 | $class = 'getpaid-validate-minimum-amount'; |
153 | 153 | |
154 | - $data_minimum = "data-minimum-amount='" . esc_attr( getpaid_unstandardize_amount( $minimum ) ) . "'"; |
|
154 | + $data_minimum = "data-minimum-amount='" . esc_attr(getpaid_unstandardize_amount($minimum)) . "'"; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | ?> |
158 | 158 | <div class="input-group input-group-sm"> |
159 | - <?php if ( 'left' === $position ) : ?> |
|
160 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
159 | + <?php if ('left' === $position) : ?> |
|
160 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
161 | 161 | <div class="input-group-prepend "> |
162 | 162 | <span class="input-group-text"> |
163 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
163 | + <?php echo wp_kses_post(wpinv_currency_symbol($currency)); ?></span> |
|
164 | 164 | </span> |
165 | 165 | </div> |
166 | 166 | <?php else : ?> |
167 | 167 | <span class="input-group-text"> |
168 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
168 | + <?php echo wp_kses_post(wpinv_currency_symbol($currency)); ?></span> |
|
169 | 169 | </span> |
170 | 170 | <?php endif; ?> |
171 | 171 | <?php endif; ?> |
172 | 172 | |
173 | - <input type="number" step="0.01" <?php echo wp_kses_post( $data_minimum ); ?> name="getpaid-items[<?php echo (int) $item->get_id(); ?>][price]" value="<?php echo esc_attr( getpaid_unstandardize_amount( $price ) ); ?>" placeholder="<?php echo esc_attr( getpaid_unstandardize_amount( $item->get_minimum_price() ) ); ?>" class="getpaid-item-price-input p-1 align-middle font-weight-normal shadow-none m-0 rounded-0 text-center border <?php echo esc_attr( $class ); ?>" style="width: 64px; line-height: 1; min-height: 35px;"> |
|
173 | + <input type="number" step="0.01" <?php echo wp_kses_post($data_minimum); ?> name="getpaid-items[<?php echo (int) $item->get_id(); ?>][price]" value="<?php echo esc_attr(getpaid_unstandardize_amount($price)); ?>" placeholder="<?php echo esc_attr(getpaid_unstandardize_amount($item->get_minimum_price())); ?>" class="getpaid-item-price-input p-1 align-middle font-weight-normal shadow-none m-0 rounded-0 text-center border <?php echo esc_attr($class); ?>" style="width: 64px; line-height: 1; min-height: 35px;"> |
|
174 | 174 | |
175 | - <?php if ( ! empty( $validate_minimum ) ) : ?> |
|
175 | + <?php if (!empty($validate_minimum)) : ?> |
|
176 | 176 | <div class="invalid-tooltip"> |
177 | - <?php echo wp_kses_post( $validate_minimum ); ?> |
|
177 | + <?php echo wp_kses_post($validate_minimum); ?> |
|
178 | 178 | </div> |
179 | 179 | <?php endif; ?> |
180 | 180 | |
181 | - <?php if ( 'left' !== $position ) : ?> |
|
182 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
181 | + <?php if ('left' !== $position) : ?> |
|
182 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
183 | 183 | <div class="input-group-append "> |
184 | 184 | <span class="input-group-text"> |
185 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
185 | + <?php echo wp_kses_post(wpinv_currency_symbol($currency)); ?></span> |
|
186 | 186 | </span> |
187 | 187 | </div> |
188 | 188 | <?php else : ?> |
189 | 189 | <span class="input-group-text"> |
190 | - <?php echo wp_kses_post( wpinv_currency_symbol( $currency ) ); ?></span> |
|
190 | + <?php echo wp_kses_post(wpinv_currency_symbol($currency)); ?></span> |
|
191 | 191 | </span> |
192 | 192 | <?php endif; ?> |
193 | 193 | <?php endif; ?> |
@@ -198,23 +198,23 @@ discard block |
||
198 | 198 | } else { |
199 | 199 | ?> |
200 | 200 | <span class="getpaid-items-<?php echo (int) $item->get_id(); ?>-view-price"> |
201 | - <?php echo wp_kses_post( wpinv_price( $item->get_price(), $currency ) ); ?> |
|
201 | + <?php echo wp_kses_post(wpinv_price($item->get_price(), $currency)); ?> |
|
202 | 202 | </span> |
203 | - <input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][price]' type='hidden' class='getpaid-item-price-input' value='<?php echo esc_attr( $item->get_price() ); ?>'> |
|
203 | + <input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][price]' type='hidden' class='getpaid-item-price-input' value='<?php echo esc_attr($item->get_price()); ?>'> |
|
204 | 204 | <?php |
205 | 205 | } |
206 | 206 | |
207 | 207 | printf( |
208 | 208 | '<small class="d-sm-none text-muted form-text getpaid-mobile-item-subtotal">%s</small>', |
209 | 209 | // translators: %s is the item subtotal. |
210 | - sprintf( esc_html__( 'Subtotal: %s', 'invoicing' ), wp_kses_post( wpinv_price( $item->get_sub_total(), $currency ) ) ) |
|
210 | + sprintf(esc_html__('Subtotal: %s', 'invoicing'), wp_kses_post(wpinv_price($item->get_sub_total(), $currency))) |
|
211 | 211 | ); |
212 | 212 | } |
213 | 213 | |
214 | 214 | // Item quantity. |
215 | - if ( 'quantity' === $key ) { |
|
215 | + if ('quantity' === $key) { |
|
216 | 216 | |
217 | - if ( $item->allows_quantities() ) { |
|
217 | + if ($item->allows_quantities()) { |
|
218 | 218 | ?> |
219 | 219 | <input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][quantity]' type="number" step="any" style='width: 64px; line-height: 1; min-height: 35px;' class='getpaid-item-quantity-input p-1 align-middle font-weight-normal shadow-none m-0 rounded-0 text-center border' value='<?php echo (float) $item->get_quantity() == 0 ? 1 : (float) $item->get_quantity(); ?>' min='1' <?php echo null !== $max_qty ? 'max="' . (float) $max_qty . '"' : ''; ?> required> |
220 | 220 | <?php |
@@ -229,11 +229,11 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | // Item sub total. |
232 | - if ( 'subtotal' === $key ) { |
|
233 | - echo wp_kses_post( wpinv_price( $item->get_sub_total(), $currency ) ); |
|
232 | + if ('subtotal' === $key) { |
|
233 | + echo wp_kses_post(wpinv_price($item->get_sub_total(), $currency)); |
|
234 | 234 | } |
235 | 235 | |
236 | - do_action( "getpaid_payment_form_cart_item_$key", $item, $form ); |
|
236 | + do_action("getpaid_payment_form_cart_item_$key", $item, $form); |
|
237 | 237 | ?> |
238 | 238 | |
239 | 239 | </div> |
@@ -244,4 +244,4 @@ discard block |
||
244 | 244 | |
245 | 245 | </div> |
246 | 246 | <?php |
247 | -do_action( 'getpaid_payment_form_cart_item', $form, $item ); |
|
247 | +do_action('getpaid_payment_form_cart_item', $form, $item); |
@@ -7,16 +7,16 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Set the currency position. |
13 | 13 | $position = wpinv_currency_position(); |
14 | 14 | |
15 | -if ( $position == 'left_space' ) { |
|
15 | +if ($position == 'left_space') { |
|
16 | 16 | $position = 'left'; |
17 | 17 | } |
18 | 18 | |
19 | -if ( $position == 'right_space' ) { |
|
19 | +if ($position == 'right_space') { |
|
20 | 20 | $position = 'right'; |
21 | 21 | } |
22 | 22 | |
@@ -26,25 +26,25 @@ discard block |
||
26 | 26 | |
27 | 27 | <div class="input-group"> |
28 | 28 | |
29 | - <?php if ( $position == 'left' ) : ?> |
|
30 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
29 | + <?php if ($position == 'left') : ?> |
|
30 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
31 | 31 | <div class="input-group-prepend "> |
32 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
32 | + <span class="input-group-text"><?php echo wp_kses_post(wpinv_currency_symbol()); ?></span> |
|
33 | 33 | </div> |
34 | 34 | <?php else : ?> |
35 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
35 | + <span class="input-group-text"><?php echo wp_kses_post(wpinv_currency_symbol()); ?></span> |
|
36 | 36 | <?php endif; ?> |
37 | 37 | <?php endif; ?> |
38 | 38 | |
39 | 39 | <input :placeholder='form_element.placeholder' class='form-control' type='text'> |
40 | 40 | |
41 | - <?php if ( $position == 'right' ) : ?> |
|
42 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
41 | + <?php if ($position == 'right') : ?> |
|
42 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
43 | 43 | <div class="input-group-append "> |
44 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
44 | + <span class="input-group-text"><?php echo wp_kses_post(wpinv_currency_symbol()); ?></span> |
|
45 | 45 | </div> |
46 | 46 | <?php else : ?> |
47 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
47 | + <span class="input-group-text"><?php echo wp_kses_post(wpinv_currency_symbol()); ?></span> |
|
48 | 48 | <?php endif; ?> |
49 | 49 | <?php endif; ?> |
50 | 50 | </div> |
@@ -31,8 +31,11 @@ discard block |
||
31 | 31 | <div class="input-group-prepend "> |
32 | 32 | <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
33 | 33 | </div> |
34 | - <?php else : ?> |
|
35 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
34 | + <?php else { |
|
35 | + : ?> |
|
36 | + <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); |
|
37 | +} |
|
38 | +?></span> |
|
36 | 39 | <?php endif; ?> |
37 | 40 | <?php endif; ?> |
38 | 41 | |
@@ -43,8 +46,11 @@ discard block |
||
43 | 46 | <div class="input-group-append "> |
44 | 47 | <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
45 | 48 | </div> |
46 | - <?php else : ?> |
|
47 | - <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); ?></span> |
|
49 | + <?php else { |
|
50 | + : ?> |
|
51 | + <span class="input-group-text"><?php echo wp_kses_post( wpinv_currency_symbol() ); |
|
52 | +} |
|
53 | +?></span> |
|
48 | 54 | <?php endif; ?> |
49 | 55 | <?php endif; ?> |
50 | 56 | </div> |
@@ -63,9 +63,12 @@ |
||
63 | 63 | <div class="input-group-append "> |
64 | 64 | <button class='button button-secondary border' type='button' @click.prevent='active_form_element.options.splice(index, 1)'><span class='dashicons dashicons-trash'></span></button> |
65 | 65 | </div> |
66 | - <?php else : ?> |
|
66 | + <?php else { |
|
67 | + : ?> |
|
67 | 68 | <button class='button button-secondary border' type='button' @click.prevent='active_form_element.options.splice(index, 1)'><span class='dashicons dashicons-trash'></span></button> |
68 | - <?php endif; ?> |
|
69 | + <?php endif; |
|
70 | +} |
|
71 | +?> |
|
69 | 72 | </div> |
70 | 73 | |
71 | 74 | <div class='form-group mb-3'> |
@@ -7,59 +7,59 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class='form-group mb-3'> |
15 | 15 | <label class="form-label d-block"> |
16 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
17 | 17 | <input v-model='active_form_element.label' class='form-control' type="text"/> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group mb-3'> |
22 | 22 | <label class="form-label d-block"> |
23 | - <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span> |
|
23 | + <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span> |
|
24 | 24 | <input v-model='active_form_element.placeholder' class='form-control' type="text"/> |
25 | 25 | </label> |
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <div class='form-group mb-3'> |
29 | 29 | <label class="form-label d-block"> |
30 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
31 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
32 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
30 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
31 | + <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
32 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
33 | 33 | </label> |
34 | 34 | </div> |
35 | 35 | |
36 | 36 | <div class='form-group mb-3 form-check'> |
37 | 37 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
38 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
38 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <div class='form-group mb-3 form-check'> |
42 | 42 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
43 | - <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label> |
|
43 | + <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label> |
|
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <hr class='featurette-divider mt-4'> |
47 | 47 | |
48 | 48 | <div class='form-group mb-3'> |
49 | 49 | <label class="form-label d-block"> |
50 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
50 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
51 | 51 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
52 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
52 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
53 | 53 | </label> |
54 | 54 | </div> |
55 | 55 | |
56 | 56 | <hr class='featurette-divider mt-4'> |
57 | 57 | |
58 | -<h5><?php esc_html_e( 'Available Options', 'invoicing' ); ?></h5> |
|
58 | +<h5><?php esc_html_e('Available Options', 'invoicing'); ?></h5> |
|
59 | 59 | |
60 | 60 | <div class='form-group mb-3 input-group' v-for='(option, index) in active_form_element.options'> |
61 | 61 | <input type='text' class='form-control' v-model='active_form_element.options[index]'> |
62 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
62 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
63 | 63 | <div class="input-group-append "> |
64 | 64 | <button class='button button-secondary border' type='button' @click.prevent='active_form_element.options.splice(index, 1)'><span class='dashicons dashicons-trash'></span></button> |
65 | 65 | </div> |
@@ -69,5 +69,5 @@ discard block |
||
69 | 69 | </div> |
70 | 70 | |
71 | 71 | <div class='form-group mb-3'> |
72 | - <button class='button button-secondary' type='button' @click.prevent='active_form_element.options.push("")'><?php esc_html_e( 'Add Option', 'invoicing' ); ?></button> |
|
72 | + <button class='button button-secondary' type='button' @click.prevent='active_form_element.options.push("")'><?php esc_html_e('Add Option', 'invoicing'); ?></button> |
|
73 | 73 | </div> |
@@ -7,13 +7,13 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class='wpinv-address-wrapper row'> |
15 | 15 | |
16 | - <h4 v-if="form_element.address_type == 'both'" class="col-12 mb-3"><?php esc_html_e( 'Billing / Shipping Address', 'invoicing' ); ?></h4> |
|
16 | + <h4 v-if="form_element.address_type == 'both'" class="col-12 mb-3"><?php esc_html_e('Billing / Shipping Address', 'invoicing'); ?></h4> |
|
17 | 17 | |
18 | 18 | <div class='form-group mb-3 address-field-preview wpinv-payment-form-field-preview' v-for='(field, index) in visible_fields( form_element.fields )' :class='grid_class( field )' :key='field.name'> |
19 | 19 | <label class="form-label d-block w-100"> |
@@ -7,49 +7,49 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class='form-group mb-3'> |
15 | 15 | <label class="form-label d-block"> |
16 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
17 | 17 | <input v-model='active_form_element.label' class='form-control' type="text"/> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group mb-3'> |
22 | 22 | <label class="form-label d-block"> |
23 | - <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span> |
|
23 | + <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span> |
|
24 | 24 | <input v-model='active_form_element.placeholder' class='form-control' type="text"/> |
25 | 25 | </label> |
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <div class='form-group mb-3'> |
29 | 29 | <label class="form-label d-block"> |
30 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
31 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
32 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
30 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
31 | + <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
32 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
33 | 33 | </label> |
34 | 34 | </div> |
35 | 35 | |
36 | 36 | <div class='form-group mb-3 form-check'> |
37 | 37 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
38 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
38 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <div class='form-group mb-3 form-check'> |
42 | 42 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
43 | - <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label> |
|
43 | + <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label> |
|
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <hr class='featurette-divider mt-4'> |
47 | 47 | |
48 | 48 | <div class='form-group mb-3'> |
49 | 49 | <label class="form-label d-block"> |
50 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
50 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
51 | 51 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
52 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
52 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
53 | 53 | </label> |
54 | 54 | </div> |
55 | 55 |
@@ -7,31 +7,31 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class='form-group mb-3'> |
15 | 15 | <label class="form-label d-block"> |
16 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
17 | 17 | <input v-model="active_form_element.label" class="form-control" type="text"/> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group mb-3'> |
22 | 22 | <label class="form-label d-block"> |
23 | - <span><?php esc_html_e( 'Max File Number', 'invoicing' ); ?></span> |
|
23 | + <span><?php esc_html_e('Max File Number', 'invoicing'); ?></span> |
|
24 | 24 | <input v-model="active_form_element.max_file_num" class="form-control" min="1" type="number" /> |
25 | - <small class="form-text text-muted"><?php esc_html_e( 'How many files can be uploaded?', 'invoicing' ); ?></small> |
|
25 | + <small class="form-text text-muted"><?php esc_html_e('How many files can be uploaded?', 'invoicing'); ?></small> |
|
26 | 26 | </label> |
27 | 27 | </div> |
28 | 28 | |
29 | 29 | <div class='form-group mb-3'> |
30 | 30 | <label class="form-label d-block"> |
31 | - <span><?php esc_html_e( 'Allowed File types', 'invoicing' ); ?></span> |
|
31 | + <span><?php esc_html_e('Allowed File types', 'invoicing'); ?></span> |
|
32 | 32 | <gpselect2 class='form-control custom-select' v-model='active_form_element.file_types' multiple> |
33 | - <?php foreach ( getpaid_get_allowed_mime_types() as $ext_regex => $mime_type ) : ?> |
|
34 | - <option value="<?php echo esc_attr( $ext_regex ); ?>"><?php echo esc_html( "$mime_type" ); ?></option> |
|
33 | + <?php foreach (getpaid_get_allowed_mime_types() as $ext_regex => $mime_type) : ?> |
|
34 | + <option value="<?php echo esc_attr($ext_regex); ?>"><?php echo esc_html("$mime_type"); ?></option> |
|
35 | 35 | <?php endforeach; ?> |
36 | 36 | </gpselect2> |
37 | 37 | </label> |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | |
40 | 40 | <div class='form-group mb-3'> |
41 | 41 | <label class="form-label d-block"> |
42 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
43 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
44 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
42 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
43 | + <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
44 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
45 | 45 | </label> |
46 | 46 | </div> |
47 | 47 | |
@@ -49,20 +49,20 @@ discard block |
||
49 | 49 | |
50 | 50 | <div class='form-group mb-3 form-check'> |
51 | 51 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
52 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
52 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
53 | 53 | </div> |
54 | 54 | |
55 | 55 | <div class='form-group mb-3 form-check'> |
56 | 56 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
57 | - <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label> |
|
57 | + <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label> |
|
58 | 58 | </div> |
59 | 59 | |
60 | 60 | <hr class='featurette-divider mt-4'> |
61 | 61 | |
62 | 62 | <div class='form-group mb-3'> |
63 | 63 | <label class="form-label d-block"> |
64 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
64 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
65 | 65 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
66 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
66 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
67 | 67 | </label> |
68 | 68 | </div> |
@@ -7,47 +7,47 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <small class='form-text text-muted mb-2'> |
15 | - <?php esc_html_e( 'The amount that users add to this field will be added to the total amount for this form', 'invoicing' ); ?> |
|
15 | + <?php esc_html_e('The amount that users add to this field will be added to the total amount for this form', 'invoicing'); ?> |
|
16 | 16 | </small> |
17 | 17 | |
18 | 18 | <div class='form-group mb-3'> |
19 | 19 | <label class="form-label d-block"> |
20 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
20 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
21 | 21 | <input v-model='active_form_element.label' class='form-control' type="text"/> |
22 | 22 | </label> |
23 | 23 | </div> |
24 | 24 | |
25 | 25 | <div class='form-group mb-3'> |
26 | 26 | <label class="form-label d-block"> |
27 | - <span><?php esc_html_e( 'Default Amount', 'invoicing' ); ?></span> |
|
27 | + <span><?php esc_html_e('Default Amount', 'invoicing'); ?></span> |
|
28 | 28 | <input v-model='active_form_element.value' class='form-control' type="text"/> |
29 | 29 | </label> |
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <div class='form-group mb-3'> |
33 | 33 | <label class="form-label d-block"> |
34 | - <span><?php esc_html_e( 'Minimum Amount', 'invoicing' ); ?></span> |
|
34 | + <span><?php esc_html_e('Minimum Amount', 'invoicing'); ?></span> |
|
35 | 35 | <input v-model='active_form_element.minimum' class='form-control' type="text"/> |
36 | 36 | </label> |
37 | 37 | </div> |
38 | 38 | |
39 | 39 | <div class='form-group mb-3'> |
40 | 40 | <label class="form-label d-block"> |
41 | - <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span> |
|
41 | + <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span> |
|
42 | 42 | <input v-model='active_form_element.placeholder' class='form-control' type="text"/> |
43 | 43 | </label> |
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <div class='form-group mb-3'> |
47 | 47 | <label class="form-label d-block"> |
48 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
49 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
50 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
48 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
49 | + <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
50 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
51 | 51 | </label> |
52 | 52 | </div> |
53 | 53 | |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | |
56 | 56 | <div class='form-group mb-3'> |
57 | 57 | <label class="form-label d-block"> |
58 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
58 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
59 | 59 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
60 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
60 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
61 | 61 | </label> |
62 | 62 | </div> |
63 | 63 |
@@ -7,10 +7,10 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <div class='form-group mb-3'> |
14 | - <label class="form-label" :for="active_form_element.id + '_edit'"><?php esc_html_e( 'The IP Address text', 'invoicing' ); ?></label> |
|
14 | + <label class="form-label" :for="active_form_element.id + '_edit'"><?php esc_html_e('The IP Address text', 'invoicing'); ?></label> |
|
15 | 15 | <textarea :id="active_form_element.id + '_edit'" v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
16 | 16 | </div> |
@@ -7,33 +7,33 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class='form-group mb-3'> |
15 | 15 | <label class="form-label d-block"> |
16 | - <span><?php esc_html_e( 'Alert Text', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Alert Text', 'invoicing'); ?></span> |
|
17 | 17 | <textarea v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group mb-3 form-check'> |
22 | 22 | <input :id="active_form_element.id + '_edit_dismissible'" v-model='active_form_element.dismissible' type='checkbox' class='form-check-input' /> |
23 | - <label class='form-check-label' :for="active_form_element.id + '_edit_dismissible'"><?php esc_html_e( 'Is Dismissible?', 'invoicing' ); ?></label> |
|
23 | + <label class='form-check-label' :for="active_form_element.id + '_edit_dismissible'"><?php esc_html_e('Is Dismissible?', 'invoicing'); ?></label> |
|
24 | 24 | </div> |
25 | 25 | |
26 | 26 | <div class='form-group mb-3'> |
27 | - <label :for="active_form_element.id + '_edit_type'"><?php esc_html_e( 'Alert Type', 'invoicing' ); ?></label> |
|
27 | + <label :for="active_form_element.id + '_edit_type'"><?php esc_html_e('Alert Type', 'invoicing'); ?></label> |
|
28 | 28 | <select class='form-control custom-select' :id="active_form_element.id + '_edit_type'" v-model='active_form_element.class'> |
29 | - <option value='alert-primary'><?php esc_html_e( 'Primary', 'invoicing' ); ?></option> |
|
30 | - <option value='alert-secondary'><?php esc_html_e( 'Secondary', 'invoicing' ); ?></option> |
|
31 | - <option value='alert-success'><?php esc_html_e( 'Success', 'invoicing' ); ?></option> |
|
32 | - <option value='alert-danger'><?php esc_html_e( 'Danger', 'invoicing' ); ?></option> |
|
33 | - <option value='alert-warning'><?php esc_html_e( 'Warning', 'invoicing' ); ?></option> |
|
34 | - <option value='alert-info'><?php esc_html_e( 'Info', 'invoicing' ); ?></option> |
|
35 | - <option value='alert-light'><?php esc_html_e( 'Light', 'invoicing' ); ?></option> |
|
36 | - <option value='alert-dark'><?php esc_html_e( 'Dark', 'invoicing' ); ?></option> |
|
37 | - <option value='alert-link'><?php esc_html_e( 'Link', 'invoicing' ); ?></option> |
|
29 | + <option value='alert-primary'><?php esc_html_e('Primary', 'invoicing'); ?></option> |
|
30 | + <option value='alert-secondary'><?php esc_html_e('Secondary', 'invoicing'); ?></option> |
|
31 | + <option value='alert-success'><?php esc_html_e('Success', 'invoicing'); ?></option> |
|
32 | + <option value='alert-danger'><?php esc_html_e('Danger', 'invoicing'); ?></option> |
|
33 | + <option value='alert-warning'><?php esc_html_e('Warning', 'invoicing'); ?></option> |
|
34 | + <option value='alert-info'><?php esc_html_e('Info', 'invoicing'); ?></option> |
|
35 | + <option value='alert-light'><?php esc_html_e('Light', 'invoicing'); ?></option> |
|
36 | + <option value='alert-dark'><?php esc_html_e('Dark', 'invoicing'); ?></option> |
|
37 | + <option value='alert-link'><?php esc_html_e('Link', 'invoicing'); ?></option> |
|
38 | 38 | </select> |
39 | 39 | </div> |