| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
| 2 |
<div class="jltma-pop-contents-body" id="jltma_popup_modal_body"> |
| 3 |
|
| 4 |
<div class="jltma-spinner"></div> |
| 5 |
|
| 6 |
<div class="jltma-pop-contents-padding"> |
| 7 |
<form action="" method="get" id="jltma_popup_modal_form" data-open-editor="0" data-editor-url="<?php echo esc_url( get_admin_url() ); ?>" data-nonce="<?php echo esc_attr( wp_create_nonce('wp_rest') ); ?>"> |
| 8 |
<!-- Tab Contents Container --> |
| 9 |
<div class="jltma-modal-content-area"> |
| 10 |
<!-- General Tab Content --> |
| 11 |
<div class="jltma-tab-content jltma-tab-general active"> |
| 12 |
<div class="jltma-label-container"> |
| 13 |
<div class="jltma-row"> |
| 14 |
|
| 15 |
<div class="jltma-form-group mb-2 jltma-col-6"> |
| 16 |
<label for="jltma-popup-title"> |
| 17 |
<strong> |
| 18 |
<?php esc_html_e('Popup Name', 'master-addons'); ?> |
| 19 |
</strong> |
| 20 |
</label> |
| 21 |
</div> |
| 22 |
<div class="jltma-form-group mb-2 jltma-col-6"> |
| 23 |
<input required type="text" name="title" class="jltma_popup_modal-title jltma-form-control" placeholder="<?php echo esc_html__('Popup Name here', 'master-addons'); ?>"> |
| 24 |
</div> |
| 25 |
|
| 26 |
<input type="hidden" name="trigger_type" value="page_load"> |
| 27 |
<input type="hidden" name="trigger_delay" value="0"> |
| 28 |
|
| 29 |
<div class="jltma-form-group mb-2 jltma-col-6"> |
| 30 |
<label for="jltma-popup-activation-label"> |
| 31 |
<strong> |
| 32 |
<?php esc_html_e('Activation', 'master-addons'); ?> |
| 33 |
</strong> |
| 34 |
</label> |
| 35 |
</div> |
| 36 |
|
| 37 |
<div class="jltma-form-group mb-2 jltma-col-6 jtlma-mega-switcher"> |
| 38 |
<input type="checkbox" value="yes" class="jltma-admin-control-input jltma-enable-switcher" name="activation" id="jltma_popup_activation_modal_input"> |
| 39 |
<label class="jltma-admin-control-label" for="jltma_popup_activation_modal_input"> |
| 40 |
<span class="jltma-admin-control-label-switch" data-active="ON" data-inactive="OFF"></span> |
| 41 |
</label> |
| 42 |
</div> |
| 43 |
|
| 44 |
</div> |
| 45 |
</div> |
| 46 |
</div> <!-- General tab-content --> |
| 47 |
|
| 48 |
<!-- Conditions Tab Content - Exact same as Theme Builder --> |
| 49 |
<div class="jltma-tab-content jltma-tab-conditions"> |
| 50 |
<div class="jltma-label-container"> |
| 51 |
|
| 52 |
<!-- Elementor-style Conditions Repeater --> |
| 53 |
<div class="jltma-conditions-section"> |
| 54 |
<div class="jltma-conditions-header"> |
| 55 |
<h3><?php esc_html_e('Where Do You Want to Display Your Popup?', 'master-addons'); ?></h3> |
| 56 |
<p class="jltma-conditions-description"> |
| 57 |
<?php esc_html_e('Set the conditions that determine where your Popup is used throughout your site.', 'master-addons'); ?><br> |
| 58 |
<?php esc_html_e('For example, choose \'Entire Site\' to display the popup across your site.', 'master-addons'); ?> |
| 59 |
</p> |
| 60 |
</div> |
| 61 |
|
| 62 |
<div class="jltma-conditions-repeater" id="jltma-popup-conditions-repeater"> |
| 63 |
<!-- Conditions will be added dynamically via JavaScript --> |
| 64 |
</div> |
| 65 |
|
| 66 |
<div class="jltma-add-condition-container"> |
| 67 |
<?php |
| 68 |
$add_btn_class = apply_filters('master_addons/popup_builder/add_condition_btn_class', 'jltma-add-condition jltma-btn-add-condition'); |
| 69 |
$add_btn_badge = apply_filters('master_addons/popup_builder/add_condition_btn_badge', '<span class="jltma-badge-pro"></span>'); |
| 70 |
?> |
| 71 |
<button type="button" class="<?php echo esc_attr($add_btn_class); ?>" id="jltma-popup-add-condition"> |
| 72 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/></svg> |
| 73 |
<?php esc_html_e('Add Condition', 'master-addons'); ?> |
| 74 |
<?php echo wp_kses_post( $add_btn_badge ); ?> |
| 75 |
</button> |
| 76 |
</div> |
| 77 |
</div> |
| 78 |
|
| 79 |
<!-- Legacy support - keep for backward compatibility but hidden --> |
| 80 |
<div style="display: none;"> |
| 81 |
<div class="jltma_popup_modal-jltma_popup_singular-container"> |
| 82 |
<br> |
| 83 |
<div class="jltma-input-group"> |
| 84 |
<label class="jltma-attr-input-label"></label> |
| 85 |
<select name="jltma_popup_singular" class="jltma_popup_modal-jltma_popup_singular jltma-orm-control"> |
| 86 |
<option value="all"><?php esc_html_e('All Singulars', 'master-addons'); ?></option> |
| 87 |
<option value="front_page"><?php esc_html_e('Front Page', 'master-addons'); ?></option> |
| 88 |
<option value="all_posts"><?php esc_html_e('All Posts', 'master-addons'); ?></option> |
| 89 |
<option value="all_pages"><?php esc_html_e('All Pages', 'master-addons'); ?></option> |
| 90 |
<option value="selective"><?php esc_html_e('Specific Page', 'master-addons'); ?></option> |
| 91 |
<option value="404page"><?php esc_html_e('404 Page', 'master-addons'); ?></option> |
| 92 |
</select> |
| 93 |
</div> |
| 94 |
|
| 95 |
<?php |
| 96 |
// Pro feature: Singular ID select field |
| 97 |
do_action('master_addons/popup_builder/singular_id_field'); |
| 98 |
?> |
| 99 |
</div> |
| 100 |
|
| 101 |
<?php |
| 102 |
// Pro feature: Post Types ID select field |
| 103 |
do_action('master_addons/popup_builder/post_types_id_field'); |
| 104 |
?> |
| 105 |
|
| 106 |
</div> |
| 107 |
|
| 108 |
</div> |
| 109 |
</div> |
| 110 |
</div> <!-- Conditions tab-content --> |
| 111 |
</div> <!-- Tab Contents Container --> |
| 112 |
|
| 113 |
<!-- Modal Footer - Outside tabs, always visible --> |
| 114 |
<div class="jltma-modal-footer"> |
| 115 |
<button type="button" class="jltma-btn-editor jltma-save-btn jltma-color-three"> |
| 116 |
<img class="mr-1 mb-1" src="<?php echo esc_url( JLTMA_IMAGE_DIR . 'icon.png' ); ?>" alt="Master Addons Logo"> |
| 117 |
<?php esc_html_e('Edit with Elementor', 'master-addons'); ?> |
| 118 |
</button> |
| 119 |
<button type="submit" class="jltma-popup-save jltma-save-btn jltma-color-two"> |
| 120 |
<?php esc_html_e('Save Settings', 'master-addons'); ?> |
| 121 |
</button> |
| 122 |
</div> |
| 123 |
</form> |
| 124 |
|
| 125 |
</div> |
| 126 |
</div> |