@@ -8,23 +8,23 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | -defined( 'ABSPATH' ) || exit; |
|
| 11 | +defined('ABSPATH') || exit; |
|
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | |
| 15 | 15 | <div class='form-group mb-3'> |
| 16 | - <label class="form-label" :for="active_form_element.id + '_edit_heading'"><?php esc_html_e( 'Heading', 'invoicing' ); ?></label> |
|
| 16 | + <label class="form-label" :for="active_form_element.id + '_edit_heading'"><?php esc_html_e('Heading', 'invoicing'); ?></label> |
|
| 17 | 17 | <input :id="active_form_element.id + '_edit_heading'" v-model='active_form_element.text' class='form-control' type='text' /> |
| 18 | 18 | </div> |
| 19 | 19 | |
| 20 | 20 | <div class='form-group mb-3'> |
| 21 | - <label class="form-label" :for="active_form_element.id + '_edit_level'"><?php esc_html_e( 'Select Heading Level', 'invoicing' ); ?></label> |
|
| 21 | + <label class="form-label" :for="active_form_element.id + '_edit_level'"><?php esc_html_e('Select Heading Level', 'invoicing'); ?></label> |
|
| 22 | 22 | <select class='form-control custom-select' :id="active_form_element.id + '_edit_level'" v-model='active_form_element.level'> |
| 23 | - <option value='h1'><?php esc_html_e( 'H1', 'invoicing' ); ?></option> |
|
| 24 | - <option value='h2'><?php esc_html_e( 'H2', 'invoicing' ); ?></option> |
|
| 25 | - <option value='h3'><?php esc_html_e( 'H3', 'invoicing' ); ?></option> |
|
| 26 | - <option value='h4'><?php esc_html_e( 'H4', 'invoicing' ); ?></option> |
|
| 27 | - <option value='h5'><?php esc_html_e( 'H5', 'invoicing' ); ?></option> |
|
| 28 | - <option value='h6'><?php esc_html_e( 'H6', 'invoicing' ); ?></option> |
|
| 23 | + <option value='h1'><?php esc_html_e('H1', 'invoicing'); ?></option> |
|
| 24 | + <option value='h2'><?php esc_html_e('H2', 'invoicing'); ?></option> |
|
| 25 | + <option value='h3'><?php esc_html_e('H3', 'invoicing'); ?></option> |
|
| 26 | + <option value='h4'><?php esc_html_e('H4', 'invoicing'); ?></option> |
|
| 27 | + <option value='h5'><?php esc_html_e('H5', 'invoicing'); ?></option> |
|
| 28 | + <option value='h6'><?php esc_html_e('H6', 'invoicing'); ?></option> |
|
| 29 | 29 | </select> |
| 30 | 30 | </div> |
@@ -7,36 +7,36 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Ensure that we have options. |
| 13 | -if ( empty( $options ) ) { |
|
| 13 | +if (empty($options)) { |
|
| 14 | 14 | return; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Prepare price options. |
| 18 | -$options = getpaid_convert_price_string_to_options( $options ); |
|
| 19 | -$keys = array_keys( $options ); |
|
| 20 | -$value = empty( $options ) ? '' : $keys[0]; |
|
| 18 | +$options = getpaid_convert_price_string_to_options($options); |
|
| 19 | +$keys = array_keys($options); |
|
| 20 | +$value = empty($options) ? '' : $keys[0]; |
|
| 21 | 21 | |
| 22 | -if ( ! empty( $query_value ) ) { |
|
| 22 | +if (!empty($query_value)) { |
|
| 23 | 23 | $value = $query_value; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -$select_type = empty( $select_type ) ? 'select' : $select_type; |
|
| 26 | +$select_type = empty($select_type) ? 'select' : $select_type; |
|
| 27 | 27 | |
| 28 | 28 | // Item select; |
| 29 | -if ( $select_type == 'select' ) { |
|
| 29 | +if ($select_type == 'select') { |
|
| 30 | 30 | aui()->select( |
| 31 | 31 | array( |
| 32 | 32 | 'name' => $id, |
| 33 | - 'id' => esc_attr( $element_id ), |
|
| 34 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
| 33 | + 'id' => esc_attr($element_id), |
|
| 34 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
| 35 | 35 | 'value' => $value, |
| 36 | - 'label' => empty( $label ) ? '' : esc_html( $label ), |
|
| 36 | + 'label' => empty($label) ? '' : esc_html($label), |
|
| 37 | 37 | 'label_type' => 'vertical', |
| 38 | 38 | 'class' => 'getpaid-price-select-dropdown getpaid-refresh-on-change', |
| 39 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
| 39 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
| 40 | 40 | 'options' => $options, |
| 41 | 41 | ), |
| 42 | 42 | true |
@@ -45,18 +45,18 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // Item radios; |
| 48 | -if ( $select_type == 'radios' ) { |
|
| 48 | +if ($select_type == 'radios') { |
|
| 49 | 49 | aui()->radio( |
| 50 | 50 | array( |
| 51 | - 'name' => esc_attr( $id ), |
|
| 52 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
| 53 | - 'label' => empty( $label ) ? '' : esc_html( $label ), |
|
| 51 | + 'name' => esc_attr($id), |
|
| 52 | + 'id' => esc_attr($id) . uniqid('_'), |
|
| 53 | + 'label' => empty($label) ? '' : esc_html($label), |
|
| 54 | 54 | 'label_type' => 'vertical', |
| 55 | 55 | 'class' => 'getpaid-price-select-radio getpaid-refresh-on-change w-100', |
| 56 | 56 | 'value' => $value, |
| 57 | 57 | 'inline' => false, |
| 58 | 58 | 'options' => $options, |
| 59 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
| 59 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
| 60 | 60 | ), |
| 61 | 61 | true |
| 62 | 62 | ); |
@@ -65,32 +65,32 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | // Display the label. |
| 68 | -if ( ! empty( $label ) ) { |
|
| 69 | - echo '<label class="form-label">' . esc_html( $label ) . '</label>'; |
|
| 68 | +if (!empty($label)) { |
|
| 69 | + echo '<label class="form-label">' . esc_html($label) . '</label>'; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // Item buttons; |
| 73 | -if ( $select_type == 'buttons' || $select_type == 'circles' ) { |
|
| 73 | +if ($select_type == 'buttons' || $select_type == 'circles') { |
|
| 74 | 74 | |
| 75 | 75 | $class = 'getpaid-price-buttons'; |
| 76 | 76 | |
| 77 | - if ( $select_type == 'circles' ) { |
|
| 77 | + if ($select_type == 'circles') { |
|
| 78 | 78 | $class .= ' getpaid-price-circles'; |
| 79 | 79 | } |
| 80 | - echo "<div class='" . esc_attr( $class ) . "'>"; |
|
| 80 | + echo "<div class='" . esc_attr($class) . "'>"; |
|
| 81 | 81 | |
| 82 | - foreach ( $options as $price => $label ) { |
|
| 83 | - $_id = $id . uniqid( '_' ); |
|
| 82 | + foreach ($options as $price => $label) { |
|
| 83 | + $_id = $id . uniqid('_'); |
|
| 84 | 84 | |
| 85 | 85 | $class = 'rounded'; |
| 86 | 86 | |
| 87 | - if ( $select_type == 'circles' ) { |
|
| 87 | + if ($select_type == 'circles') { |
|
| 88 | 88 | $class = ''; |
| 89 | 89 | } |
| 90 | 90 | echo " |
| 91 | 91 | <span class='d-inline-block'> |
| 92 | - <input type='radio' class='getpaid-price-select-button getpaid-refresh-on-change w-auto' id='" . esc_attr( $_id ) . "' value='" . esc_attr( $price ) . "' name='" . esc_attr( $id ) . "' " . checked( $price, $value, false ) . " /> |
|
| 93 | - <label for='" . esc_attr( $_id ) . "' class='" . esc_attr( $class ) . "'><span>" . esc_html( $label ) . '</span></label> |
|
| 92 | + <input type='radio' class='getpaid-price-select-button getpaid-refresh-on-change w-auto' id='" . esc_attr($_id) . "' value='" . esc_attr($price) . "' name='" . esc_attr($id) . "' " . checked($price, $value, false) . " /> |
|
| 93 | + <label for='" . esc_attr($_id) . "' class='" . esc_attr($class) . "'><span>" . esc_html($label) . '</span></label> |
|
| 94 | 94 | </span> |
| 95 | 95 | '; |
| 96 | 96 | } |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | // Item checkboxes; |
| 103 | -if ( $select_type == 'checkboxes' ) { |
|
| 103 | +if ($select_type == 'checkboxes') { |
|
| 104 | 104 | echo '<div class="form-group mb-3">'; |
| 105 | 105 | |
| 106 | - foreach ( $options as $price => $label ) { |
|
| 106 | + foreach ($options as $price => $label) { |
|
| 107 | 107 | echo " |
| 108 | 108 | <label class='form-label d-block'> |
| 109 | - <input type='checkbox' class='getpaid-price-select-checkbox getpaid-refresh-on-change w-auto' name='" . esc_attr( $id ) . "[]' value='" . esc_attr( $price ) . "' " . checked( $price, $value, false ) . ' /> |
|
| 110 | - <span>' . esc_html( $label ) . '</span> |
|
| 109 | + <input type='checkbox' class='getpaid-price-select-checkbox getpaid-refresh-on-change w-auto' name='" . esc_attr($id) . "[]' value='" . esc_attr($price) . "' " . checked($price, $value, false) . ' /> |
|
| 110 | + <span>' . esc_html($label) . '</span> |
|
| 111 | 111 | </label> |
| 112 | 112 | '; |
| 113 | 113 | } |
@@ -116,6 +116,6 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | -if ( ! empty( $description ) ) { |
|
| 120 | - echo "<small class='form-text text-muted'>" . wp_kses_post( $description ) . '</small>'; |
|
| 119 | +if (!empty($description)) { |
|
| 120 | + echo "<small class='form-text text-muted'>" . wp_kses_post($description) . '</small>'; |
|
| 121 | 121 | } |
@@ -7,45 +7,45 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // The payment methods select title. |
| 13 | -if ( empty( $text ) ) { |
|
| 14 | - $text = __( 'Select Payment Method', 'invoicing' ); |
|
| 13 | +if (empty($text)) { |
|
| 14 | + $text = __('Select Payment Method', 'invoicing'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // An array of active payment methods. |
| 18 | -$gateways = wpinv_get_enabled_payment_gateways( true ); |
|
| 18 | +$gateways = wpinv_get_enabled_payment_gateways(true); |
|
| 19 | 19 | |
| 20 | 20 | // The current invoice id. |
| 21 | 21 | $invoice_id = 0; |
| 22 | 22 | $chosen_gateway = wpinv_get_default_gateway(); |
| 23 | 23 | |
| 24 | -if ( ! empty( $form->invoice ) ) { |
|
| 24 | +if (!empty($form->invoice)) { |
|
| 25 | 25 | $invoice_id = $form->invoice->get_id(); |
| 26 | 26 | $chosen_gateway = $form->invoice->get_gateway(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | ?> |
| 30 | 30 | |
| 31 | - <?php do_action( 'getpaid_before_payment_form_gateway_select', $form ); ?> |
|
| 31 | + <?php do_action('getpaid_before_payment_form_gateway_select', $form); ?> |
|
| 32 | 32 | <div class="mt-4 mb-4 getpaid-gateways"> |
| 33 | 33 | |
| 34 | - <?php do_action( 'wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form ); ?> |
|
| 34 | + <?php do_action('wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form); ?> |
|
| 35 | 35 | |
| 36 | 36 | <div class="getpaid-select-gateway-title-div"> |
| 37 | - <h6><?php echo esc_html( $text ); ?></h6> |
|
| 37 | + <h6><?php echo esc_html($text); ?></h6> |
|
| 38 | 38 | </div> |
| 39 | 39 | |
| 40 | 40 | <div class="getpaid-available-gateways-div"> |
| 41 | 41 | |
| 42 | - <?php foreach ( array_keys( $gateways ) as $gateway ) : ?> |
|
| 42 | + <?php foreach (array_keys($gateways) as $gateway) : ?> |
|
| 43 | 43 | |
| 44 | - <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo esc_attr( $gateway ); ?>" data-checkout-label='<?php echo esc_attr( apply_filters( "getpaid_gateway_{$gateway}_checkout_button_label", '' ) ); ?>'> |
|
| 44 | + <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo esc_attr($gateway); ?>" data-checkout-label='<?php echo esc_attr(apply_filters("getpaid_gateway_{$gateway}_checkout_button_label", '')); ?>'> |
|
| 45 | 45 | |
| 46 | 46 | <label class="form-label d-block w-100 getpaid-gateway-radio"> |
| 47 | - <input type="radio" value="<?php echo esc_attr( $gateway ); ?>" <?php checked( $gateway, $chosen_gateway ); ?> name="wpi-gateway"> |
|
| 48 | - <span><?php echo esc_html( wpinv_get_gateway_checkout_label( $gateway ) ); ?></span> |
|
| 47 | + <input type="radio" value="<?php echo esc_attr($gateway); ?>" <?php checked($gateway, $chosen_gateway); ?> name="wpi-gateway"> |
|
| 48 | + <span><?php echo esc_html(wpinv_get_gateway_checkout_label($gateway)); ?></span> |
|
| 49 | 49 | </label> |
| 50 | 50 | |
| 51 | 51 | </div> |
@@ -56,22 +56,22 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | <div class="getpaid-gateway-descriptions-div"> |
| 58 | 58 | |
| 59 | - <?php foreach ( array_keys( $gateways ) as $gateway ) : ?> |
|
| 59 | + <?php foreach (array_keys($gateways) as $gateway) : ?> |
|
| 60 | 60 | |
| 61 | - <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo esc_attr( $gateway ); ?>" style="display: none;"> |
|
| 61 | + <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo esc_attr($gateway); ?>" style="display: none;"> |
|
| 62 | 62 | <?php |
| 63 | 63 | |
| 64 | - $description = wpinv_get_gateway_description( $gateway ); |
|
| 64 | + $description = wpinv_get_gateway_description($gateway); |
|
| 65 | 65 | |
| 66 | - if ( wpinv_is_test_mode( $gateway ) ) { |
|
| 67 | - $sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) ); |
|
| 66 | + if (wpinv_is_test_mode($gateway)) { |
|
| 67 | + $sandbox_notice = apply_filters("getpaid_{$gateway}_sandbox_notice", __('SANDBOX ENABLED: No real payments will occur.', 'invoicing')); |
|
| 68 | 68 | $description = "$description $sandbox_notice"; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - echo wp_kses_post( wpautop( $description ) ); |
|
| 71 | + echo wp_kses_post(wpautop($description)); |
|
| 72 | 72 | |
| 73 | - do_action( 'wpinv_' . $gateway . '_checkout_fields', $invoice_id ); |
|
| 74 | - do_action( 'wpinv_' . $gateway . '_cc_form', $invoice_id, $form ); |
|
| 73 | + do_action('wpinv_' . $gateway . '_checkout_fields', $invoice_id); |
|
| 74 | + do_action('wpinv_' . $gateway . '_cc_form', $invoice_id, $form); |
|
| 75 | 75 | |
| 76 | 76 | ?> |
| 77 | 77 | </div> |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | <?php |
| 85 | 85 | aui()->alert( |
| 86 | 86 | array( |
| 87 | - 'content' => __( 'None of the available payment gateways support purchasing recurring items.', 'invoicing' ), |
|
| 87 | + 'content' => __('None of the available payment gateways support purchasing recurring items.', 'invoicing'), |
|
| 88 | 88 | 'type' => 'danger', |
| 89 | 89 | ), |
| 90 | 90 | true |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | <?php |
| 97 | 97 | aui()->alert( |
| 98 | 98 | array( |
| 99 | - 'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing' ), |
|
| 99 | + 'content' => __('None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing'), |
|
| 100 | 100 | 'type' => 'danger', |
| 101 | 101 | ), |
| 102 | 102 | true |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | <?php |
| 109 | 109 | aui()->alert( |
| 110 | 110 | array( |
| 111 | - 'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing' ), |
|
| 111 | + 'content' => __('None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing'), |
|
| 112 | 112 | 'type' => 'danger', |
| 113 | 113 | ), |
| 114 | 114 | true |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | <?php |
| 121 | 121 | aui()->alert( |
| 122 | 122 | array( |
| 123 | - 'content' => __( 'There is no active payment gateway available to process your request.', 'invoicing' ), |
|
| 123 | + 'content' => __('There is no active payment gateway available to process your request.', 'invoicing'), |
|
| 124 | 124 | 'type' => 'danger', |
| 125 | 125 | ), |
| 126 | 126 | true |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | ?> |
| 129 | 129 | </div> |
| 130 | 130 | |
| 131 | - <?php do_action( 'wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form ); ?> |
|
| 131 | + <?php do_action('wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form); ?> |
|
| 132 | 132 | |
| 133 | 133 | </div> |
| 134 | - <?php do_action( 'getpaid_after_payment_form_gateway_select', $form ); ?> |
|
| 134 | + <?php do_action('getpaid_after_payment_form_gateway_select', $form); ?> |
|
@@ -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,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,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,14 +7,14 @@ |
||
| 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='alert mb-0' :class='form_element.class' role='alert'> |
| 15 | 15 | <span v-html='form_element.text'></span> |
| 16 | 16 | <button v-if='form_element.dismissible' type='button' class='close btn-close' @click.prevent='' style="margin-top: -4px;"> |
| 17 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
| 17 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
| 18 | 18 | <span aria-hidden="true">×</span> |
| 19 | 19 | <?php endif; ?> |
| 20 | 20 | </button> |
@@ -5,38 +5,38 @@ |
||
| 5 | 5 | * @var array $tax_rule |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -defined( 'ABSPATH' ) || exit; |
|
| 8 | +defined('ABSPATH') || exit; |
|
| 9 | 9 | |
| 10 | 10 | ?> |
| 11 | 11 | |
| 12 | 12 | <tr> |
| 13 | 13 | |
| 14 | 14 | <td class="wpinv-tax-rule-key"> |
| 15 | - <input type="text" name="tax_rules[<?php echo esc_attr( $tax_rule['key'] ); ?>][key]" value="<?php echo esc_attr( $tax_rule['key'] ); ?>" required/> |
|
| 15 | + <input type="text" name="tax_rules[<?php echo esc_attr($tax_rule['key']); ?>][key]" value="<?php echo esc_attr($tax_rule['key']); ?>" required/> |
|
| 16 | 16 | </td> |
| 17 | 17 | |
| 18 | 18 | <td class="wpinv-tax-rule-label"> |
| 19 | - <input type="text" name="tax_rules[<?php echo esc_attr( $tax_rule['key'] ); ?>][label]" value="<?php echo esc_attr( $tax_rule['label'] ); ?>" required/> |
|
| 19 | + <input type="text" name="tax_rules[<?php echo esc_attr($tax_rule['key']); ?>][label]" value="<?php echo esc_attr($tax_rule['label']); ?>" required/> |
|
| 20 | 20 | </td> |
| 21 | 21 | |
| 22 | 22 | <td class="wpinv-tax-rule-base-address"> |
| 23 | - <select name="tax_rules[<?php echo esc_attr( $tax_rule['key'] ); ?>][tax_base]" class="getpaid-tax-rule-base-address" required> |
|
| 24 | - <option value="billing" <?php selected( $tax_rule['tax_base'], 'billing' ); ?>><?php esc_html_e( 'Customer billing address', 'invoicing' ); ?></option> |
|
| 25 | - <option value="base" <?php selected( $tax_rule['tax_base'], 'base' ); ?>><?php esc_html_e( 'Shop base address', 'invoicing' ); ?></option> |
|
| 23 | + <select name="tax_rules[<?php echo esc_attr($tax_rule['key']); ?>][tax_base]" class="getpaid-tax-rule-base-address" required> |
|
| 24 | + <option value="billing" <?php selected($tax_rule['tax_base'], 'billing'); ?>><?php esc_html_e('Customer billing address', 'invoicing'); ?></option> |
|
| 25 | + <option value="base" <?php selected($tax_rule['tax_base'], 'base'); ?>><?php esc_html_e('Shop base address', 'invoicing'); ?></option> |
|
| 26 | 26 | </select> |
| 27 | 27 | </td> |
| 28 | 28 | |
| 29 | 29 | <!-- <td class="wpinv-tax-rule-same-country"> |
| 30 | - <select name="tax_rules[<?php echo esc_attr( $tax_rule['key'] ); ?>][same_country_rule]" class="getpaid-tax-rule-same-country" required> |
|
| 31 | - <option value="no" <?php selected( $tax_rule['same_country_rule'], 'no' ); ?>><?php esc_html_e( 'Do not charge tax', 'invoicing' ); ?></option> |
|
| 32 | - <option value="always" <?php selected( $tax_rule['same_country_rule'], 'always' ); ?>><?php esc_html_e( 'Charge tax unless vat number is validated', 'invoicing' ); ?></option> |
|
| 33 | - <option value="vat_too" <?php selected( $tax_rule['same_country_rule'], 'vat_too' ); ?>><?php esc_html_e( 'Charge tax even if vat number is validated', 'invoicing' ); ?></option> |
|
| 30 | + <select name="tax_rules[<?php echo esc_attr($tax_rule['key']); ?>][same_country_rule]" class="getpaid-tax-rule-same-country" required> |
|
| 31 | + <option value="no" <?php selected($tax_rule['same_country_rule'], 'no'); ?>><?php esc_html_e('Do not charge tax', 'invoicing'); ?></option> |
|
| 32 | + <option value="always" <?php selected($tax_rule['same_country_rule'], 'always'); ?>><?php esc_html_e('Charge tax unless vat number is validated', 'invoicing'); ?></option> |
|
| 33 | + <option value="vat_too" <?php selected($tax_rule['same_country_rule'], 'vat_too'); ?>><?php esc_html_e('Charge tax even if vat number is validated', 'invoicing'); ?></option> |
|
| 34 | 34 | </select> |
| 35 | 35 | </td> --> |
| 36 | 36 | |
| 37 | 37 | <td class="wpinv_tax_remove"> |
| 38 | - <button type="button" class="close btn-close wpinv_remove_tax_rule" aria-label="<?php esc_attr_e( 'Delete', 'invoicing' ); ?>" title="<?php esc_attr_e( 'Delete', 'invoicing' ); ?>"> |
|
| 39 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
| 38 | + <button type="button" class="close btn-close wpinv_remove_tax_rule" aria-label="<?php esc_attr_e('Delete', 'invoicing'); ?>" title="<?php esc_attr_e('Delete', 'invoicing'); ?>"> |
|
| 39 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
| 40 | 40 | <span aria-hidden="true">×</span> |
| 41 | 41 | <?php endif; ?> |
| 42 | 42 | </button> |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @var array $tax_rate |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -defined( 'ABSPATH' ) || exit; |
|
| 9 | +defined('ABSPATH') || exit; |
|
| 10 | 10 | |
| 11 | 11 | ?> |
| 12 | 12 | |
@@ -18,13 +18,13 @@ discard block |
||
| 18 | 18 | aui()->select( |
| 19 | 19 | array( |
| 20 | 20 | 'options' => array_merge( |
| 21 | - array( '' => __( 'All Countries', 'invoicing' ) ), |
|
| 21 | + array('' => __('All Countries', 'invoicing')), |
|
| 22 | 22 | wpinv_get_country_list() |
| 23 | 23 | ), |
| 24 | 24 | 'name' => "tax_rates[$key][country]", |
| 25 | - 'id' => uniqid( 'tax_rate_country' ), |
|
| 26 | - 'value' => esc_html( $tax_rate['country'] ), |
|
| 27 | - 'label' => __( 'Country', 'invoicing' ), |
|
| 25 | + 'id' => uniqid('tax_rate_country'), |
|
| 26 | + 'value' => esc_html($tax_rate['country']), |
|
| 27 | + 'label' => __('Country', 'invoicing'), |
|
| 28 | 28 | 'class' => 'wpinv_country', |
| 29 | 29 | 'no_wrap' => true, |
| 30 | 30 | ), |
@@ -37,36 +37,36 @@ discard block |
||
| 37 | 37 | <td class="wpinv_tax_state"> |
| 38 | 38 | |
| 39 | 39 | <label class="w-100"> |
| 40 | - <span class="screen-reader-text"><?php esc_html_e( 'States', 'invoicing' ); ?></span> |
|
| 41 | - <input type="text" placeholder="<?php esc_attr_e( 'Apply to whole country', 'invoicing' ); ?>" name="tax_rates[<?php echo esc_attr( $key ); ?>][state]" value="<?php echo empty( $tax_rate['global'] ) ? esc_attr( $tax_rate['state'] ) : ''; ?>"/> |
|
| 40 | + <span class="screen-reader-text"><?php esc_html_e('States', 'invoicing'); ?></span> |
|
| 41 | + <input type="text" placeholder="<?php esc_attr_e('Apply to whole country', 'invoicing'); ?>" name="tax_rates[<?php echo esc_attr($key); ?>][state]" value="<?php echo empty($tax_rate['global']) ? esc_attr($tax_rate['state']) : ''; ?>"/> |
|
| 42 | 42 | </label> |
| 43 | 43 | |
| 44 | 44 | </td> |
| 45 | 45 | |
| 46 | 46 | <td class="wpinv_standard_rate"> |
| 47 | 47 | <label class="w-100"> |
| 48 | - <span class="screen-reader-text"><?php esc_html_e( 'Standard Rate', 'invoicing' ); ?></span> |
|
| 49 | - <input type="number" step="any" min="0" max="99" name="tax_rates[<?php echo esc_attr( $key ); ?>][rate]" value="<?php echo esc_attr( $tax_rate['rate'] ); ?>"/> |
|
| 48 | + <span class="screen-reader-text"><?php esc_html_e('Standard Rate', 'invoicing'); ?></span> |
|
| 49 | + <input type="number" step="any" min="0" max="99" name="tax_rates[<?php echo esc_attr($key); ?>][rate]" value="<?php echo esc_attr($tax_rate['rate']); ?>"/> |
|
| 50 | 50 | </label> |
| 51 | 51 | </td> |
| 52 | 52 | |
| 53 | 53 | <td class="wpinv_reduced_rate"> |
| 54 | 54 | <label class="w-100"> |
| 55 | - <span class="screen-reader-text"><?php esc_html_e( 'Reduced Rate', 'invoicing' ); ?></span> |
|
| 56 | - <input type="number" step="any" min="0" max="99" name="tax_rates[<?php echo esc_attr( $key ); ?>][reduced_rate]" value="<?php echo esc_attr( $tax_rate['reduced_rate'] ); ?>"/> |
|
| 55 | + <span class="screen-reader-text"><?php esc_html_e('Reduced Rate', 'invoicing'); ?></span> |
|
| 56 | + <input type="number" step="any" min="0" max="99" name="tax_rates[<?php echo esc_attr($key); ?>][reduced_rate]" value="<?php echo esc_attr($tax_rate['reduced_rate']); ?>"/> |
|
| 57 | 57 | </label> |
| 58 | 58 | </td> |
| 59 | 59 | |
| 60 | 60 | <td class="wpinv_tax_name"> |
| 61 | 61 | <label class="w-100"> |
| 62 | - <span class="screen-reader-text"><?php esc_html_e( 'Tax Name', 'invoicing' ); ?></span> |
|
| 63 | - <input type="text" name="tax_rates[<?php echo esc_attr( $key ); ?>][name]" value="<?php echo esc_attr( $tax_rate['name'] ); ?>"/> |
|
| 62 | + <span class="screen-reader-text"><?php esc_html_e('Tax Name', 'invoicing'); ?></span> |
|
| 63 | + <input type="text" name="tax_rates[<?php echo esc_attr($key); ?>][name]" value="<?php echo esc_attr($tax_rate['name']); ?>"/> |
|
| 64 | 64 | </label> |
| 65 | 65 | </td> |
| 66 | 66 | |
| 67 | 67 | <td class="wpinv_tax_remove"> |
| 68 | - <button type="button" class="close btn-close wpinv_remove_tax_rate" aria-label="<?php esc_attr_e( 'Delete', 'invoicing' ); ?>" title="<?php esc_attr_e( 'Delete', 'invoicing' ); ?>"> |
|
| 69 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
| 68 | + <button type="button" class="close btn-close wpinv_remove_tax_rate" aria-label="<?php esc_attr_e('Delete', 'invoicing'); ?>" title="<?php esc_attr_e('Delete', 'invoicing'); ?>"> |
|
| 69 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
| 70 | 70 | <span aria-hidden="true">×</span> |
| 71 | 71 | <?php endif; ?> |
| 72 | 72 | </button> |