@@ -7,43 +7,43 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Make sure that the form is active. |
13 | -if ( ! $form->is_active() ) { |
|
13 | +if (!$form->is_active()) { |
|
14 | 14 | echo aui()->alert( |
15 | 15 | array( |
16 | 16 | 'type' => 'warning', |
17 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
17 | + 'content' => __('This payment form is no longer active', 'invoicing'), |
|
18 | 18 | ) |
19 | 19 | ); |
20 | 20 | return; |
21 | 21 | } |
22 | 22 | |
23 | 23 | // Fires before displaying a payment form. |
24 | -do_action( 'getpaid_before_payment_form', $form ); |
|
24 | +do_action('getpaid_before_payment_form', $form); |
|
25 | 25 | ?> |
26 | 26 | |
27 | -<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint( $form->get_id() ); ?> bsui position-relative' method='POST' data-key='<?php echo uniqid('gpf'); ?>' data-currency='<?php echo esc_attr( empty( $form->invoice ) ? wpinv_get_currency() : $form->invoice->get_currency() ); ?>' novalidate> |
|
27 | +<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint($form->get_id()); ?> bsui position-relative' method='POST' data-key='<?php echo uniqid('gpf'); ?>' data-currency='<?php echo esc_attr(empty($form->invoice) ? wpinv_get_currency() : $form->invoice->get_currency()); ?>' novalidate> |
|
28 | 28 | |
29 | 29 | <?php |
30 | 30 | |
31 | 31 | // Fires when printing the top of a payment form. |
32 | - do_action( 'getpaid_payment_form_top', $form ); |
|
32 | + do_action('getpaid_payment_form_top', $form); |
|
33 | 33 | |
34 | 34 | // And the optional invoice id. |
35 | - if ( ! empty( $form->invoice ) ) { |
|
36 | - echo getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
35 | + if (!empty($form->invoice)) { |
|
36 | + echo getpaid_hidden_field('invoice_id', $form->invoice->get_id()); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | // We also want to include the form id. |
40 | - echo getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
40 | + echo getpaid_hidden_field('form_id', $form->get_id()); |
|
41 | 41 | |
42 | 42 | // And an indication that this is a payment form submission. |
43 | - echo getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
43 | + echo getpaid_hidden_field('getpaid_payment_form_submission', '1'); |
|
44 | 44 | |
45 | 45 | // Fires before displaying payment form elements. |
46 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
46 | + do_action('getpaid_payment_form_before_elements', $form); |
|
47 | 47 | |
48 | 48 | // Display the elements. |
49 | 49 | ?> |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | <div class="row"> |
52 | 52 | <?php |
53 | 53 | |
54 | - foreach ( $form->get_elements() as $element ) { |
|
54 | + foreach ($form->get_elements() as $element) { |
|
55 | 55 | |
56 | - if ( isset( $element['type'] ) ) { |
|
57 | - $grid_class = esc_attr( getpaid_get_form_element_grid_class( $element ) ); |
|
56 | + if (isset($element['type'])) { |
|
57 | + $grid_class = esc_attr(getpaid_get_form_element_grid_class($element)); |
|
58 | 58 | echo "<div class='$grid_class'>"; |
59 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
60 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
59 | + do_action('getpaid_payment_form_element', $element, $form); |
|
60 | + do_action("getpaid_payment_form_element_{$element['type']}_template", $element, $form); |
|
61 | 61 | echo "</div>"; |
62 | 62 | } |
63 | 63 | |
@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | |
70 | 70 | <?php |
71 | 71 | // Fires after displaying payment form elements. |
72 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
72 | + do_action('getpaid_payment_form_after_elements', $form); |
|
73 | 73 | |
74 | 74 | echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
75 | 75 | |
76 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
76 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
77 | 77 | |
78 | 78 | edit_post_link( |
79 | - __( 'Edit this form.', 'invoicing' ), |
|
79 | + __('Edit this form.', 'invoicing'), |
|
80 | 80 | '<small class="form-text text-muted">', |
81 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
81 | + ' ' . __('This is only visible to website administators.', 'invoicing') . '</small>', |
|
82 | 82 | $form->get_id(), |
83 | 83 | 'text-danger' |
84 | 84 | ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | <div class="loading_div overlay overlay-black position-absolute row m-0 rounded overflow-hidden" style="height: 100%;width: 100%;top: 0px;z-index: 2;display:none;"> |
92 | 92 | <div class="spinner-border mx-auto align-self-center text-white" role="status"> |
93 | - <span class="sr-only"><?php _e( 'Loading...', 'invoicing' );?></span> |
|
93 | + <span class="sr-only"><?php _e('Loading...', 'invoicing'); ?></span> |
|
94 | 94 | </div> |
95 | 95 | </div> |
96 | 96 | |
@@ -99,4 +99,4 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | |
101 | 101 | // Fires after displaying a payment form. |
102 | -do_action( 'getpaid_after_payment_form', $form ); |
|
102 | +do_action('getpaid_after_payment_form', $form); |