| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
|
| 5 |
use AcyMailing\Classes\MailClass; |
| 6 |
|
| 7 |
?> |
| 8 |
<div class="cell grid-x acym__toggle__arrow"> |
| 9 |
<p class="cell medium-shrink acym__toggle__arrow__trigger"><?php echo esc_html(acym_translation('ACYM_ADVANCED_OPTIONS')); ?> |
| 10 |
<i class="acymicon-keyboard-arrow-down"></i></p> |
| 11 |
<div class="cell acym__toggle__arrow__contain"> |
| 12 |
<div class="grid-x grid-padding-x margin-y"> |
| 13 |
<?php |
| 14 |
if ( |
| 15 |
!empty($data['mail']->type) |
| 16 |
&& in_array( |
| 17 |
$data['mail']->type, |
| 18 |
[ |
| 19 |
MailClass::TYPE_WELCOME, |
| 20 |
MailClass::TYPE_TEMPLATE, |
| 21 |
MailClass::TYPE_UNSUBSCRIBE, |
| 22 |
MailClass::TYPE_NOTIFICATION, |
| 23 |
] |
| 24 |
) |
| 25 |
) { |
| 26 |
?> |
| 27 |
<div class="cell xlarge-3 medium-6"> |
| 28 |
<label for="acym__mail__edit__from-name" class="cell"> |
| 29 |
<?php |
| 30 |
echo esc_html(acym_translation('ACYM_FROM_NAME')); |
| 31 |
?> |
| 32 |
</label> |
| 33 |
<input type="text" |
| 34 |
id="acym__mail__edit__from-name" |
| 35 |
class="cell" |
| 36 |
maxlength="100" |
| 37 |
value="<?php echo esc_attr($data['mail']->from_name ?? ''); ?>" |
| 38 |
name="mail[from_name]"> |
| 39 |
</div> |
| 40 |
<div class="cell xlarge-3 medium-6"> |
| 41 |
<label for="acym__mail__edit__from-email" class="cell"> |
| 42 |
<?php |
| 43 |
echo esc_html(acym_translation('ACYM_FROM_EMAIL')); |
| 44 |
?> |
| 45 |
</label> |
| 46 |
<input type="email" |
| 47 |
id="acym__mail__edit__from-email" |
| 48 |
class="cell" |
| 49 |
maxlength="100" |
| 50 |
value="<?php echo esc_attr($data['mail']->from_email ?? ''); ?>" |
| 51 |
name="mail[from_email]"> |
| 52 |
</div> |
| 53 |
<div class="cell xlarge-3 medium-6"> |
| 54 |
<label for="acym__mail__edit__replyto-name" class="cell"> |
| 55 |
<?php |
| 56 |
echo esc_html(acym_translation('ACYM_REPLYTO_NAME')); |
| 57 |
?> |
| 58 |
</label> |
| 59 |
<input type="text" |
| 60 |
id="acym__mail__edit__replyto-name" |
| 61 |
class="cell" |
| 62 |
maxlength="100" |
| 63 |
value="<?php echo esc_attr($data['mail']->reply_to_name ?? ''); ?>" |
| 64 |
name="mail[reply_to_name]"> |
| 65 |
</div> |
| 66 |
<div class="cell xlarge-3 medium-6"> |
| 67 |
<label for="acym__mail__edit__replyto-email" class="cell"> |
| 68 |
<?php |
| 69 |
echo esc_html(acym_translation('ACYM_REPLYTO_EMAIL')); |
| 70 |
?> |
| 71 |
</label> |
| 72 |
<input type="email" |
| 73 |
id="acym__mail__edit__replyto-email" |
| 74 |
class="cell" |
| 75 |
maxlength="100" |
| 76 |
value="<?php echo esc_attr($data['mail']->reply_to_email ?? ''); ?>" |
| 77 |
name="mail[reply_to_email]"> |
| 78 |
</div> |
| 79 |
<?php } ?> |
| 80 |
<?php if (empty($data['multilingual']) && empty($data['abtest'])) { ?> |
| 81 |
<div class="cell grid-x"> |
| 82 |
<div class="cell medium-shrink"> |
| 83 |
<label for="acym__mail__edit__preheader"> |
| 84 |
<?php |
| 85 |
echo esc_html(acym_translation('ACYM_EMAIL_PREHEADER')); |
| 86 |
acym_info(['textShownInTooltip' => 'ACYM_EMAIL_PREHEADER_DESC']); |
| 87 |
?> |
| 88 |
</label> |
| 89 |
</div> |
| 90 |
<input id="acym__mail__edit__preheader" name="mail[preheader]" type="text" maxlength="255" value="<?php echo esc_attr($data['mail']->preheader ?? ''); ?>"> |
| 91 |
</div> |
| 92 |
<?php } ?> |
| 93 |
<?php if (!empty($data['mail']->type) && $data['mail']->type === MailClass::TYPE_TEMPLATE) { ?> |
| 94 |
<div class="cell grid-x"> |
| 95 |
<div class="cell grid-x medium-6"> |
| 96 |
<label for="acym__mail__edit__thumbnail" class="cell shrink"> |
| 97 |
<?php |
| 98 |
echo esc_html(acym_translation('ACYM_EMAIL_CUSTOM_THUMBNAIL')); |
| 99 |
acym_info(['textShownInTooltip' => 'ACYM_EMAIL_CUSTOM_THUMBNAIL_DESC']); |
| 100 |
?> |
| 101 |
</label> |
| 102 |
<button class="cell shrink button button-secondary" type="button" id="acym__mail__edit__thumbnail--input"> |
| 103 |
<?php echo esc_html(acym_translation('ACYM_UPLOAD_IMAGE')); ?> |
| 104 |
</button> |
| 105 |
<input id="acym__mail__edit__thumbnail" name="custom_thumbnail" type="file"> |
| 106 |
<span id="acym__mail__edit__thumbnail--file" class="cell shrink acym_vcenter margin-left-1"></span> |
| 107 |
<button type="button" id="acym__mail__edit__thumbnail--delete" class="acymicon-close acym__color__red cursor-pointer acym_vcenter"></button> |
| 108 |
<?php if (!empty($data['mail']->thumbnail) && strpos($data['mail']->thumbnail, '_custom_') !== false) { ?> |
| 109 |
<div id="acym__mail__edit__thumbnail--saved" class="cell shrink grid-x"> |
| 110 |
<span id="acym__mail__edit__thumbnail--file-saved" class="cell shrink acym_vcenter margin-left-1"> |
| 111 |
<?php echo esc_html($data['mail']->thumbnail); ?> |
| 112 |
</span> |
| 113 |
<button type="button" id="acym__mail__edit__thumbnail--delete-saved" class="acymicon-close acym__color__red cursor-pointer acym_vcenter"></button> |
| 114 |
<input type="hidden" name="custom_thumbnail_reset" value="0"> |
| 115 |
</div> |
| 116 |
<?php } ?> |
| 117 |
</div> |
| 118 |
</div> |
| 119 |
<?php } ?> |
| 120 |
<?php if (empty($data['mail']->drag_editor)) { ?> |
| 121 |
<div class="cell grid-x medium-6" id="acym__mail__edit__html__stylesheet__container"> |
| 122 |
<div class="cell medium-shrink"> |
| 123 |
<label for="acym__mail__edit__html__stylesheet"> |
| 124 |
<?php |
| 125 |
acym_tooltip( |
| 126 |
[ |
| 127 |
'hoveredText' => acym_translation('ACYM_CUSTOM_ADD_STYLESHEET'), |
| 128 |
'textShownInTooltip' => acym_translation('ACYM_STYLESHEET_HTML_DESC'), |
| 129 |
] |
| 130 |
); |
| 131 |
$stylesheet = empty($data['mail']->stylesheet) ? '' : $data['mail']->stylesheet; |
| 132 |
?> |
| 133 |
</label> |
| 134 |
</div> |
| 135 |
<textarea |
| 136 |
name="editor_stylesheet" |
| 137 |
id="acym__mail__edit__html__stylesheet" |
| 138 |
cols="30" |
| 139 |
rows="15" |
| 140 |
type="text"><?php echo esc_html($stylesheet); ?></textarea> |
| 141 |
</div> |
| 142 |
<?php } ?> |
| 143 |
<div class="cell medium-auto"> |
| 144 |
<label for="acym__mail__edit__custom__header"><?php |
| 145 |
echo esc_html(acym_translation('ACYM_CUSTOM_HEADERS')); |
| 146 |
acym_info(['textShownInTooltip' => 'ACYM_EMAIL_CUSTOM_HEADERS_DESC']); |
| 147 |
?> |
| 148 |
</label> |
| 149 |
<textarea id="acym__mail__edit__custom__header" name="editor_headers" cols="30" rows="15" type="text"><?php echo esc_html( |
| 150 |
$data['mail']->headers ?? '' |
| 151 |
); ?></textarea> |
| 152 |
</div> |
| 153 |
<?php if (!empty($data['mail']->type) && !in_array($data['mail']->type, [MailClass::TYPE_STANDARD, MailClass::TYPE_TEMPLATE])) { ?> |
| 154 |
<div class="cell grid-x"> |
| 155 |
<div class="cell grid-x medium-6"> |
| 156 |
<?php include acym_getPartial('editor', 'attachments'); ?> |
| 157 |
</div> |
| 158 |
</div> |
| 159 |
<?php } ?> |
| 160 |
</div> |
| 161 |
</div> |
| 162 |
</div> |
| 163 |
|