| 1 |
<h5 class="cell margin-top-1 acym__title acym__title__secondary"> |
| 2 |
<?php echo acym_translation('ACYM_WHEN_EMAIL_WILL_BE_SENT').acym_info(['textShownInTooltip' => 'ACYM_PRESELECT_DESC']); ?> |
| 3 |
</h5> |
| 4 |
<div class="cell grid-x align-center"> |
| 5 |
<div class="cell grid-x medium-11 acym__campaign__sendsettings__send-type grid-margin-x"> |
| 6 |
<?php |
| 7 |
if (empty($data['currentCampaign']->send_specific)) { |
| 8 |
if (!empty($data['currentCampaign']->sent) && empty($data['currentCampaign']->active)) { ?> |
| 9 |
<div class="acym__hide__div"></div> |
| 10 |
<h3 class="acym__title__primary__color acym__middle_absolute__text text-center"><?php echo acym_translation('ACYM_CAMPAIGN_ALREADY_QUEUED'); ?></h3> |
| 11 |
<?php } ?> |
| 12 |
<div class="cell grid-x grid-margin-x margin-bottom-1"> |
| 13 |
<div class="cell auto grid-x align-center"> |
| 14 |
<?php |
| 15 |
$class = $data['currentCampaign']->send_now ? 'button-radio-selected' : 'button-radio-unselected'; |
| 16 |
$class .= $data['currentCampaign']->draft ? '' : ' disabled'; |
| 17 |
?> |
| 18 |
<button type="button" |
| 19 |
class="cell medium-9 small-12 button-radio acym__campaign__sendsettings__buttons-type <?php echo $class; ?>" |
| 20 |
acym-button-radio-group="sendingType" |
| 21 |
id="acym__campaign__sendsettings__now" |
| 22 |
data-sending-type="<?php echo $data['campaignClass']::SENDING_TYPE_NOW; ?>"><?php echo acym_translation('ACYM_NOW'); ?></button> |
| 23 |
</div> |
| 24 |
<?php |
| 25 |
$tooltip = acym_level(ACYM_ESSENTIAL) ? '' : 'data-acym-tooltip="'.acym_translationSprintf('ACYM_USE_THIS_FEATURE', 'AcyMailing Essential').'"'; |
| 26 |
$class = $data['currentCampaign']->send_scheduled ? 'button-radio-selected' : 'button-radio-unselected'; |
| 27 |
$class .= !acym_level(ACYM_ESSENTIAL) || !$data['currentCampaign']->draft ? ' disabled' : ''; |
| 28 |
?> |
| 29 |
<div class="cell auto grid-x align-center"> |
| 30 |
<button type="button" <?php echo $tooltip; ?> |
| 31 |
class="cell medium-9 small-12 button-radio acym__campaign__sendsettings__buttons-type <?php echo $class; ?>" |
| 32 |
acym-button-radio-group="sendingType" |
| 33 |
id="acym__campaign__sendsettings__scheduled" |
| 34 |
data-sending-type="<?php echo $data['campaignClass']::SENDING_TYPE_SCHEDULED; ?>"><?php echo acym_translation('ACYM_SCHEDULED'); ?></button> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
$tooltip = acym_level(ACYM_ENTERPRISE) ? '' : 'data-acym-tooltip="'.acym_translationSprintf('ACYM_USE_THIS_FEATURE', 'AcyMailing Enterprise').'"'; |
| 38 |
$class = $data['currentCampaign']->send_auto ? 'button-radio-selected' : 'button-radio-unselected'; |
| 39 |
$class .= !acym_level(ACYM_ENTERPRISE) || !$data['currentCampaign']->draft || isset($data['currentCampaign']->sending_params['abtest']) ? ' disabled' : ''; |
| 40 |
?> |
| 41 |
<div class="cell auto grid-x align-center"> |
| 42 |
<button type="button" <?php echo $tooltip; ?> |
| 43 |
class="cell medium-9 small-12 button-radio acym__campaign__sendsettings__buttons-type <?php echo $class; ?>" |
| 44 |
acym-button-radio-group="sendingType" |
| 45 |
id="acym__campaign__sendsettings__auto" |
| 46 |
data-sending-type="<?php echo $data['campaignClass']::SENDING_TYPE_AUTO; ?>"><?php echo acym_translation('ACYM_AUTO'); ?></button> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
<?php } else { ?> |
| 50 |
<div class="cell grid-x margin-bottom-1"> |
| 51 |
<?php echo $data['currentCampaign']->send_specific[0]['whenSettings']; ?> |
| 52 |
</div> |
| 53 |
<?php } ?> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
|
| 57 |
<h5 class="cell margin-top-1 margin-bottom-1 acym__title acym__title__secondary"> |
| 58 |
<?php echo acym_translation('ACYM_ADDITIONAL_SETTINGS'); ?> |
| 59 |
</h5> |
| 60 |
<div class="cell grid-x margin-left-1"> |
| 61 |
<div class="cell medium-11 grid-margin-x grid-x acym__campaign__sendsettings__params margin-left-3" |
| 62 |
data-show="acym__campaign__sendsettings__now" <?php echo $data['currentCampaign']->send_now ? '' : 'style="display: none"'; ?>> |
| 63 |
<label><?php echo acym_translation('ACYM_SENT_AS_SOON_CAMPAIGN_SAVE'); ?></label> |
| 64 |
</div> |
| 65 |
<div class="cell grid-x acym__campaign__sendsettings__params margin-left-3" |
| 66 |
data-show="acym__campaign__sendsettings__scheduled" <?php echo $data['currentCampaign']->send_scheduled ? '' : 'style="display: none"'; ?>> |
| 67 |
<div class="cell grid-x acym__campaign__sendsettings__display-send-type-scheduled"> |
| 68 |
<label id="acym__campaign__sendsettings__scheduled__send-date__label" class="cell shrink padding-next-1"> |
| 69 |
<?php echo acym_translation('ACYM_CAMPAIGN_WILL_BE_SENT'); ?> |
| 70 |
</label> |
| 71 |
<label class="cell shrink" for="acym__campaign__sendsettings__send"> |
| 72 |
<?php |
| 73 |
$value = empty($data['currentCampaign']->sending_date) ? '' : acym_date($data['currentCampaign']->sending_date, 'Y-m-d H:i'); |
| 74 |
$required = $data['currentCampaign']->send_scheduled ? 'required="required"' : ''; |
| 75 |
echo acym_tooltip( |
| 76 |
[ |
| 77 |
'hoveredText' => '<input |
| 78 |
class="text-center acy_date_picker" |
| 79 |
data-acym-translate="0" |
| 80 |
type="text" |
| 81 |
name="sendingDate" |
| 82 |
id="acym__campaign__sendsettings__send-type-scheduled__date" |
| 83 |
value="'.acym_escape($value).'" |
| 84 |
readonly |
| 85 |
'.$required.'>', |
| 86 |
'textShownInTooltip' => acym_translation('ACYM_CLICK_TO_EDIT'), |
| 87 |
] |
| 88 |
); |
| 89 |
?> |
| 90 |
</label> |
| 91 |
</div> |
| 92 |
</div> |
| 93 |
<div class="cell grid-x align-center margin-left-3 acym__campaign__sendsettings__params" |
| 94 |
data-show="acym__campaign__sendsettings__auto" <?php echo $data['currentCampaign']->send_auto ? '' : 'style="display: none"'; ?>> |
| 95 |
<div class="cell grid-x align-center"> |
| 96 |
<div class="cell grid-x acym_vcenter"> |
| 97 |
<label class="cell"><?php echo acym_translation('ACYM_THIS_WILL_GENERATE_CAMPAIGN_AUTOMATICALLY'); ?></label> |
| 98 |
<div class="cell grid-x margin-y"> |
| 99 |
<div class="cell medium-5 small-10"> |
| 100 |
<?php |
| 101 |
echo acym_select( |
| 102 |
$data['triggers_select'], |
| 103 |
'acym_triggers', |
| 104 |
empty($data['currentCampaign']->sending_params['trigger_type']) ? null : $data['currentCampaign']->sending_params['trigger_type'], |
| 105 |
['class' => 'acym__select'] |
| 106 |
); |
| 107 |
?> |
| 108 |
</div> |
| 109 |
<div class="cell medium-5 hide-for-small-only"></div> |
| 110 |
<div class="cell grid-x medium-5 small-10"> |
| 111 |
<?php |
| 112 |
foreach ($data['triggers_display'] as $key => $display) { |
| 113 |
echo '<div class="acym__campaign__sendsettings__params__one cell grid-x" data-trigger-show="'.$key.'" style="display: none">'; |
| 114 |
echo str_replace('[triggers][classic]['.$key.']', $key, $display); |
| 115 |
echo '</div>'; |
| 116 |
} |
| 117 |
?> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
<div class="cell grid-x margin-top-1"> |
| 122 |
<label class="cell"> |
| 123 |
<?php |
| 124 |
echo acym_translation('ACYM_NEXT_EXECUTION'); |
| 125 |
echo acym_info(['textShownInTooltip' => 'ACYM_NEXT_EXECUTION_DESC']); |
| 126 |
?> |
| 127 |
</label> |
| 128 |
<div class="cell medium-5 small-10"> |
| 129 |
<?php |
| 130 |
$nextDateValue = ''; |
| 131 |
if (!empty($data['currentCampaign']->next_trigger)) { |
| 132 |
$nextDateValue = acym_date($data['currentCampaign']->next_trigger, 'Y-m-d H:i'); |
| 133 |
} elseif (!empty($data['currentCampaign']->sending_params['start_date'])) { |
| 134 |
$nextDateValue = acym_date($data['currentCampaign']->sending_params['start_date'], 'Y-m-d H:i'); |
| 135 |
} |
| 136 |
?> |
| 137 |
<input type="text" |
| 138 |
name="next_date" |
| 139 |
class="acy_date_picker" |
| 140 |
data-acym-translate="0" |
| 141 |
readonly |
| 142 |
value="<?php echo acym_escape($nextDateValue); ?>"> |
| 143 |
</div> |
| 144 |
</div> |
| 145 |
<div class="cell grid-x margin-top-1"> |
| 146 |
<?php |
| 147 |
echo acym_switch( |
| 148 |
'need_confirm', |
| 149 |
$data['currentCampaign']->sending_params['need_confirm_to_send'] ?? 1, |
| 150 |
acym_translation('ACYM_CONFIRM_AUTOCAMPAIGN'), |
| 151 |
[], |
| 152 |
'shrink', |
| 153 |
'shrink', |
| 154 |
'', |
| 155 |
'acym__campaign__sendsettings__notification' |
| 156 |
); |
| 157 |
?> |
| 158 |
</div> |
| 159 |
<div class="cell grid-x margin-top-1" id="acym__campaign__sendsettings__notification"> |
| 160 |
<label class="cell"> |
| 161 |
<?php |
| 162 |
echo acym_translation('ACYM_NOTIFICATION_AUTO_CAMPAIGN_GENERATED'); |
| 163 |
?> |
| 164 |
</label> |
| 165 |
<div class="cell medium-5 small-104"> |
| 166 |
<?php |
| 167 |
if (empty($data['currentCampaign']->sending_params['admin_notification_emails'])) { |
| 168 |
$selectedValues = [acym_currentUserEmail() => acym_currentUserEmail()]; |
| 169 |
} else { |
| 170 |
$selectedValues = []; |
| 171 |
foreach ($data['currentCampaign']->sending_params['admin_notification_emails'] as $value) { |
| 172 |
if (acym_isValidEmail($value)) { |
| 173 |
$selectedValues[$value] = $value; |
| 174 |
} |
| 175 |
} |
| 176 |
} |
| 177 |
|
| 178 |
echo acym_selectMultiple( |
| 179 |
$selectedValues, |
| 180 |
'sending_params[admin_notification_emails]', |
| 181 |
$selectedValues, |
| 182 |
[ |
| 183 |
'class' => 'acym__multiselect__email', |
| 184 |
] |
| 185 |
); |
| 186 |
?> |
| 187 |
</div> |
| 188 |
</div> |
| 189 |
</div> |
| 190 |
</div> |
| 191 |
<?php if (!empty($data['langChoice'])) { ?> |
| 192 |
<div class="cell grid-x margin-top-1 margin-left-3"> |
| 193 |
<label class="cell"> |
| 194 |
<?php |
| 195 |
echo acym_translation('ACYM_EMAIL_LANGUAGE'); |
| 196 |
echo acym_info(['textShownInTooltip' => 'ACYM_EMAIL_LANGUAGE_DESC']); |
| 197 |
?> |
| 198 |
</label> |
| 199 |
<div class="cell medium-5 small-10"> |
| 200 |
<?php echo $data['langChoice']; ?> |
| 201 |
</div> |
| 202 |
</div> |
| 203 |
<?php } |
| 204 |
if (!empty($data['currentCampaign']->send_specific) && !empty($data['currentCampaign']->send_specific[0]['additionnalSettings'])) { |
| 205 |
echo $data['currentCampaign']->send_specific[0]['additionnalSettings']; |
| 206 |
} ?> |
| 207 |
<div class="cell grid-x medium-10 large-7 xlarge-5 margin-left-3 margin-top-1"> |
| 208 |
<?php |
| 209 |
$label = acym_translation('ACYM_TRACK_THIS_CAMPAIGN'); |
| 210 |
$label .= acym_info(['textShownInTooltip' => 'ACYM_TRACK_THIS_CAMPAIGN_DESC']); |
| 211 |
$isTracked = $data['currentCampaign']->tracking ?? 1; |
| 212 |
echo acym_switch( |
| 213 |
'senderInformation[tracking]', |
| 214 |
$isTracked, |
| 215 |
$label |
| 216 |
); ?> |
| 217 |
</div> |
| 218 |
<?php |
| 219 |
$trackingMode = $this->config->get('trackingsystem', 'acymailing'); |
| 220 |
if (stripos($trackingMode, 'google') !== false) { |
| 221 |
?> |
| 222 |
<div class="cell grid-x align-center" id="utm_settings" <?php echo empty($isTracked) ? 'style="display:none;"' : ''; ?>> |
| 223 |
<h6 class="cell acym__title acym__title__secondary acym__title__secondary__utm"> |
| 224 |
<?php echo acym_translation('ACYM_CUSTOM_UTM'); ?> |
| 225 |
</h6> |
| 226 |
<div class="cell grid-x medium-11 grid-margin-x margin-y"> |
| 227 |
<div class="cell medium-5"> |
| 228 |
<label for="utm_campaign">utm_campaign</label> |
| 229 |
<input name="sending_params[utm_campaign]" id="utm_campaign" |
| 230 |
type="text" |
| 231 |
maxlength="100" |
| 232 |
class="cell" |
| 233 |
value="<?php echo empty($data['currentCampaign']->sending_params['utm_campaign']) |
| 234 |
? '' |
| 235 |
: acym_escape( |
| 236 |
$data['currentCampaign']->sending_params['utm_campaign'] |
| 237 |
); ?>" |
| 238 |
placeholder="<?php echo acym_escape($data['currentCampaign']->subject); ?>"> |
| 239 |
</div> |
| 240 |
<div class="cell medium-1"></div> |
| 241 |
<div class="cell medium-5"> |
| 242 |
<label for="utm_source">utm_source</label> |
| 243 |
<input name="sending_params[utm_source]" id="utm_source" |
| 244 |
type="text" |
| 245 |
value="<?php echo empty($data['currentCampaign']->sending_params['utm_source']) |
| 246 |
? '' |
| 247 |
: acym_escape( |
| 248 |
$data['currentCampaign']->sending_params['utm_source'] |
| 249 |
); ?>" |
| 250 |
placeholder="newsletter_<?php echo $data['currentCampaign']->id; ?>"> |
| 251 |
</div> |
| 252 |
<div class="cell medium-5"> |
| 253 |
<label for="utm_medium">utm_medium</label> |
| 254 |
<input name="sending_params[utm_medium]" id="utm_medium" |
| 255 |
type="text" |
| 256 |
value="<?php echo empty($data['currentCampaign']->sending_params['utm_medium']) |
| 257 |
? '' |
| 258 |
: acym_escape( |
| 259 |
$data['currentCampaign']->sending_params['utm_medium'] |
| 260 |
); ?>" |
| 261 |
placeholder="email"> |
| 262 |
</div> |
| 263 |
</div> |
| 264 |
</div> |
| 265 |
<?php } ?> |
| 266 |
<?php if ($this->config->get('mailer_method') === 'postmark') { ?> |
| 267 |
<div class="cell grid-x"> |
| 268 |
<div class="cell grid-x medium-10 large-7 xlarge-5 margin-left-3 margin-top-1"> |
| 269 |
<label class="cell medium-6"> |
| 270 |
<?php echo acym_translation('ACYM_POSTMARK_STREAM_ID'); ?> |
| 271 |
<input type="text" |
| 272 |
class="cell auto" |
| 273 |
name="sending_params[message_stream_id]" |
| 274 |
value="<?php echo empty($data['currentCampaign']->sending_params['message_stream_id']) ? '' |
| 275 |
: $data['currentCampaign']->sending_params['message_stream_id']; ?>"> |
| 276 |
</label> |
| 277 |
</div> |
| 278 |
</div> |
| 279 |
<?php } ?> |
| 280 |
</div> |
| 281 |
|