| 1 |
<?php defined('ABSPATH') || exit; ?> |
| 2 |
<form id="emailkit-form"> |
| 3 |
<div class="attr-modal attr-fade" id="emailkit_new_form_modal" tabindex="-1" role="dialog" aria-labelledby="emailkit_new_form_modalLabel" style="display:none;"> |
| 4 |
<div class="attr-modal-dialog attr-modal-dialog-centered" id="emailkit-new-form-modalinput-form" role="document"> |
| 5 |
<div class="emailkit-add-new-form-modal-close-btn" data-dismiss="modal" aria-label="Close Modal"> |
| 6 |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 7 |
<path d="M13 1L1 13" stroke="#9FA1A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 8 |
<path d="M1 1L13 13" stroke="#9FA1A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 9 |
</svg> |
| 10 |
|
| 11 |
</div> |
| 12 |
<div class="emailkit-add-new-form-model-header"> |
| 13 |
<h2 class="emailkit-add-new-form-model-title" id="emailkit_new_form_modalLabel"> |
| 14 |
<?php esc_html_e('Create New Email', 'emailkit'); ?> |
| 15 |
</h2> |
| 16 |
|
| 17 |
</div> |
| 18 |
<div class="emailkit-add-new-form-model-contents"> |
| 19 |
<div id="emailkit-notice" class="emailkit-notice"></div> |
| 20 |
<div class="emailkit-template-input-con"> |
| 21 |
<label for="emailkit-add-new-form-model__form-name"> |
| 22 |
<?php esc_html_e('Email Subject', 'emailkit'); ?> |
| 23 |
</label> |
| 24 |
<input id="emailkit-add-new-form-model__form-name" type="text" class="emailkit-editor-input" name="emailkit_template_title" placeholder="<?php esc_html_e('Enter template name', 'emailkit'); ?>"> |
| 25 |
</div> |
| 26 |
|
| 27 |
<?php |
| 28 |
$email_types = []; |
| 29 |
|
| 30 |
|
| 31 |
$email_types = [ |
| 32 |
'wordpress' => __('WordPress Email', 'emailkit'), |
| 33 |
'woocommerce' => __('WooCommerce email', 'emailkit'), |
| 34 |
'metform' => __('Metform Email', 'emailkit'), |
| 35 |
'saved-templates' => __('Saved Templates', 'emailkit'), |
| 36 |
]; |
| 37 |
?> |
| 38 |
|
| 39 |
<div class="emailkit-template-form-type" id='emailType'> |
| 40 |
<select id="emailkit-add-new-form-model__form-type" required name="emailkit_email_type" class="emailkit-editor-input emailkit_email_type" data-nonce="<?php echo esc_attr(wp_create_nonce('wp_rest')); ?>"> |
| 41 |
<option disabled='true' selected> |
| 42 |
<?php esc_html_e('Select email type', 'emailkit'); ?> |
| 43 |
</option> |
| 44 |
|
| 45 |
<?php foreach ($email_types as $key => $type) { ?> |
| 46 |
<option value="<?php echo esc_attr($key); ?>"> |
| 47 |
<?php echo esc_html($type); ?> |
| 48 |
</option> |
| 49 |
<?php } ?> |
| 50 |
</select> |
| 51 |
<div class="emailkit-template-form-type"> |
| 52 |
<select id="emailkit-add-new-email__template-type" class="emailkit-editor-input emailkit_template_type" name="emailkit_template_type" data-nonce="<?php echo esc_attr(wp_create_nonce('wp_rest')); ?>"> |
| 53 |
<option disabled='true' selected> |
| 54 |
<?php esc_html_e('Select template type', 'emailkit'); ?> |
| 55 |
</option> |
| 56 |
</select> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
<div class="emailkit-template-wrapper"> |
| 63 |
|
| 64 |
</div> |
| 65 |
<div> |
| 66 |
<div class="emailkit-template-alert-msg emailkit-select-template-type-msg"> |
| 67 |
<p>Please select a template.</p> |
| 68 |
</div> |
| 69 |
<ul class="emailkit-templates-list" style="position: relative;overflow-y: auto;height: 300px; overflow-x: hidden;"> |
| 70 |
<p class="emailkit-template-delete-success-notification" style="color: green; margin: auto; display: none;">Template Deleted Successfully.</p> |
| 71 |
<div class="emailkit-template-loader-wrapper"> |
| 72 |
<div class="emailkit-template-loader"></div> |
| 73 |
</div> |
| 74 |
<div class="emailkit-saved-template-alert-msg emailkit-template-alert-msg emailkit-saved-template-info"> |
| 75 |
<div class="emailkit-template-alert-msg-wrap"> |
| 76 |
<p><span class="emailkit-saved-template-name"></span></p> |
| 77 |
<button class="emailkit-saved-template-delete"><span style="display: inline-block; width: 14px; height: 15px"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"/></svg></span>Delete this template</button> |
| 78 |
|
| 79 |
<div class="emailkit-template-delete-popover"> |
| 80 |
<div class="emailkit-template-delete-popover-heading"> |
| 81 |
<header>Do you want to delete?</header> |
| 82 |
</div> |
| 83 |
<div class="emailkit-template-delete-btns"> |
| 84 |
<button class="emailkit-template-delete-btn emailkit-template-delete-btn-confirm">Yes</button> |
| 85 |
<button class="emailkit-template-delete-btn emailkit-template-delete-btn-cancel">No</button> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
</div> |
| 90 |
<div class="emailkit-template-alert-msg emailkit-template-not-available"> |
| 91 |
<p>No saved templates available.</p> |
| 92 |
</div> |
| 93 |
|
| 94 |
<div class="emailkit-pro-alert-msg-wrapper"> |
| 95 |
<div class="emailkit-pro-alert-msg"> |
| 96 |
<div class="emailkit-pro-alert-msg-icon"> |
| 97 |
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 98 |
<path d="M15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15C0 23.2843 6.71573 30 15 30Z" fill="#227BFF" /> |
| 99 |
<path d="M15 9V15" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> |
| 100 |
<path d="M15 21H15.015" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> |
| 101 |
</svg> |
| 102 |
</div> |
| 103 |
<div class="emailkit-pro-alert-msg-content"> |
| 104 |
<h1 class="emailkit-pro-msg-title">You’re One Step Away!</h1> |
| 105 |
<p class="emailkit-pro-msg-content">Upgrade to Pro and get all the premium features!</p> |
| 106 |
<a href="https://wpmet.com/plugin/emailkit/pricing/" target="_blank" class="emailkit-pro-alert-msg-btn">Upgrade to Pro</a> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
|
| 110 |
</div> |
| 111 |
<li class="emailkit-blank-template"> |
| 112 |
<label> |
| 113 |
<input class="emailkit-template-radio" name="emailkit-editor-template" type="radio" value="0" checked> |
| 114 |
<div class="emailkit-template-radio-data"> |
| 115 |
<img src="<?php echo esc_url(EMAILKIT_URL . 'assets/admin/img/blank.svg'); ?>" alt="<?php esc_html_e('Blank Template', 'emailkit'); ?>"> |
| 116 |
<div class="emailkit-template-footer-content"> |
| 117 |
<div class="emailkit-template-footer-title"> |
| 118 |
<h2><?php esc_html_e('Blank Template', 'emailkit'); ?></h2> |
| 119 |
</div> |
| 120 |
<div class="emailkit-template-footer-links"><?php esc_html_e('Create From Scratch', 'emailkit'); ?></div> |
| 121 |
</div> |
| 122 |
</div> |
| 123 |
</label> |
| 124 |
</li> |
| 125 |
</ul> |
| 126 |
</div> |
| 127 |
|
| 128 |
|
| 129 |
</div> |
| 130 |
<div class="add-new-model__footer-button-group"> |
| 131 |
<button id="editWithEmailkit" resturl="<?php echo esc_url(get_rest_url(null, "emailkit/v1/")) ?>" disabled="false" class="emailkit-open-new-form-editor-modal emailkit-edit-template-btn"> |
| 132 |
<?php esc_html_e('Edit with EmailKit', 'emailkit') ?> |
| 133 |
</button> |
| 134 |
</div> |
| 135 |
</div> |
| 136 |
</div> |
| 137 |
<?php include_once 'pro-popup.php'; ?> |
| 138 |
</form> |