@@ -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-label form-group mb-3'> |
| 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 esc_html_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 esc_html_e('Edit the item name, price and other details', 'invoicing'); ?> |
|
| 47 | 47 | </a> |
| 48 | 48 | </span> |
| 49 | 49 | |
| 50 | 50 | <label class='form-label form-group mb-3 d-block'> |
| 51 | 51 | <input v-model='item.allow_quantities' type='checkbox' /> |
| 52 | - <span><?php esc_html_e( 'Allow users to buy several quantities', 'invoicing' ); ?></span> |
|
| 52 | + <span><?php esc_html_e('Allow users to buy several quantities', 'invoicing'); ?></span> |
|
| 53 | 53 | </label> |
| 54 | 54 | |
| 55 | 55 | <label class='form-label form-group mb-3 d-block'> |
| 56 | 56 | <input v-model='item.required' type='checkbox' /> |
| 57 | - <span><?php esc_html_e( 'This item is required', 'invoicing' ); ?></span> |
|
| 57 | + <span><?php esc_html_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 esc_html_e( 'Delete Item', 'invoicing' ); ?></button> |
|
| 60 | + <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php esc_html_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 esc_html_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 esc_html_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 esc_html_e( 'Select an item to add...', 'invoicing' ); ?></option> |
|
| 74 | + <option value="" selected="selected"><?php esc_html_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 esc_html_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 esc_html_e( 'Create New Item.', 'invoicing' ); ?></a> |
|
| 79 | + <button type="button" @click.prevent='addSelectedItem' class="button button-primary"><?php esc_html_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 esc_html_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="form-label 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 esc_html_e( 'Buy all items on the list', 'invoicing' ); ?></option> |
|
| 93 | - <option value='radio'><?php esc_html_e( 'Select a single item from the list', 'invoicing' ); ?></option> |
|
| 94 | - <option value='checkbox'><?php esc_html_e( 'Select one or more items on the list', 'invoicing' ); ?></option> |
|
| 95 | - <option value='select'><?php esc_html_e( 'Select a single item from a dropdown', 'invoicing' ); ?></option> |
|
| 92 | + <option value='total'><?php esc_html_e('Buy all items on the list', 'invoicing'); ?></option> |
|
| 93 | + <option value='radio'><?php esc_html_e('Select a single item from the list', 'invoicing'); ?></option> |
|
| 94 | + <option value='checkbox'><?php esc_html_e('Select one or more items on the list', 'invoicing'); ?></option> |
|
| 95 | + <option value='select'><?php esc_html_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 mb-3'> |
| 103 | 103 | <label class="form-label 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 esc_html_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 esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 107 | 107 | </label> |
| 108 | 108 | </div> |
@@ -7,42 +7,42 @@ |
||
| 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( '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 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 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 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 26 | 26 | </label> |
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | 29 | <div class='form-group mb-3 form-check'> |
| 30 | 30 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
| 31 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
| 31 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
| 32 | 32 | </div> |
| 33 | 33 | |
| 34 | 34 | <div class='form-group mb-3 form-check'> |
| 35 | 35 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
| 36 | - <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> |
|
| 36 | + <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> |
|
| 37 | 37 | </div> |
| 38 | 38 | |
| 39 | 39 | <hr class='featurette-divider mt-4'> |
| 40 | 40 | |
| 41 | 41 | <div class='form-group mb-3'> |
| 42 | 42 | <label class="form-label d-block"> |
| 43 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
| 43 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
| 44 | 44 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
| 45 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
| 45 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
| 46 | 46 | </label> |
| 47 | 47 | </div> |
| 48 | 48 | |
@@ -7,7 +7,7 @@ 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 | |
@@ -31,45 +31,45 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | <div class='form-group mb-3'> |
| 33 | 33 | <label class="form-label d-block"> |
| 34 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
| 34 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
| 35 | 35 | <input v-model='field.label' class='form-control' type="text"/> |
| 36 | 36 | </label> |
| 37 | 37 | </div> |
| 38 | 38 | |
| 39 | 39 | <div class='form-group mb-3'> |
| 40 | 40 | <label class="form-label d-block"> |
| 41 | - <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span> |
|
| 41 | + <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span> |
|
| 42 | 42 | <input v-model='field.placeholder' class='form-control' type="text"/> |
| 43 | 43 | </label> |
| 44 | 44 | </div> |
| 45 | 45 | |
| 46 | 46 | <div class='form-group mb-3'> |
| 47 | 47 | <label class="form-label d-block"> |
| 48 | - <span><?php esc_html_e( 'Width', 'invoicing' ); ?></span> |
|
| 48 | + <span><?php esc_html_e('Width', 'invoicing'); ?></span> |
|
| 49 | 49 | <select class='form-control custom-select' v-model='field.grid_width'> |
| 50 | - <option value='full'><?php esc_html_e( 'Full Width', 'invoicing' ); ?></option> |
|
| 51 | - <option value='half'><?php esc_html_e( 'Half Width', 'invoicing' ); ?></option> |
|
| 52 | - <option value='third'><?php esc_html_e( '1/3 Width', 'invoicing' ); ?></option> |
|
| 50 | + <option value='full'><?php esc_html_e('Full Width', 'invoicing'); ?></option> |
|
| 51 | + <option value='half'><?php esc_html_e('Half Width', 'invoicing'); ?></option> |
|
| 52 | + <option value='third'><?php esc_html_e('1/3 Width', 'invoicing'); ?></option> |
|
| 53 | 53 | </select> |
| 54 | 54 | </label> |
| 55 | 55 | </div> |
| 56 | 56 | |
| 57 | 57 | <div class='form-group mb-3'> |
| 58 | 58 | <label class="form-label d-block"> |
| 59 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
| 60 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='field.description' class='form-control' rows='3'></textarea> |
|
| 61 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 59 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
| 60 | + <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='field.description' class='form-control' rows='3'></textarea> |
|
| 61 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 62 | 62 | </label> |
| 63 | 63 | </div> |
| 64 | 64 | |
| 65 | 65 | <div class='form-group mb-3 form-check'> |
| 66 | 66 | <input :id="active_form_element.id + '_edit_required' + index" v-model='field.required' type='checkbox' class='form-check-input' /> |
| 67 | - <label class='form-check-label' :for="active_form_element.id + '_edit_required' + index"><?php esc_html_e( 'Is required', 'invoicing' ); ?></label> |
|
| 67 | + <label class='form-check-label' :for="active_form_element.id + '_edit_required' + index"><?php esc_html_e('Is required', 'invoicing'); ?></label> |
|
| 68 | 68 | </div> |
| 69 | 69 | |
| 70 | 70 | <div class='form-group mb-3 form-check'> |
| 71 | 71 | <input :id="active_form_element.id + '_edit_visible' + index" v-model='field.visible' type='checkbox' class='form-check-input' /> |
| 72 | - <label class='form-check-label' :for="active_form_element.id + '_edit_visible' + index"><?php esc_html_e( 'Is visible', 'invoicing' ); ?></label> |
|
| 72 | + <label class='form-check-label' :for="active_form_element.id + '_edit_visible' + index"><?php esc_html_e('Is visible', 'invoicing'); ?></label> |
|
| 73 | 73 | </div> |
| 74 | 74 | |
| 75 | 75 | </div> |
@@ -82,18 +82,18 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | <div class='form-group mb-3'> |
| 84 | 84 | <label class="form-label d-block"> |
| 85 | - <span><?php esc_html_e( 'Address Type', 'invoicing' ); ?><span> |
|
| 85 | + <span><?php esc_html_e('Address Type', 'invoicing'); ?><span> |
|
| 86 | 86 | <select class='form-control custom-select' v-model='active_form_element.address_type'> |
| 87 | - <option value='billing'><?php esc_html_e( 'Billing', 'invoicing' ); ?></option> |
|
| 88 | - <option value='shipping'><?php esc_html_e( 'Shipping', 'invoicing' ); ?></option> |
|
| 89 | - <option value='both'><?php esc_html_e( 'Both', 'invoicing' ); ?></option> |
|
| 87 | + <option value='billing'><?php esc_html_e('Billing', 'invoicing'); ?></option> |
|
| 88 | + <option value='shipping'><?php esc_html_e('Shipping', 'invoicing'); ?></option> |
|
| 89 | + <option value='both'><?php esc_html_e('Both', 'invoicing'); ?></option> |
|
| 90 | 90 | </select> |
| 91 | 91 | </label> |
| 92 | 92 | </div> |
| 93 | 93 | |
| 94 | 94 | <div class='form-group mb-3' v-if="active_form_element.address_type == 'both'"> |
| 95 | 95 | <label class="form-label d-block"> |
| 96 | - <span><?php esc_html_e( 'Shipping Address Toggle', 'invoicing' ); ?><span> |
|
| 96 | + <span><?php esc_html_e('Shipping Address Toggle', 'invoicing'); ?><span> |
|
| 97 | 97 | <input type="text" class='form-control custom-select' v-model='active_form_element.shipping_address_toggle' > |
| 98 | 98 | </label> |
| 99 | 99 | </div> |
@@ -7,54 +7,54 @@ |
||
| 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 | <div class='form-group mb-3 form-check'> |
| 47 | 47 | <input :id="active_form_element.id + '_edit_default_current'" v-model='active_form_element.default_current_post' type='checkbox' class='form-check-input' /> |
| 48 | - <label class='form-check-label' :for="active_form_element.id + '_edit_default_current'"><?php esc_html_e( 'Default to the current page\'s URL?', 'invoicing' ); ?></label> |
|
| 48 | + <label class='form-check-label' :for="active_form_element.id + '_edit_default_current'"><?php esc_html_e('Default to the current page\'s URL?', 'invoicing'); ?></label> |
|
| 49 | 49 | </div> |
| 50 | 50 | |
| 51 | 51 | <hr class='featurette-divider mt-4'> |
| 52 | 52 | |
| 53 | 53 | <div class='form-group mb-3'> |
| 54 | 54 | <label class="form-label d-block"> |
| 55 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
| 55 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
| 56 | 56 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
| 57 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
| 57 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
| 58 | 58 | </label> |
| 59 | 59 | </div> |
| 60 | 60 | |
@@ -7,52 +7,52 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | 14 | <div class='form-group mb-3'> |
| 15 | 15 | <label class="form-label d-block"> |
| 16 | - <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span> |
|
| 16 | + <span><?php esc_html_e('Field Label', 'invoicing'); ?></span> |
|
| 17 | 17 | <input v-model='active_form_element.label' class='form-control' type="text"/> |
| 18 | 18 | </label> |
| 19 | 19 | </div> |
| 20 | 20 | |
| 21 | 21 | <div class='form-group mb-3'> |
| 22 | 22 | <label class="form-label d-block"> |
| 23 | - <span><?php esc_html_e( '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 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 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 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 26 | 26 | </label> |
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | 29 | <div class='form-group mb-3 form-check'> |
| 30 | 30 | <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' /> |
| 31 | - <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label> |
|
| 31 | + <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label> |
|
| 32 | 32 | </div> |
| 33 | 33 | |
| 34 | 34 | <div class='form-group mb-3 form-check'> |
| 35 | 35 | <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' /> |
| 36 | - <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> |
|
| 36 | + <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> |
|
| 37 | 37 | </div> |
| 38 | 38 | |
| 39 | 39 | <hr class='featurette-divider mt-4'> |
| 40 | 40 | |
| 41 | 41 | <div class='form-group mb-3'> |
| 42 | 42 | <label class="form-label d-block"> |
| 43 | - <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span> |
|
| 43 | + <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span> |
|
| 44 | 44 | <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" /> |
| 45 | - <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span> |
|
| 45 | + <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span> |
|
| 46 | 46 | </label> |
| 47 | 47 | </div> |
| 48 | 48 | |
| 49 | 49 | <hr class='featurette-divider mt-4'> |
| 50 | 50 | |
| 51 | -<h5><?php esc_html_e( 'Available Options', 'invoicing' ); ?></h5> |
|
| 51 | +<h5><?php esc_html_e('Available Options', 'invoicing'); ?></h5> |
|
| 52 | 52 | |
| 53 | 53 | <div class='form-group mb-3 input-group' v-for='(option, index) in active_form_element.options'> |
| 54 | 54 | <input type='text' class='form-control' v-model='active_form_element.options[index]'> |
| 55 | - <?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?> |
|
| 55 | + <?php if (empty($GLOBALS['aui_bs5'])) : ?> |
|
| 56 | 56 | <div class="input-group-append "> |
| 57 | 57 | <button class='button button-secondary border' type='button' @click.prevent='active_form_element.options.splice(index, 1)'><span class='dashicons dashicons-trash'></span></button> |
| 58 | 58 | </div> |
@@ -62,5 +62,5 @@ discard block |
||
| 62 | 62 | </div> |
| 63 | 63 | |
| 64 | 64 | <div class='form-group mb-3'> |
| 65 | - <button class='button button-secondary' type='button' @click.prevent='active_form_element.options.push("")'><?php esc_html_e( 'Add Option', 'invoicing' ); ?></button> |
|
| 65 | + <button class='button button-secondary' type='button' @click.prevent='active_form_element.options.push("")'><?php esc_html_e('Add Option', 'invoicing'); ?></button> |
|
| 66 | 66 | </div> |
@@ -7,12 +7,12 @@ |
||
| 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 | - <label class="form-label " :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Enter your text', 'invoicing' ); ?></label> |
|
| 15 | + <label class="form-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 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 17 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 18 | 18 | </div> |
@@ -7,45 +7,45 @@ |
||
| 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( 'Button Text', 'invoicing' ); ?></span> |
|
| 16 | + <span><?php esc_html_e('Button Text', 'invoicing'); ?></span> |
|
| 17 | 17 | <input v-model='active_form_element.label' class='form-control' type="text"/> |
| 18 | - <small class="form-text text-muted"><?php esc_html_e( '%price% will be replaced by the total payable amount', 'invoicing' ); ?></small> |
|
| 18 | + <small class="form-text text-muted"><?php esc_html_e('%price% will be replaced by the total payable amount', 'invoicing'); ?></small> |
|
| 19 | 19 | </label> |
| 20 | 20 | </div> |
| 21 | 21 | |
| 22 | 22 | <div class='form-group mb-3'> |
| 23 | 23 | <label class="form-label d-block"> |
| 24 | - <span><?php esc_html_e( 'Free Checkout Text', 'invoicing' ); ?></span> |
|
| 24 | + <span><?php esc_html_e('Free Checkout Text', 'invoicing'); ?></span> |
|
| 25 | 25 | <input v-model='active_form_element.free' class='form-control' type="text"/> |
| 26 | - <small class="form-text text-muted"><?php esc_html_e( 'The text to display if the total payable amount is zero', 'invoicing' ); ?></small> |
|
| 26 | + <small class="form-text text-muted"><?php esc_html_e('The text to display if the total payable amount is zero', 'invoicing'); ?></small> |
|
| 27 | 27 | </label> |
| 28 | 28 | </div> |
| 29 | 29 | |
| 30 | 30 | <div class='form-group mb-3'> |
| 31 | 31 | <label class="form-label d-block"> |
| 32 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
| 33 | - <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> |
|
| 34 | - <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small> |
|
| 32 | + <span><?php esc_html_e('Help Text', 'invoicing'); ?></span> |
|
| 33 | + <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> |
|
| 34 | + <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small> |
|
| 35 | 35 | </label> |
| 36 | 36 | </div> |
| 37 | 37 | |
| 38 | 38 | <div class='form-group mb-3'> |
| 39 | - <label class="form-label" :for="active_form_element.id + '_edit_type'"><?php esc_html_e( 'Button Type', 'invoicing' ); ?></label> |
|
| 39 | + <label class="form-label" :for="active_form_element.id + '_edit_type'"><?php esc_html_e('Button Type', 'invoicing'); ?></label> |
|
| 40 | 40 | <select class='form-control custom-select' :id="active_form_element.id + '_edit_type'" v-model='active_form_element.class'> |
| 41 | - <option value='btn-primary'><?php esc_html_e( 'Primary', 'invoicing' ); ?></option> |
|
| 42 | - <option value='btn-secondary'><?php esc_html_e( 'Secondary', 'invoicing' ); ?></option> |
|
| 43 | - <option value='btn-success'><?php esc_html_e( 'Success', 'invoicing' ); ?></option> |
|
| 44 | - <option value='btn-danger'><?php esc_html_e( 'Danger', 'invoicing' ); ?></option> |
|
| 45 | - <option value='btn-warning'><?php esc_html_e( 'Warning', 'invoicing' ); ?></option> |
|
| 46 | - <option value='btn-info'><?php esc_html_e( 'Info', 'invoicing' ); ?></option> |
|
| 47 | - <option value='btn-light'><?php esc_html_e( 'Light', 'invoicing' ); ?></option> |
|
| 48 | - <option value='btn-dark'><?php esc_html_e( 'Dark', 'invoicing' ); ?></option> |
|
| 49 | - <option value='btn-link'><?php esc_html_e( 'Link', 'invoicing' ); ?></option> |
|
| 41 | + <option value='btn-primary'><?php esc_html_e('Primary', 'invoicing'); ?></option> |
|
| 42 | + <option value='btn-secondary'><?php esc_html_e('Secondary', 'invoicing'); ?></option> |
|
| 43 | + <option value='btn-success'><?php esc_html_e('Success', 'invoicing'); ?></option> |
|
| 44 | + <option value='btn-danger'><?php esc_html_e('Danger', 'invoicing'); ?></option> |
|
| 45 | + <option value='btn-warning'><?php esc_html_e('Warning', 'invoicing'); ?></option> |
|
| 46 | + <option value='btn-info'><?php esc_html_e('Info', 'invoicing'); ?></option> |
|
| 47 | + <option value='btn-light'><?php esc_html_e('Light', 'invoicing'); ?></option> |
|
| 48 | + <option value='btn-dark'><?php esc_html_e('Dark', 'invoicing'); ?></option> |
|
| 49 | + <option value='btn-link'><?php esc_html_e('Link', 'invoicing'); ?></option> |
|
| 50 | 50 | </select> |
| 51 | 51 | </div> |
@@ -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 | } |