@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * |
5 | 5 | */ |
6 | 6 | |
7 | -defined( 'ABSPATH' ) || exit; |
|
7 | +defined('ABSPATH') || exit; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Authorize.net Legacy Payment Gateway class. |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | * @param WPInv_Invoice $invoice Invoice. |
29 | 29 | * @return string |
30 | 30 | */ |
31 | - public function get_api_url( $invoice ) { |
|
32 | - return $this->is_sandbox( $invoice ) ? 'https://apitest.authorize.net/xml/v1/request.api' : 'https://api.authorize.net/xml/v1/request.api'; |
|
31 | + public function get_api_url($invoice) { |
|
32 | + return $this->is_sandbox($invoice) ? 'https://apitest.authorize.net/xml/v1/request.api' : 'https://api.authorize.net/xml/v1/request.api'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -40,40 +40,40 @@ discard block |
||
40 | 40 | * @param WPInv_Invoice $invoice Invoice. |
41 | 41 | * @return stdClass|WP_Error |
42 | 42 | */ |
43 | - public function post( $post, $invoice ){ |
|
43 | + public function post($post, $invoice) { |
|
44 | 44 | |
45 | - $url = $this->get_api_url( $invoice ); |
|
45 | + $url = $this->get_api_url($invoice); |
|
46 | 46 | $response = wp_remote_post( |
47 | 47 | $url, |
48 | 48 | array( |
49 | 49 | 'headers' => array( |
50 | 50 | 'Content-Type' => 'application/json; charset=utf-8' |
51 | 51 | ), |
52 | - 'body' => json_encode( $post ), |
|
52 | + 'body' => json_encode($post), |
|
53 | 53 | 'method' => 'POST' |
54 | 54 | ) |
55 | 55 | ); |
56 | 56 | |
57 | - if ( is_wp_error( $response ) ) { |
|
57 | + if (is_wp_error($response)) { |
|
58 | 58 | return $response; |
59 | 59 | } |
60 | 60 | |
61 | - $response = wp_unslash( wp_remote_retrieve_body( $response ) ); |
|
61 | + $response = wp_unslash(wp_remote_retrieve_body($response)); |
|
62 | 62 | $response = preg_replace('/\xEF\xBB\xBF/', '', $response); // https://community.developer.authorize.net/t5/Integration-and-Testing/JSON-issues/td-p/48851 |
63 | - $response = json_decode( $response ); |
|
63 | + $response = json_decode($response); |
|
64 | 64 | |
65 | - if ( empty( $response ) ) { |
|
66 | - return new WP_Error( 'invalid_reponse', __( 'Invalid gateway response', 'invoicing' ) ); |
|
65 | + if (empty($response)) { |
|
66 | + return new WP_Error('invalid_reponse', __('Invalid gateway response', 'invoicing')); |
|
67 | 67 | } |
68 | 68 | |
69 | - if ( $response->messages->resultCode == 'Error' ) { |
|
69 | + if ($response->messages->resultCode == 'Error') { |
|
70 | 70 | |
71 | - if ( ! empty( $response->transactionResponse ) && ! empty( $response->transactionResponse->errors ) ) { |
|
71 | + if (!empty($response->transactionResponse) && !empty($response->transactionResponse->errors)) { |
|
72 | 72 | $error = $response->transactionResponse->errors[0]; |
73 | - return new WP_Error( $error->errorCode, $error->errorText ); |
|
73 | + return new WP_Error($error->errorCode, $error->errorText); |
|
74 | 74 | } |
75 | 75 | |
76 | - return new WP_Error( $response->messages->message[0]->code, $response->messages->message[0]->text ); |
|
76 | + return new WP_Error($response->messages->message[0]->code, $response->messages->message[0]->text); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return $response; |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | public function get_auth_params() { |
90 | 90 | |
91 | 91 | return array( |
92 | - 'name' => $this->get_option( 'login_id' ), |
|
93 | - 'transactionKey' => $this->get_option( 'transaction_key' ), |
|
92 | + 'name' => $this->get_option('login_id'), |
|
93 | + 'transactionKey' => $this->get_option('transaction_key'), |
|
94 | 94 | ); |
95 | 95 | |
96 | 96 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @param WPInv_Subscription $subscription Subscription. |
103 | 103 | * @param WPInv_Invoice $invoice Invoice. |
104 | 104 | */ |
105 | - public function cancel_subscription( $subscription, $invoice ) { |
|
105 | + public function cancel_subscription($subscription, $invoice) { |
|
106 | 106 | |
107 | 107 | // Backwards compatibility. New version do not use authorize.net subscriptions. |
108 | 108 | $this->post( |
@@ -127,38 +127,38 @@ discard block |
||
127 | 127 | $this->maybe_process_old_ipn(); |
128 | 128 | |
129 | 129 | // Validate the IPN. |
130 | - if ( empty( $_POST ) || ! $this->validate_ipn() ) { |
|
131 | - wp_die( 'Authorize.NET IPN Request Failure', 'Authorize.NET IPN', array( 'response' => 500 ) ); |
|
130 | + if (empty($_POST) || !$this->validate_ipn()) { |
|
131 | + wp_die('Authorize.NET IPN Request Failure', 'Authorize.NET IPN', array('response' => 500)); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | // Event type. |
135 | - $posted = json_decode( file_get_contents( 'php://input' ) ); |
|
136 | - if ( empty( $posted ) ) { |
|
137 | - wp_die( 'Invalid JSON', 'Authorize.NET IPN', array( 'response' => 500 ) ); |
|
135 | + $posted = json_decode(file_get_contents('php://input')); |
|
136 | + if (empty($posted)) { |
|
137 | + wp_die('Invalid JSON', 'Authorize.NET IPN', array('response' => 500)); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | // Process the IPN. |
141 | - $posted = (object) wp_unslash( $posted ); |
|
141 | + $posted = (object) wp_unslash($posted); |
|
142 | 142 | |
143 | 143 | // Process refunds. |
144 | - if ( 'net.authorize.payment.refund.created' == $posted->eventType ) { |
|
145 | - $invoice = new WPInv_Invoice( $posted->payload->merchantReferenceId ); |
|
146 | - $this->validate_ipn_invoice( $invoice, $posted->payload ); |
|
144 | + if ('net.authorize.payment.refund.created' == $posted->eventType) { |
|
145 | + $invoice = new WPInv_Invoice($posted->payload->merchantReferenceId); |
|
146 | + $this->validate_ipn_invoice($invoice, $posted->payload); |
|
147 | 147 | $invoice->refund(); |
148 | 148 | } |
149 | 149 | |
150 | 150 | // Held funds approved. |
151 | - if ( 'net.authorize.payment.fraud.approved' == $posted->eventType ) { |
|
152 | - $invoice = new WPInv_Invoice( $posted->payload->id ); |
|
153 | - $this->validate_ipn_invoice( $invoice, $posted->payload ); |
|
154 | - $invoice->mark_paid( false, __( 'Payment released', 'invoicing' ) ); |
|
151 | + if ('net.authorize.payment.fraud.approved' == $posted->eventType) { |
|
152 | + $invoice = new WPInv_Invoice($posted->payload->id); |
|
153 | + $this->validate_ipn_invoice($invoice, $posted->payload); |
|
154 | + $invoice->mark_paid(false, __('Payment released', 'invoicing')); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | // Held funds declined. |
158 | - if ( 'net.authorize.payment.fraud.declined' == $posted->eventType ) { |
|
159 | - $invoice = new WPInv_Invoice( $posted->payload->id ); |
|
160 | - $this->validate_ipn_invoice( $invoice, $posted->payload ); |
|
161 | - $invoice->set_status( 'wpi-failed', __( 'Payment desclined', 'invoicing' ) ); |
|
158 | + if ('net.authorize.payment.fraud.declined' == $posted->eventType) { |
|
159 | + $invoice = new WPInv_Invoice($posted->payload->id); |
|
160 | + $this->validate_ipn_invoice($invoice, $posted->payload); |
|
161 | + $invoice->set_status('wpi-failed', __('Payment desclined', 'invoicing')); |
|
162 | 162 | $invoice->save(); |
163 | 163 | } |
164 | 164 | |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | * @param object $payload |
174 | 174 | * @return void |
175 | 175 | */ |
176 | - public function validate_ipn_invoice( $invoice, $payload ) { |
|
177 | - if ( ! $invoice->exists() || $payload->id != $invoice->get_transaction_id() ) { |
|
176 | + public function validate_ipn_invoice($invoice, $payload) { |
|
177 | + if (!$invoice->exists() || $payload->id != $invoice->get_transaction_id()) { |
|
178 | 178 | exit; |
179 | 179 | } |
180 | 180 | } |
@@ -186,32 +186,32 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function maybe_process_old_ipn() { |
188 | 188 | |
189 | - $data = wp_unslash( $_POST ); |
|
189 | + $data = wp_unslash($_POST); |
|
190 | 190 | |
191 | 191 | // Only process subscriptions subscriptions. |
192 | - if ( empty( $_POST['x_subscription_id'] ) ) { |
|
192 | + if (empty($_POST['x_subscription_id'])) { |
|
193 | 193 | return; |
194 | 194 | } |
195 | 195 | |
196 | 196 | // Check validity. |
197 | - $this->validate_old_ipn_signature( $data ); |
|
197 | + $this->validate_old_ipn_signature($data); |
|
198 | 198 | |
199 | 199 | // Fetch the associated subscription. |
200 | - $subscription_id = WPInv_Subscription::get_subscription_id_by_field( $_POST['x_subscription_id'] ); |
|
201 | - $subscription = new WPInv_Subscription( $subscription_id ); |
|
200 | + $subscription_id = WPInv_Subscription::get_subscription_id_by_field($_POST['x_subscription_id']); |
|
201 | + $subscription = new WPInv_Subscription($subscription_id); |
|
202 | 202 | |
203 | 203 | // Abort if it is missing or completed. |
204 | - if ( ! $subscription->get_id() || $subscription->has_status( 'completed' ) ) { |
|
204 | + if (!$subscription->get_id() || $subscription->has_status('completed')) { |
|
205 | 205 | return; |
206 | 206 | } |
207 | 207 | |
208 | 208 | // Payment status. |
209 | - if ( 1 == $_POST['x_response_code'] ) { |
|
209 | + if (1 == $_POST['x_response_code']) { |
|
210 | 210 | |
211 | 211 | // Renew the subscription. |
212 | 212 | $subscription->add_payment( |
213 | 213 | array( |
214 | - 'transaction_id' => sanitize_text_field( $data['x_trans_id'] ), |
|
214 | + 'transaction_id' => sanitize_text_field($data['x_trans_id']), |
|
215 | 215 | 'gateway' => $this->id |
216 | 216 | ) |
217 | 217 | ); |
@@ -230,17 +230,17 @@ discard block |
||
230 | 230 | * |
231 | 231 | * @param array $posted |
232 | 232 | */ |
233 | - public function validate_old_ipn_signature( $posted ) { |
|
233 | + public function validate_old_ipn_signature($posted) { |
|
234 | 234 | |
235 | - $signature = $this->get_option( 'signature_key' ); |
|
236 | - if ( ! empty( $signature ) ) { |
|
237 | - $login_id = $this->get_option( 'login_id' ); |
|
235 | + $signature = $this->get_option('signature_key'); |
|
236 | + if (!empty($signature)) { |
|
237 | + $login_id = $this->get_option('login_id'); |
|
238 | 238 | $trans_id = $_POST['x_trans_id']; |
239 | 239 | $amount = $_POST['x_amount']; |
240 | - $hash = hash_hmac ( 'sha512', "^$login_id^$trans_id^$amount^", hex2bin( $signature ) ); |
|
240 | + $hash = hash_hmac('sha512', "^$login_id^$trans_id^$amount^", hex2bin($signature)); |
|
241 | 241 | |
242 | - if ( ! hash_equals( $hash, $posted['x_SHA2_Hash'] ) ) { |
|
243 | - wpinv_error_log( $posted['x_SHA2_Hash'], "Invalid signature. Expected $hash" ); |
|
242 | + if (!hash_equals($hash, $posted['x_SHA2_Hash'])) { |
|
243 | + wpinv_error_log($posted['x_SHA2_Hash'], "Invalid signature. Expected $hash"); |
|
244 | 244 | exit; |
245 | 245 | } |
246 | 246 | |
@@ -253,28 +253,28 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function validate_ipn() { |
255 | 255 | |
256 | - wpinv_error_log( 'Validating Authorize.NET IPN response' ); |
|
256 | + wpinv_error_log('Validating Authorize.NET IPN response'); |
|
257 | 257 | |
258 | - if ( empty( $_SERVER['HTTP_X_ANET_SIGNATURE'] ) ) { |
|
258 | + if (empty($_SERVER['HTTP_X_ANET_SIGNATURE'])) { |
|
259 | 259 | return false; |
260 | 260 | } |
261 | 261 | |
262 | - $signature = $this->get_option( 'signature_key' ); |
|
262 | + $signature = $this->get_option('signature_key'); |
|
263 | 263 | |
264 | - if ( empty( $signature ) ) { |
|
265 | - wpinv_error_log( 'Error: You have not set a signature key' ); |
|
264 | + if (empty($signature)) { |
|
265 | + wpinv_error_log('Error: You have not set a signature key'); |
|
266 | 266 | return false; |
267 | 267 | } |
268 | 268 | |
269 | - $hash = hash_hmac ( 'sha512', file_get_contents( 'php://input' ), hex2bin( $signature ) ); |
|
269 | + $hash = hash_hmac('sha512', file_get_contents('php://input'), hex2bin($signature)); |
|
270 | 270 | |
271 | - if ( hash_equals( $hash, $_SERVER['HTTP_X_ANET_SIGNATURE'] ) ) { |
|
272 | - wpinv_error_log( 'Successfully validated the IPN' ); |
|
271 | + if (hash_equals($hash, $_SERVER['HTTP_X_ANET_SIGNATURE'])) { |
|
272 | + wpinv_error_log('Successfully validated the IPN'); |
|
273 | 273 | return true; |
274 | 274 | } |
275 | 275 | |
276 | - wpinv_error_log( 'IPN hash is not valid' ); |
|
277 | - wpinv_error_log( $_SERVER['HTTP_X_ANET_SIGNATURE'] ); |
|
276 | + wpinv_error_log('IPN hash is not valid'); |
|
277 | + wpinv_error_log($_SERVER['HTTP_X_ANET_SIGNATURE']); |
|
278 | 278 | return false; |
279 | 279 | |
280 | 280 | } |
@@ -7,36 +7,36 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -if ( empty( $form->get_items() ) ) { |
|
12 | +if (empty($form->get_items())) { |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | -if ( empty( $items_type ) ) { |
|
16 | +if (empty($items_type)) { |
|
17 | 17 | $items_type = 'total'; |
18 | 18 | } |
19 | 19 | |
20 | -switch( $items_type ) { |
|
20 | +switch ($items_type) { |
|
21 | 21 | case 'radio': |
22 | - wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) ); |
|
22 | + wpinv_get_template('payment-forms/variations/radio.php', compact('form', 'items_type')); |
|
23 | 23 | break; |
24 | 24 | case 'checkbox': |
25 | - wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) ); |
|
25 | + wpinv_get_template('payment-forms/variations/checkbox.php', compact('form', 'items_type')); |
|
26 | 26 | break; |
27 | 27 | case 'select': |
28 | - wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) ); |
|
28 | + wpinv_get_template('payment-forms/variations/select.php', compact('form', 'items_type')); |
|
29 | 29 | break; |
30 | 30 | } |
31 | 31 | |
32 | 32 | // Display the cart totals. |
33 | -if ( ! empty( $hide_cart ) ) { |
|
33 | +if (!empty($hide_cart)) { |
|
34 | 34 | echo '<div class="d-none">'; |
35 | 35 | } |
36 | 36 | |
37 | 37 | // Display the cart totals. |
38 | -wpinv_get_template( 'payment-forms/cart.php', compact( 'form', 'items_type' ) ); |
|
38 | +wpinv_get_template('payment-forms/cart.php', compact('form', 'items_type')); |
|
39 | 39 | |
40 | -if ( ! empty( $hide_cart ) ) { |
|
40 | +if (!empty($hide_cart)) { |
|
41 | 41 | echo '</div>'; |
42 | 42 | } |
@@ -7,52 +7,52 @@ |
||
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( 'This amount will be added to the total amount for this form', 'invoicing' ); ?> |
|
15 | + <?php esc_html_e('This amount will be added to the total amount for this form', 'invoicing'); ?> |
|
16 | 16 | </small> |
17 | 17 | |
18 | 18 | <div class='form-group'> |
19 | 19 | <label class="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' /> |
22 | 22 | </label> |
23 | 23 | </div> |
24 | 24 | |
25 | 25 | <div class='form-group' v-if="active_form_element.select_type=='select'"> |
26 | 26 | <label class="d-block"> |
27 | - <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span> |
|
27 | + <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span> |
|
28 | 28 | <input v-model='active_form_element.placeholder' class='form-control' /> |
29 | 29 | </label> |
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <div class='form-group'> |
33 | 33 | <label class="d-block"> |
34 | - <span><?php esc_html_e( 'Select Type', 'invoicing' ); ?></span> |
|
34 | + <span><?php esc_html_e('Select Type', 'invoicing'); ?></span> |
|
35 | 35 | <select class='form-control custom-select' v-model='active_form_element.select_type'> |
36 | - <option value='select'><?php esc_html_e( 'Dropdown', 'invoicing' ) ?></option> |
|
37 | - <option value='checkboxes'><?php esc_html_e( 'Checkboxes', 'invoicing' ) ?></option> |
|
38 | - <option value='radios'><?php esc_html_e( 'Radio Buttons', 'invoicing' ) ?></option> |
|
39 | - <option value='buttons'><?php esc_html_e( 'Buttons', 'invoicing' ) ?></option> |
|
40 | - <option value='circles'><?php esc_html_e( 'Circles', 'invoicing' ) ?></option> |
|
36 | + <option value='select'><?php esc_html_e('Dropdown', 'invoicing') ?></option> |
|
37 | + <option value='checkboxes'><?php esc_html_e('Checkboxes', 'invoicing') ?></option> |
|
38 | + <option value='radios'><?php esc_html_e('Radio Buttons', 'invoicing') ?></option> |
|
39 | + <option value='buttons'><?php esc_html_e('Buttons', 'invoicing') ?></option> |
|
40 | + <option value='circles'><?php esc_html_e('Circles', 'invoicing') ?></option> |
|
41 | 41 | </select> |
42 | 42 | </label> |
43 | 43 | </div> |
44 | 44 | |
45 | 45 | <div class='form-group'> |
46 | 46 | <label class="d-block"> |
47 | - <span><?php esc_html_e( 'Options', 'invoicing' ); ?></span> |
|
47 | + <span><?php esc_html_e('Options', 'invoicing'); ?></span> |
|
48 | 48 | <textarea placeholder='Basic|10,Pro|99,Business|199' v-model='active_form_element.options' class='form-control' rows='3'></textarea> |
49 | - <small class='form-text text-muted mb-2'><?php esc_html_e( 'Use commas to separate options and pipes to separate a label and its price. Do not include a currency symbol in the price.', 'invoicing' ); ?></small> |
|
49 | + <small class='form-text text-muted mb-2'><?php esc_html_e('Use commas to separate options and pipes to separate a label and its price. Do not include a currency symbol in the price.', 'invoicing'); ?></small> |
|
50 | 50 | </label> |
51 | 51 | </div> |
52 | 52 | |
53 | 53 | <div class='form-group'> |
54 | 54 | <label class="d-block"> |
55 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
56 | - <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> |
|
55 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
56 | + <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> |
|
57 | 57 | </label> |
58 | 58 | </div> |
@@ -7,11 +7,11 @@ |
||
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'> |
15 | - <label :for="active_form_element.id + '_edit'"><?php esc_html_e( 'The total payable text', 'invoicing' ) ?></label> |
|
15 | + <label :for="active_form_element.id + '_edit'"><?php esc_html_e('The total payable text', 'invoicing') ?></label> |
|
16 | 16 | <textarea :id="active_form_element.id + '_edit'" v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
17 | 17 | </div> |
@@ -7,27 +7,27 @@ |
||
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'> |
15 | 15 | <label class="d-block"> |
16 | - <span><?php esc_html_e( 'Input Label', 'invoicing' ); ?></span> |
|
16 | + <span><?php esc_html_e('Input Label', 'invoicing'); ?></span> |
|
17 | 17 | <input v-model='active_form_element.input_label' class='form-control' type="text"/> |
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | |
21 | 21 | <div class='form-group'> |
22 | 22 | <label class="d-block"> |
23 | - <span><?php esc_html_e( 'Button Label', 'invoicing' ); ?></span> |
|
23 | + <span><?php esc_html_e('Button Label', 'invoicing'); ?></span> |
|
24 | 24 | <input v-model='active_form_element.button_label' class='form-control' type="text"/> |
25 | 25 | </label> |
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <div class='form-group'> |
29 | 29 | <label class="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> |
|
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 | 32 | </label> |
33 | 33 | </div> |
@@ -7,11 +7,11 @@ |
||
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'> |
15 | - <label :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Enter your text', 'invoicing' ) ?></label> |
|
15 | + <label :for="active_form_element.id + '_edit'"><?php esc_html_e('Enter your text', 'invoicing') ?></label> |
|
16 | 16 | <textarea :id="active_form_element.id + '_edit'" v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
17 | 17 | </div> |
@@ -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'> |
14 | - <label :for="active_form_element.id + '_edit'"><?php esc_html_e( 'The IP Address text', 'invoicing' ) ?></label> |
|
14 | + <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,11 +7,11 @@ |
||
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'> |
15 | - <label :for="active_form_element.id + '_edit'"><?php esc_html_e( 'The gateway select text', 'invoicing' ) ?></label> |
|
15 | + <label :for="active_form_element.id + '_edit'"><?php esc_html_e('The gateway select text', 'invoicing') ?></label> |
|
16 | 16 | <textarea :id="active_form_element.id + '_edit'" v-model='active_form_element.text' class='form-control' rows='3'></textarea> |
17 | 17 | </div> |
@@ -7,25 +7,25 @@ |
||
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'> |
15 | 15 | <label class="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'> |
22 | 22 | <label class="d-block"> |
23 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
24 | - <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> |
|
23 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
24 | + <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> |
|
25 | 25 | </label> |
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <div class='form-group form-check'> |
29 | 29 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
30 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
30 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
31 | 31 | </div> |