@@ -7,104 +7,104 @@ |
||
| 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( 'Default Date', 'invoicing' ); ?></span> |
|
| 24 | - <?php echo wpi_help_tip( sprintf( __( 'You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing' ), current_time( 'Y-m-d' ) ), false, true ); ?> |
|
| 25 | - <input v-model='active_form_element.default_date' placeholder="<?php esc_attr_e( 'None', 'invoicing' ); ?>" class='form-control' type="text"/> |
|
| 23 | + <span><?php esc_html_e('Default Date', 'invoicing'); ?></span> |
|
| 24 | + <?php echo wpi_help_tip(sprintf(__('You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing'), current_time('Y-m-d')), false, true); ?> |
|
| 25 | + <input v-model='active_form_element.default_date' placeholder="<?php esc_attr_e('None', 'invoicing'); ?>" class='form-control' type="text"/> |
|
| 26 | 26 | </label> |
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | 29 | <div class='form-group'> |
| 30 | 30 | <label class="d-block"> |
| 31 | - <span><?php esc_html_e( 'Minimum Date', 'invoicing' ); ?></span> |
|
| 32 | - <?php echo wpi_help_tip( sprintf( __( 'You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing' ), current_time( 'Y-m-d' ) ), false, true ); ?> |
|
| 33 | - <input v-model='active_form_element.min_date' placeholder="<?php esc_attr_e( 'None', 'invoicing' ); ?>" class='form-control' type="text"/> |
|
| 34 | - <small class="form-text text-muted"><?php _e( 'Specify the minimum/earliest date (inclusively) allowed for selection.', 'invoicing' ); ?></small> |
|
| 31 | + <span><?php esc_html_e('Minimum Date', 'invoicing'); ?></span> |
|
| 32 | + <?php echo wpi_help_tip(sprintf(__('You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing'), current_time('Y-m-d')), false, true); ?> |
|
| 33 | + <input v-model='active_form_element.min_date' placeholder="<?php esc_attr_e('None', 'invoicing'); ?>" class='form-control' type="text"/> |
|
| 34 | + <small class="form-text text-muted"><?php _e('Specify the minimum/earliest date (inclusively) allowed for selection.', 'invoicing'); ?></small> |
|
| 35 | 35 | </label> |
| 36 | 36 | </div> |
| 37 | 37 | |
| 38 | 38 | <div class='form-group'> |
| 39 | 39 | <label class="d-block"> |
| 40 | - <span><?php esc_html_e( 'Maximum Date', 'invoicing' ); ?></span> |
|
| 41 | - <?php echo wpi_help_tip( sprintf( __( 'You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing' ), current_time( 'Y-m-d' ) ), false, true ); ?> |
|
| 42 | - <input v-model='active_form_element.max_date' placeholder="<?php esc_attr_e( 'None', 'invoicing' ); ?>" class='form-control' type="text"/> |
|
| 43 | - <small class="form-text text-muted"><?php _e( 'Specify the maximum/latest date (inclusively) allowed for selection.', 'invoicing' ); ?></small> |
|
| 40 | + <span><?php esc_html_e('Maximum Date', 'invoicing'); ?></span> |
|
| 41 | + <?php echo wpi_help_tip(sprintf(__('You can enter the shortcut "today" or enter a date matching the format Y-m-d, e.g %s', 'invoicing'), current_time('Y-m-d')), false, true); ?> |
|
| 42 | + <input v-model='active_form_element.max_date' placeholder="<?php esc_attr_e('None', 'invoicing'); ?>" class='form-control' type="text"/> |
|
| 43 | + <small class="form-text text-muted"><?php _e('Specify the maximum/latest date (inclusively) allowed for selection.', 'invoicing'); ?></small> |
|
| 44 | 44 | </label> |
| 45 | 45 | </div> |
| 46 | 46 | |
| 47 | 47 | <div class='form-group'> |
| 48 | 48 | <label class="d-block"> |
| 49 | - <span><?php esc_html_e( 'Disabled Dates', 'invoicing' ); ?></span> |
|
| 50 | - <?php echo wpi_help_tip( sprintf( __( 'You can use the shortcut "today" or enter dates matching the format Y-m-d, e.g %s', 'invoicing' ), current_time( 'Y-m-d' ) ), false, true ); ?> |
|
| 51 | - <input v-model='active_form_element.disabled_dates' placeholder="<?php echo esc_attr( sprintf( __( 'For example, %s', 'invoicing' ), 'today,2025-04-01|2025-05-01,2025-09-01|2025-12-01' ) ); ?>" class='form-control' type="text"/> |
|
| 52 | - <small class="form-text text-muted"><?php _e( 'Specify the dates to ignore. Use commas to separate dates and "|" to separate date ranges.', 'invoicing' ); ?></small> |
|
| 49 | + <span><?php esc_html_e('Disabled Dates', 'invoicing'); ?></span> |
|
| 50 | + <?php echo wpi_help_tip(sprintf(__('You can use the shortcut "today" or enter dates matching the format Y-m-d, e.g %s', 'invoicing'), current_time('Y-m-d')), false, true); ?> |
|
| 51 | + <input v-model='active_form_element.disabled_dates' placeholder="<?php echo esc_attr(sprintf(__('For example, %s', 'invoicing'), 'today,2025-04-01|2025-05-01,2025-09-01|2025-12-01')); ?>" class='form-control' type="text"/> |
|
| 52 | + <small class="form-text text-muted"><?php _e('Specify the dates to ignore. Use commas to separate dates and "|" to separate date ranges.', 'invoicing'); ?></small> |
|
| 53 | 53 | </label> |
| 54 | 54 | </div> |
| 55 | 55 | |
| 56 | 56 | <div class='form-group'> |
| 57 | 57 | <label class="d-block"> |
| 58 | - <span><?php esc_html_e( 'Disable Days', 'invoicing' ); ?></span> |
|
| 58 | + <span><?php esc_html_e('Disable Days', 'invoicing'); ?></span> |
|
| 59 | 59 | <gpselect2 class='form-control custom-select' v-model='active_form_element.disable_days' multiple> |
| 60 | - <option value='0'><?php esc_html_e( 'Sundays', 'invoicing' ); ?></option> |
|
| 61 | - <option value='1'><?php esc_html_e( 'Mondays', 'invoicing' ); ?></option> |
|
| 62 | - <option value='2'><?php esc_html_e( 'Tuesdays', 'invoicing' ); ?></option> |
|
| 63 | - <option value='3'><?php esc_html_e( 'Wednesdays', 'invoicing' ); ?></option> |
|
| 64 | - <option value='4'><?php esc_html_e( 'Thursdays', 'invoicing' ); ?></option> |
|
| 65 | - <option value='5'><?php esc_html_e( 'Fridays', 'invoicing' ); ?></option> |
|
| 66 | - <option value='6'><?php esc_html_e( 'Saturdays', 'invoicing' ); ?></option> |
|
| 60 | + <option value='0'><?php esc_html_e('Sundays', 'invoicing'); ?></option> |
|
| 61 | + <option value='1'><?php esc_html_e('Mondays', 'invoicing'); ?></option> |
|
| 62 | + <option value='2'><?php esc_html_e('Tuesdays', 'invoicing'); ?></option> |
|
| 63 | + <option value='3'><?php esc_html_e('Wednesdays', 'invoicing'); ?></option> |
|
| 64 | + <option value='4'><?php esc_html_e('Thursdays', 'invoicing'); ?></option> |
|
| 65 | + <option value='5'><?php esc_html_e('Fridays', 'invoicing'); ?></option> |
|
| 66 | + <option value='6'><?php esc_html_e('Saturdays', 'invoicing'); ?></option> |
|
| 67 | 67 | </gpselect2> |
| 68 | - <small class="form-text text-muted"><?php _e( 'Optionally specify the days of the week to disable.', 'invoicing' ); ?></small> |
|
| 68 | + <small class="form-text text-muted"><?php _e('Optionally specify the days of the week to disable.', 'invoicing'); ?></small> |
|
| 69 | 69 | </label> |
| 70 | 70 | </div> |
| 71 | 71 | |
| 72 | 72 | <div class='form-group'> |
| 73 | 73 | <label class="d-block"> |
| 74 | - <span><?php esc_html_e( 'Mode', 'invoicing' ); ?></span> |
|
| 74 | + <span><?php esc_html_e('Mode', 'invoicing'); ?></span> |
|
| 75 | 75 | <select class='form-control custom-select' v-model='active_form_element.mode'> |
| 76 | - <option value='single'><?php esc_html_e( 'Users can only select a single date', 'invoicing' ); ?></option> |
|
| 77 | - <option value='range'><?php esc_html_e( 'Users can select a date range', 'invoicing' ); ?></option> |
|
| 78 | - <option value='multiple'><?php esc_html_e( 'Users can select multiple dates', 'invoicing' ); ?></option> |
|
| 76 | + <option value='single'><?php esc_html_e('Users can only select a single date', 'invoicing'); ?></option> |
|
| 77 | + <option value='range'><?php esc_html_e('Users can select a date range', 'invoicing'); ?></option> |
|
| 78 | + <option value='multiple'><?php esc_html_e('Users can select multiple dates', 'invoicing'); ?></option> |
|
| 79 | 79 | </select> |
| 80 | 80 | </label> |
| 81 | 81 | </div> |
| 82 | 82 | |
| 83 | 83 | <div class='form-group'> |
| 84 | 84 | <label class="d-block"> |
| 85 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
| 86 | - <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> |
|
| 87 | - <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 85 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
| 86 | + <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> |
|
| 87 | + <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small> |
|
| 88 | 88 | </label> |
| 89 | 89 | </div> |
| 90 | 90 | |
| 91 | 91 | <div class='form-group form-check'> |
| 92 | 92 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
| 93 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
| 93 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
| 94 | 94 | </div> |
| 95 | 95 | |
| 96 | 96 | <div class='form-group form-check'> |
| 97 | 97 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
| 98 | - <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> |
|
| 98 | + <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> |
|
| 99 | 99 | </div> |
| 100 | 100 | |
| 101 | 101 | <hr class='featurette-divider mt-4'> |
| 102 | 102 | |
| 103 | 103 | <div class='form-group'> |
| 104 | 104 | <label class="d-block"> |
| 105 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
| 105 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
| 106 | 106 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
| 107 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
| 107 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
| 108 | 108 | </label> |
| 109 | 109 | </div> |
| 110 | 110 | |
@@ -7,23 +7,23 @@ 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 v-if="!is_default"> |
| 15 | 15 | |
| 16 | 16 | <small class='form-text text-muted mb-2'> |
| 17 | - <?php esc_html_e( 'This section allows you to add an existing item to the form that users can then buy. If you do not add an item, ensure that you add a price select or input field to the form.', 'invoicing' ); ?> |
|
| 17 | + <?php esc_html_e('This section allows you to add an existing item to the form that users can then buy. If you do not add an item, ensure that you add a price select or input field to the form.', 'invoicing'); ?> |
|
| 18 | 18 | </small> |
| 19 | 19 | |
| 20 | 20 | <label class='form-group'> |
| 21 | 21 | <input v-model='active_form_element.hide_cart' type='checkbox' /> |
| 22 | - <span class='form-check-label'><?php esc_html_e( 'Hide cart details', 'invoicing' ); ?></span> |
|
| 22 | + <span class='form-check-label'><?php esc_html_e('Hide cart details', 'invoicing'); ?></span> |
|
| 23 | 23 | </label> |
| 24 | 24 | |
| 25 | 25 | <div class="mb-1"> |
| 26 | - <?php esc_html_e( 'Form Items', 'invoicing' ); ?> |
|
| 26 | + <?php esc_html_e('Form Items', 'invoicing'); ?> |
|
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | 29 | <draggable v-model='form_items' group='selectable_form_items'> |
@@ -42,22 +42,22 @@ discard block |
||
| 42 | 42 | <div class='p-3'> |
| 43 | 43 | |
| 44 | 44 | <span class='form-text'> |
| 45 | - <a target="_blank" :href="'<?php echo esc_url( admin_url( '/post.php?action=edit&post' ) ); ?>=' + item.id"> |
|
| 46 | - <?php _e( 'Edit the item name, price and other details', 'invoicing' ); ?> |
|
| 45 | + <a target="_blank" :href="'<?php echo esc_url(admin_url('/post.php?action=edit&post')); ?>=' + item.id"> |
|
| 46 | + <?php _e('Edit the item name, price and other details', 'invoicing'); ?> |
|
| 47 | 47 | </a> |
| 48 | 48 | </span> |
| 49 | 49 | |
| 50 | 50 | <label class='form-group d-block'> |
| 51 | 51 | <input v-model='item.allow_quantities' type='checkbox' /> |
| 52 | - <span><?php _e( 'Allow users to buy several quantities', 'invoicing' ); ?></span> |
|
| 52 | + <span><?php _e('Allow users to buy several quantities', 'invoicing'); ?></span> |
|
| 53 | 53 | </label> |
| 54 | 54 | |
| 55 | 55 | <label class='form-group d-block'> |
| 56 | 56 | <input v-model='item.required' type='checkbox' /> |
| 57 | - <span><?php _e( 'This item is required', 'invoicing' ); ?></span> |
|
| 57 | + <span><?php _e('This item is required', 'invoicing'); ?></span> |
|
| 58 | 58 | </label> |
| 59 | 59 | |
| 60 | - <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e( 'Delete Item', 'invoicing' ); ?></button> |
|
| 60 | + <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e('Delete Item', 'invoicing'); ?></button> |
|
| 61 | 61 | |
| 62 | 62 | </div> |
| 63 | 63 | </div> |
@@ -65,19 +65,19 @@ discard block |
||
| 65 | 65 | </div> |
| 66 | 66 | </draggable> |
| 67 | 67 | |
| 68 | - <small v-if='! form_items.length' class='form-text text-danger'><?php _e( 'You have not set up any items. Please select an item below or create a new item.', 'invoicing' ); ?></small> |
|
| 68 | + <small v-if='! form_items.length' class='form-text text-danger'><?php _e('You have not set up any items. Please select an item below or create a new item.', 'invoicing'); ?></small> |
|
| 69 | 69 | |
| 70 | 70 | <div class="mt-4 mb-4"> |
| 71 | 71 | |
| 72 | 72 | <div class="mb-2"> |
| 73 | 73 | <select class='w-100' v-init-item-search> |
| 74 | - <option value="" selected="selected"><?php _e( 'Select an item to add...', 'invoicing' ); ?></option> |
|
| 74 | + <option value="" selected="selected"><?php _e('Select an item to add...', 'invoicing'); ?></option> |
|
| 75 | 75 | </select> |
| 76 | 76 | |
| 77 | 77 | </div> |
| 78 | 78 | |
| 79 | - <button type="button" @click.prevent='addSelectedItem' class="button button-primary"><?php _e( 'Add Selected Item', 'invoicing' ); ?></button> |
|
| 80 | - <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_item' ) ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item.', 'invoicing' ); ?></a> |
|
| 79 | + <button type="button" @click.prevent='addSelectedItem' class="button button-primary"><?php _e('Add Selected Item', 'invoicing'); ?></button> |
|
| 80 | + <a href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_item')); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item.', 'invoicing'); ?></a> |
|
| 81 | 81 | |
| 82 | 82 | </div> |
| 83 | 83 | </div> |
@@ -86,13 +86,13 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | <label class="w-100 d-block"> |
| 88 | 88 | |
| 89 | - <span><?php esc_html_e( 'Let customers...', 'invoicing' ); ?></span> |
|
| 89 | + <span><?php esc_html_e('Let customers...', 'invoicing'); ?></span> |
|
| 90 | 90 | |
| 91 | 91 | <select class='w-100' style="padding: 6px 24px 6px 8px; border-color: #e0e0e0;" v-model='active_form_element.items_type'> |
| 92 | - <option value='total'><?php _e( 'Buy all items on the list', 'invoicing' ); ?></option> |
|
| 93 | - <option value='radio'><?php _e( 'Select a single item from the list', 'invoicing' ); ?></option> |
|
| 94 | - <option value='checkbox'><?php _e( 'Select one or more items on the list', 'invoicing' ); ?></option> |
|
| 95 | - <option value='select'><?php _e( 'Select a single item from a dropdown', 'invoicing' ); ?></option> |
|
| 92 | + <option value='total'><?php _e('Buy all items on the list', 'invoicing'); ?></option> |
|
| 93 | + <option value='radio'><?php _e('Select a single item from the list', 'invoicing'); ?></option> |
|
| 94 | + <option value='checkbox'><?php _e('Select one or more items on the list', 'invoicing'); ?></option> |
|
| 95 | + <option value='select'><?php _e('Select a single item from a dropdown', 'invoicing'); ?></option> |
|
| 96 | 96 | </select> |
| 97 | 97 | |
| 98 | 98 | </label> |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | <div class='form-group'> |
| 103 | 103 | <label class="d-block"> |
| 104 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
| 105 | - <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> |
|
| 106 | - <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 104 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
| 105 | + <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> |
|
| 106 | + <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small> |
|
| 107 | 107 | </label> |
| 108 | 108 | </div> |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | ?> |
| 12 | 12 | |
| 13 | 13 | <hr class="featurette-divider" /> |
@@ -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 | echo aui()->alert( |
| 13 | 13 | array( |
| 14 | - 'content' => esc_html__( 'The gateway select box will appear here', 'invoicing' ), |
|
| 14 | + 'content' => esc_html__('The gateway select box will appear here', 'invoicing'), |
|
| 15 | 15 | 'type' => 'info', |
| 16 | 16 | ) |
| 17 | 17 | ); |
@@ -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 | echo aui()->alert( |
| 13 | 13 | array( |
| 14 | - 'content' => esc_html__( 'The total payable amount will appear here', 'invoicing' ), |
|
| 14 | + 'content' => esc_html__('The total payable amount will appear here', 'invoicing'), |
|
| 15 | 15 | 'type' => 'info', |
| 16 | 16 | ) |
| 17 | 17 | ); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | -defined( 'ABSPATH' ) || exit; |
|
| 11 | +defined('ABSPATH') || exit; |
|
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | <component :is='form_element.level' v-html='form_element.text'></component> |
@@ -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,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | <div class="input-group"> |
| 28 | 28 | |
| 29 | - <?php if ( $position == 'left' ) : ?> |
|
| 29 | + <?php if ($position == 'left') : ?> |
|
| 30 | 30 | <div class="input-group-prepend"> |
| 31 | 31 | <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span> |
| 32 | 32 | </div> |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | <input :placeholder='form_element.placeholder' class='form-control' type='text'> |
| 36 | 36 | |
| 37 | - <?php if ( $position == 'right' ) : ?> |
|
| 37 | + <?php if ($position == 'right') : ?> |
|
| 38 | 38 | <div class="input-group-append"> |
| 39 | 39 | <span class="input-group-text"><?php echo wpinv_currency_symbol(); ?></span> |
| 40 | 40 | </div> |
@@ -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 v-if='!is_default'> |
| 15 | - <div class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here. Click to set items.', 'invoicing' ); ?></div> |
|
| 15 | + <div class='alert alert-info' role='alert'><?php _e('Item totals will appear here. Click to set items.', 'invoicing'); ?></div> |
|
| 16 | 16 | </div> |
| 17 | 17 | |
| 18 | 18 | <div v-if='is_default'> |
| 19 | - <div class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here.', 'invoicing' ); ?></div> |
|
| 19 | + <div class='alert alert-info' role='alert'><?php _e('Item totals will appear here.', 'invoicing'); ?></div> |
|
| 20 | 20 | </div> |
@@ -7,27 +7,27 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Current page. |
| 13 | -$current_page = empty( $_GET['page'] ) ? 1 : absint( $_GET['page'] ); |
|
| 13 | +$current_page = empty($_GET['page']) ? 1 : absint($_GET['page']); |
|
| 14 | 14 | |
| 15 | 15 | // Fires before displaying user invoices. |
| 16 | -do_action( 'wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type ); |
|
| 16 | +do_action('wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type); |
|
| 17 | 17 | |
| 18 | 18 | ?> |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | <div class="table-responsive"> |
| 22 | - <table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class( $post_type ); ?>"> |
|
| 22 | + <table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class($post_type); ?>"> |
|
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | <thead> |
| 26 | 26 | <tr> |
| 27 | 27 | |
| 28 | - <?php foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : ?> |
|
| 29 | - <th class="<?php echo sanitize_html_class( $column_id ); ?> <?php echo ( ! empty( $column_name['class'] ) ? sanitize_html_class( $column_name['class'] ) : ''); ?> border-bottom-0"> |
|
| 30 | - <span class="nobr"><?php echo esc_html( $column_name['title'] ); ?></span> |
|
| 28 | + <?php foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) : ?> |
|
| 29 | + <th class="<?php echo sanitize_html_class($column_id); ?> <?php echo (!empty($column_name['class']) ? sanitize_html_class($column_name['class']) : ''); ?> border-bottom-0"> |
|
| 30 | + <span class="nobr"><?php echo esc_html($column_name['title']); ?></span> |
|
| 31 | 31 | </th> |
| 32 | 32 | <?php endforeach; ?> |
| 33 | 33 | |
@@ -37,43 +37,43 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | <tbody> |
| 40 | - <?php foreach ( $invoices->invoices as $invoice ) : ?> |
|
| 40 | + <?php foreach ($invoices->invoices as $invoice) : ?> |
|
| 41 | 41 | |
| 42 | - <tr class="wpinv-item wpinv-item-<?php echo sanitize_html_class( $invoice->get_status() ); ?>"> |
|
| 42 | + <tr class="wpinv-item wpinv-item-<?php echo sanitize_html_class($invoice->get_status()); ?>"> |
|
| 43 | 43 | <?php |
| 44 | 44 | |
| 45 | - foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : |
|
| 45 | + foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) : |
|
| 46 | 46 | |
| 47 | - $column_id = sanitize_html_class( $column_id ); |
|
| 48 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
| 47 | + $column_id = sanitize_html_class($column_id); |
|
| 48 | + $class = empty($column_name['class']) ? '' : sanitize_html_class($column_name['class']); |
|
| 49 | 49 | |
| 50 | 50 | echo "<td class='$column_id $class'>"; |
| 51 | - switch ( $column_id ) { |
|
| 51 | + switch ($column_id) { |
|
| 52 | 52 | |
| 53 | 53 | case 'invoice-number': |
| 54 | - echo wp_kses_post( wpinv_invoice_link( $invoice ) ); |
|
| 54 | + echo wp_kses_post(wpinv_invoice_link($invoice)); |
|
| 55 | 55 | break; |
| 56 | 56 | |
| 57 | 57 | case 'created-date': |
| 58 | - echo getpaid_format_date_value( $invoice->get_date_created() ); |
|
| 58 | + echo getpaid_format_date_value($invoice->get_date_created()); |
|
| 59 | 59 | break; |
| 60 | 60 | |
| 61 | 61 | case 'payment-date': |
| 62 | - if ( $invoice->needs_payment() ) { |
|
| 62 | + if ($invoice->needs_payment()) { |
|
| 63 | 63 | echo '—'; |
| 64 | 64 | } else { |
| 65 | - echo getpaid_format_date_value( $invoice->get_date_completed() ); |
|
| 65 | + echo getpaid_format_date_value($invoice->get_date_completed()); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | break; |
| 69 | 69 | |
| 70 | 70 | case 'invoice-status': |
| 71 | - echo wp_kses_post( $invoice->get_status_label_html() ); |
|
| 71 | + echo wp_kses_post($invoice->get_status_label_html()); |
|
| 72 | 72 | |
| 73 | 73 | break; |
| 74 | 74 | |
| 75 | 75 | case 'invoice-total': |
| 76 | - echo wpinv_price( $invoice->get_total(), $invoice->get_currency() ); |
|
| 76 | + echo wpinv_price($invoice->get_total(), $invoice->get_currency()); |
|
| 77 | 77 | |
| 78 | 78 | break; |
| 79 | 79 | |
@@ -82,47 +82,47 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | 'pay' => array( |
| 84 | 84 | 'url' => $invoice->get_checkout_payment_url(), |
| 85 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
| 85 | + 'name' => __('Pay Now', 'invoicing'), |
|
| 86 | 86 | 'class' => 'btn-success', |
| 87 | 87 | ), |
| 88 | 88 | |
| 89 | 89 | 'print' => array( |
| 90 | 90 | 'url' => $invoice->get_view_url(), |
| 91 | - 'name' => __( 'View', 'invoicing' ), |
|
| 91 | + 'name' => __('View', 'invoicing'), |
|
| 92 | 92 | 'class' => 'btn-secondary', |
| 93 | 93 | 'attrs' => 'target="_blank"', |
| 94 | 94 | ), |
| 95 | 95 | ); |
| 96 | 96 | |
| 97 | - if ( ! $invoice->needs_payment() ) { |
|
| 98 | - unset( $actions['pay'] ); |
|
| 97 | + if (!$invoice->needs_payment()) { |
|
| 98 | + unset($actions['pay']); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - if ( $invoice->needs_payment() ) { |
|
| 101 | + if ($invoice->needs_payment()) { |
|
| 102 | 102 | $actions['delete'] = array( |
| 103 | - 'url' => getpaid_get_authenticated_action_url( 'delete_invoice', add_query_arg( 'invoice_id', $invoice->get_id() ) ), |
|
| 104 | - 'name' => __( 'Delete', 'invoicing' ), |
|
| 103 | + 'url' => getpaid_get_authenticated_action_url('delete_invoice', add_query_arg('invoice_id', $invoice->get_id())), |
|
| 104 | + 'name' => __('Delete', 'invoicing'), |
|
| 105 | 105 | 'class' => 'btn-danger', |
| 106 | 106 | ); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type ); |
|
| 109 | + $actions = apply_filters('wpinv_user_invoices_actions', $actions, $invoice, $post_type); |
|
| 110 | 110 | |
| 111 | - foreach ( $actions as $key => $action ) { |
|
| 112 | - $class = ! empty( $action['class'] ) ? sanitize_html_class( $action['class'] ) : ''; |
|
| 113 | - echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( ! empty( $action['attrs'] ) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
| 111 | + foreach ($actions as $key => $action) { |
|
| 112 | + $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
| 113 | + echo '<a href="' . esc_url($action['url']) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class($key) . '" ' . (!empty($action['attrs']) ? $action['attrs'] : '') . '>' . $action['name'] . '</a>'; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | break; |
| 117 | 117 | |
| 118 | 118 | default: |
| 119 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
| 119 | + do_action("wpinv_user_invoices_column_$column_id", $invoice); |
|
| 120 | 120 | break; |
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
| 125 | + do_action("wpinv_user_invoices_column_after_$column_id", $invoice); |
|
| 126 | 126 | |
| 127 | 127 | echo '</td>'; |
| 128 | 128 | |
@@ -136,16 +136,16 @@ discard block |
||
| 136 | 136 | </table> |
| 137 | 137 | </div> |
| 138 | 138 | |
| 139 | - <?php do_action( 'wpinv_before_user_invoices_pagination' ); ?> |
|
| 139 | + <?php do_action('wpinv_before_user_invoices_pagination'); ?> |
|
| 140 | 140 | |
| 141 | - <?php if ( 1 < $invoices->max_num_pages ) : ?> |
|
| 141 | + <?php if (1 < $invoices->max_num_pages) : ?> |
|
| 142 | 142 | <div class="invoicing-Pagination"> |
| 143 | 143 | <?php |
| 144 | 144 | $big = 999999; |
| 145 | 145 | |
| 146 | 146 | echo paginate_links( |
| 147 | 147 | array( |
| 148 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
| 148 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
| 149 | 149 | 'format' => '?paged=%#%', |
| 150 | 150 | 'total' => $invoices->max_num_pages, |
| 151 | 151 | ) |
@@ -154,4 +154,4 @@ discard block |
||
| 154 | 154 | </div> |
| 155 | 155 | <?php endif; ?> |
| 156 | 156 | |
| 157 | -<?php do_action( 'wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type ); ?> |
|
| 157 | +<?php do_action('wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type); ?> |
|