@@ -7,25 +7,25 @@ |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | -$label = empty( $label ) ? '' : wp_kses_post( $label ); |
|
| 12 | +$label = empty($label) ? '' : wp_kses_post($label); |
|
| 13 | 13 | |
| 14 | -if ( ! empty( $required ) ) { |
|
| 14 | +if (!empty($required)) { |
|
| 15 | 15 | $label .= "<span class='text-danger'> *</span>"; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -$current_url = ! empty( $_GET['current_url'] ) ? esc_url_raw( urldecode( $_GET['current_url'] ) ) : get_permalink(); |
|
| 18 | +$current_url = !empty($_GET['current_url']) ? esc_url_raw(urldecode($_GET['current_url'])) : get_permalink(); |
|
| 19 | 19 | echo aui()->input( |
| 20 | 20 | array( |
| 21 | - 'name' => esc_attr( $id ), |
|
| 22 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
| 23 | - 'placeholder'=> empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
| 24 | - 'required' => ! empty( $required ), |
|
| 21 | + 'name' => esc_attr($id), |
|
| 22 | + 'id' => esc_attr($id) . uniqid('_'), |
|
| 23 | + 'placeholder'=> empty($placeholder) ? '' : esc_attr($placeholder), |
|
| 24 | + 'required' => !empty($required), |
|
| 25 | 25 | 'label' => $label, |
| 26 | 26 | 'label_type' => 'vertical', |
| 27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
| 27 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
| 28 | 28 | 'type' => 'url', |
| 29 | - 'value' => ! empty( $default_current_post ) ? $current_url : '', |
|
| 29 | + 'value' => !empty($default_current_post) ? $current_url : '', |
|
| 30 | 30 | ) |
| 31 | 31 | ); |
@@ -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'> |
| 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( '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'> |
| 29 | 29 | <label class="d-block"> |
| 30 | - <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span> |
|
| 31 | - <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea> |
|
| 32 | - <small class="form-text text-muted"><?php _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 _e('HTML is allowed', 'invoicing'); ?></small> |
|
| 33 | 33 | </label> |
| 34 | 34 | </div> |
| 35 | 35 | |
| 36 | 36 | <div class='form-group 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 form-check'> |
| 42 | 42 | <input :id="active_form_element.id + '_edit_default_current'" v-model='active_form_element.default_current_post' type='checkbox' class='form-check-input' /> |
| 43 | - <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> |
|
| 43 | + <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> |
|
| 44 | 44 | </div> |
| 45 | 45 | |
| 46 | 46 | <hr class='featurette-divider mt-4'> |
| 47 | 47 | |
| 48 | 48 | <div class='form-group'> |
| 49 | 49 | <label class="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 | |