| 1 |
<?php |
| 2 |
$isAbTest = $data['abtest']; |
| 3 |
$isSent = !empty($data['campaignInformation']->sent) && !empty($data['campaignInformation']->active); |
| 4 |
$campaignController = acym_isAdmin() ? 'campaigns' : 'frontcampaigns'; |
| 5 |
?> |
| 6 |
<form id="acym_form" |
| 7 |
action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" |
| 8 |
method="post" |
| 9 |
name="acyForm" |
| 10 |
class="acym__form__campaign__edit <?php echo !empty($data['menuClass']) ? acym_escape($data['menuClass']) : ''; ?>" |
| 11 |
data-abide |
| 12 |
novalidate> |
| 13 |
<div class="grid-x"> |
| 14 |
<div class="cell medium-auto"></div> |
| 15 |
<div class="cell <?php echo $data['containerClass']; ?> acym__content"> |
| 16 |
|
| 17 |
<?php |
| 18 |
$this->addSegmentStep($data['displaySegmentTab']); |
| 19 |
$workflow = $data['workflowHelper']; |
| 20 |
echo $workflow->display($this->steps, $this->step, true, false, '', 'campaignId'); |
| 21 |
?> |
| 22 |
|
| 23 |
<div id="acym__campaign__summary" class="grid-x grid-margin-y"> |
| 24 |
<div class="cell grid-x acym__campaign__summary__section margin-right-2"> |
| 25 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"> |
| 26 |
<b><?php echo acym_translation('ACYM_EMAIL'); ?></b> |
| 27 |
</h5> |
| 28 |
<div class="cell auto acym__campaign__summary__modify"> |
| 29 |
<a href="<?php echo acym_completeLink( |
| 30 |
$campaignController.'&task=edit&step=editEmail&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 31 |
); ?>"><i class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 32 |
</div> |
| 33 |
<div class="cell grid-x"> |
| 34 |
<p class="cell medium-6 acym__campaign__summary__email__information"> |
| 35 |
<?php echo acym_translation('ACYM_FROM_NAME'); ?>: <span class="acym__color__blue"> |
| 36 |
<?php echo acym_escape($data['mailInformation']->from_name); ?> |
| 37 |
</span> |
| 38 |
</p> |
| 39 |
<p class="cell medium-6 acym__campaign__summary__email__information"> |
| 40 |
<?php echo acym_translation('ACYM_FROM_EMAIL'); ?>: <span class="acym__color__blue"> |
| 41 |
<?php echo acym_escape($data['mailInformation']->from_email); ?> |
| 42 |
</span> |
| 43 |
</p> |
| 44 |
<p class="cell medium-6 acym__campaign__summary__email__information"> |
| 45 |
<?php echo acym_translation('ACYM_REPLYTO_NAME'); ?>: <span class="acym__color__blue"> |
| 46 |
<?php echo acym_escape($data['mailInformation']->reply_to_name); ?> |
| 47 |
</span> |
| 48 |
</p> |
| 49 |
<p class="cell medium-6 acym__campaign__summary__email__information"> |
| 50 |
<?php echo acym_translation('ACYM_REPLYTO_EMAIL'); ?>: <span class="acym__color__blue"> |
| 51 |
<?php echo acym_escape($data['mailInformation']->reply_to_email); ?> |
| 52 |
</span> |
| 53 |
</p> |
| 54 |
<p class="cell medium-6 margin-bottom-1 margin-top-1 acym__campaign__summary__email__information"> |
| 55 |
<?php echo acym_translation('ACYM_EMAIL_SUBJECT'); ?>: |
| 56 |
<span class="acym__color__blue acym__campaign__summary__email__information-subject"> |
| 57 |
<?php echo acym_escape($data['mailInformation']->subject); ?> |
| 58 |
</span> |
| 59 |
</p> |
| 60 |
<?php if (!empty($data['isArchiveCached'])) { ?> |
| 61 |
<div class="cell grid-x grid-margin-x" id="acym__campaigns__summary__archive__refresh"> |
| 62 |
<button |
| 63 |
id="acym__campaigns__summary__refresh__archive" |
| 64 |
class="button-secondary button margin-top-0 margin-bottom-2 margin-right-0 cell medium-shrink"> |
| 65 |
<?php echo acym_translation('ACYM_REFRESH_ARCHIVE'); ?> |
| 66 |
</button> |
| 67 |
<?php echo acym_info('ACYM_REFRESH_ARCHIVE_DESC'); ?> |
| 68 |
<div id="acym__campaigns__summary__refresh__archive__message"></div> |
| 69 |
</div> |
| 70 |
<?php } ?> |
| 71 |
</div> |
| 72 |
<!-- We add the email content in a hidden div to load it into the iframe preview --> |
| 73 |
<?php |
| 74 |
if ($data['multilingual']) { |
| 75 |
include acym_getView('campaigns', 'summary_languages', true); |
| 76 |
} |
| 77 |
if (!empty($data['abtest'])) { |
| 78 |
include acym_getView('campaigns', 'summary_abtest', true); |
| 79 |
} |
| 80 |
?> |
| 81 |
<input type="hidden" class="acym__hidden__mail__content" value="<?php echo acym_escape(acym_absoluteURL($data['mailInformation']->body)); ?>"> |
| 82 |
<div style="display: none" class="acym__hidden__mail__stylesheet"><?php echo $data['mailInformation']->stylesheet; ?></div> |
| 83 |
<div class="cell grid-x"> |
| 84 |
<div id="acym__wysid__email__preview" class="acym__email__preview grid-x cell"></div> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
<?php if (!empty($data['mailInformation']->attachments)) { ?> |
| 88 |
<div class="cell grid-x acym__campaign__summary__section"> |
| 89 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"> |
| 90 |
<b><?php echo acym_translation('ACYM_ATTACHMENTS'); ?></b> |
| 91 |
</h5> |
| 92 |
<div class="cell auto acym__campaign__summary__modify"> |
| 93 |
<a href="<?php echo acym_completeLink( |
| 94 |
$campaignController.'&task=edit&step=editEmail&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 95 |
); ?>"><i |
| 96 |
class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 97 |
</div> |
| 98 |
<?php foreach (json_decode($data['mailInformation']->attachments) as $key => $oneAttachment) { |
| 99 |
$onlyFilename = explode("/", $oneAttachment->filename); |
| 100 |
|
| 101 |
$onlyFilename = end($onlyFilename); |
| 102 |
|
| 103 |
echo acym_tooltip( |
| 104 |
[ |
| 105 |
'hoveredText' => '<div class="cell" data-toggle="path_attachment_'.$key.'">'.$onlyFilename.'</div>', |
| 106 |
'textShownInTooltip' => $oneAttachment->filename, |
| 107 |
'classContainer' => 'cell', |
| 108 |
] |
| 109 |
); |
| 110 |
} ?> |
| 111 |
</div> |
| 112 |
<?php } ?> |
| 113 |
<div class="cell grid-x acym__campaign__summary__section"> |
| 114 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"> |
| 115 |
<b> |
| 116 |
<?php |
| 117 |
echo acym_translation('ACYM_RECIPIENTS'); |
| 118 |
echo ' ('.$data['nbSubscribers'].' '.acym_translation('ACYM_SUBSCRIBERS').acym_info('ACYM_SUMMARY_NUMBER_RECEIVERS_DESC').')'; |
| 119 |
?> |
| 120 |
</b> |
| 121 |
</h5> |
| 122 |
<div class="cell auto acym__campaign__summary__modify"> |
| 123 |
<a href="<?php echo acym_completeLink( |
| 124 |
$campaignController.'&task=edit&step=recipients&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 125 |
); ?>"><i class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 126 |
</div> |
| 127 |
<div class="cell acym__listing"> |
| 128 |
<?php foreach ($data['listsReceiver'] as $oneList) { |
| 129 |
$subscribers = acym_modalInclude( |
| 130 |
'<span class="text-underline cursor-pointer"> |
| 131 |
<b>'.$oneList->subscribers.' |
| 132 |
</b> '.acym_strtolower(acym_translation('ACYM_SUBSCRIBERS')).' |
| 133 |
</span>', |
| 134 |
acym_getPartial('modal', 'users'), |
| 135 |
'acym__campaign__summary__users_summary__'.$oneList->list_id, |
| 136 |
[ |
| 137 |
'ctrl' => acym_isAdmin() ? 'lists' : 'frontlists', |
| 138 |
'task' => 'usersSummary', |
| 139 |
'list_id' => $oneList->list_id, |
| 140 |
], |
| 141 |
'', |
| 142 |
'acym__modal__users__summary__container' |
| 143 |
); |
| 144 |
echo '<div class="cell grid-x acym__listing__row"> |
| 145 |
<span class="cell small-6"> |
| 146 |
<i class="acymicon-circle acym__campaign__summary__recipients__list__color margin-right-1" |
| 147 |
style="color: '.$oneList->color.'"> |
| 148 |
</i> |
| 149 |
<b>'.$oneList->name.'</b> |
| 150 |
</span> |
| 151 |
<span class="cell small-6">'.$subscribers.'</span> |
| 152 |
</div>'; |
| 153 |
} ?> |
| 154 |
</div> |
| 155 |
<?php if (!empty($data['segment'])) { ?> |
| 156 |
<div class="cell grid-x acym__campaign__summary__section margin-top-1"> |
| 157 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"><?php |
| 158 |
if (!empty($data['campaignInformation']->sending_params['segment']['invert'])) { |
| 159 |
$segmentInformation = $data['campaignInformation']->sending_params['segment']['invert'] === 'exclude' |
| 160 |
? ' ('.acym_translation('ACYM_EXCLUDE').')' |
| 161 |
: ' ('.acym_translation('ACYM_INCLUDE').')'; |
| 162 |
} else { |
| 163 |
$segmentInformation = ' ('.acym_translation('ACYM_INCLUDE').')'; |
| 164 |
} |
| 165 |
echo acym_translation('ACYM_SEGMENT').$segmentInformation; |
| 166 |
?></h5> |
| 167 |
<div class="cell auto acym__campaign__summary__modify"> |
| 168 |
<a href="<?php echo acym_completeLink( |
| 169 |
$campaignController.'&task=edit&step=segment&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 170 |
); ?>"><i class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 171 |
</div> |
| 172 |
<div class="cell grid-x acym__campaign__summary__segment"> |
| 173 |
<span class="cell medium-6"><b><?php echo $data['segment']['name']; ?></b></span> |
| 174 |
<span class="cell medium-6"><b><?php echo $data['segment']['count'].'</b> '.strtolower(acym_translation('ACYM_SUBSCRIBERS')); ?></span> |
| 175 |
</div> |
| 176 |
</div> |
| 177 |
<?php } ?> |
| 178 |
</div> |
| 179 |
<?php if (!empty($data['campaignInformation']->sending_params['abtest'])) { |
| 180 |
$numberOfUsersToSend = round($data['campaignInformation']->sending_params['abtest']['repartition'] * $data['nbSubscribersAbTest'] / 100); |
| 181 |
?> |
| 182 |
<div class="cell grid-x acym__campaign__summary__section"> |
| 183 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"> |
| 184 |
<b><?php |
| 185 |
echo acym_translation('ACYM_AB_TEST'); ?></b> |
| 186 |
</h5> |
| 187 |
<div class="cell auto acym__campaign__summary__modify"> |
| 188 |
<a href="<?php echo acym_completeLink( |
| 189 |
$campaignController.'&task=edit&step=sendSettings&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 190 |
); ?>"><i class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 191 |
</div> |
| 192 |
<div class="cell acym__listing"> |
| 193 |
<div class="cell acym__listing__row"> |
| 194 |
<?php echo acym_translationSprintf( |
| 195 |
'ACYM_VERSION_WILL_BE_SENT_TO_X_SUBSCRIBERS', |
| 196 |
acym_translationSprintf('ACYM_VERSION_NAME', 'A'), |
| 197 |
round($numberOfUsersToSend / 2) |
| 198 |
); ?> |
| 199 |
</div> |
| 200 |
<div class="cell acym__listing__row"> |
| 201 |
<?php echo acym_translationSprintf( |
| 202 |
'ACYM_VERSION_WILL_BE_SENT_TO_X_SUBSCRIBERS', |
| 203 |
acym_translationSprintf('ACYM_VERSION_NAME', 'B'), |
| 204 |
$numberOfUsersToSend - round($numberOfUsersToSend / 2) |
| 205 |
); ?> |
| 206 |
</div> |
| 207 |
</div> |
| 208 |
<?php if (!empty($data['segment'])) { ?> |
| 209 |
<div class="cell grid-x acym__campaign__summary__section margin-top-1"> |
| 210 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"><?php |
| 211 |
if (!empty($data['campaignInformation']->sending_params['segment']['invert'])) { |
| 212 |
$segmentInformation = $data['campaignInformation']->sending_params['segment']['invert'] === 'exclude' |
| 213 |
? ' ('.acym_translation('ACYM_EXCLUDE').')' |
| 214 |
: ' ('.acym_translation('ACYM_INCLUDE').')'; |
| 215 |
} else { |
| 216 |
$segmentInformation = ' ('.acym_translation('ACYM_INCLUDE').')'; |
| 217 |
} |
| 218 |
echo acym_translation('ACYM_SEGMENT').$segmentInformation; |
| 219 |
?></h5> |
| 220 |
<div class="cell auto acym__campaign__summary__modify"> |
| 221 |
<a href="<?php echo acym_completeLink( |
| 222 |
$campaignController.'&task=edit&step=segment&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 223 |
); ?>"><i class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 224 |
</div> |
| 225 |
<div class="cell grid-x acym__campaign__summary__segment"> |
| 226 |
<span class="cell medium-6"><b><?php echo $data['segment']['name']; ?></b></span> |
| 227 |
<span class="cell medium-6"><b><?php echo $data['segment']['count'].'</b> '.strtolower(acym_translation('ACYM_SUBSCRIBERS')); ?></span> |
| 228 |
</div> |
| 229 |
</div> |
| 230 |
<?php } ?> |
| 231 |
</div> |
| 232 |
<?php } ?> |
| 233 |
<div class="cell grid-x acym__campaign__summary__section"> |
| 234 |
<h5 class="cell shrink margin-right-2 acym__title acym__title__secondary"> |
| 235 |
<b><?php echo acym_translation('ACYM_SEND_SETTINGS'); ?></b> |
| 236 |
</h5> |
| 237 |
<div class="cell auto acym__campaign__summary__modify"> |
| 238 |
<a href="<?php echo acym_completeLink( |
| 239 |
$campaignController.'&task=edit&step=sendSettings&edition=1&campaignId='.intval($data['campaignInformation']->id) |
| 240 |
); ?>"><i |
| 241 |
class="acymicon-pencil"></i><span> <?php echo acym_translation('ACYM_EDIT'); ?></span></a> |
| 242 |
</div> |
| 243 |
<div class="cell grid-x grid-margin-x"> |
| 244 |
<p class="cell large-2 medium-3"><b><?php echo acym_translation('ACYM_SENDING_TYPE'); ?>:</b></p> |
| 245 |
<p class="cell auto"> |
| 246 |
<?php |
| 247 |
$sendingTimeText = ''; |
| 248 |
|
| 249 |
if ($data['automatic']['isAuto']) { |
| 250 |
$sendingTimeText = $data['automatic']['text']; |
| 251 |
} elseif (!$isSent && $data['campaignClass']::SENDING_TYPE_SCHEDULED !== $data['campaignInformation']->sending_type) { |
| 252 |
$sendingTimeText .= acym_translation('ACYM_THIS_CAMPAIGN_WILL_BE_SENT').' '.acym_strtolower(acym_translation('ACYM_NOW')); |
| 253 |
} else { |
| 254 |
if ($isSent) { |
| 255 |
$text = 'ACYM_THIS_CAMPAIGN_HAS_BEEN_SENT_ON_AT'; |
| 256 |
} else { |
| 257 |
$text = 'ACYM_THIS_CAMPAIGN_WILL_BE_SENT_ON_AT'; |
| 258 |
} |
| 259 |
|
| 260 |
$sendingTimeText .= acym_translationSprintf( |
| 261 |
$text, |
| 262 |
acym_date($data['campaignInformation']->sending_date, 'F j, Y'), |
| 263 |
acym_date($data['campaignInformation']->sending_date, 'H:i') |
| 264 |
); |
| 265 |
} |
| 266 |
|
| 267 |
echo $sendingTimeText; |
| 268 |
?> |
| 269 |
</p> |
| 270 |
</div> |
| 271 |
<?php if ($data['automatic']['isAuto'] && !empty($data['automatic']['startDate'])) { ?> |
| 272 |
<div class="cell grid-x grid-margin-x"> |
| 273 |
<p class="cell large-2 medium-3"><b><?php echo acym_translation('ACYM_START_DATE'); ?>:</b></p> |
| 274 |
<p class="cell auto"><?php echo acym_date($data['automatic']['startDate'], acym_getDateTimeFormat()); ?></p> |
| 275 |
</div> |
| 276 |
<?php } ?> |
| 277 |
<div class="cell grid-x grid-margin-x"> |
| 278 |
<p class="cell large-2 medium-3"><b><?php echo acym_translation('ACYM_TRACKING'); ?>:</b></p> |
| 279 |
<p class="cell auto"><?php echo acym_translation( |
| 280 |
$data['campaignInformation']->tracking ? 'ACYM_THIS_CAMPAIGN_BEING_TRACKED' : 'ACYM_THIS_CAMPAIGN_NOT_BEING_TRACKED' |
| 281 |
); ?></p> |
| 282 |
</div> |
| 283 |
</div> |
| 284 |
<div class="cell grid-x acym__campaign__summary__bottom-controls acym__campaign__summary__section"> |
| 285 |
<?php |
| 286 |
if (!$isAbTest && !empty($data['campaignInformation']->sent) && !empty($data['campaignInformation']->active)) { |
| 287 |
?> |
| 288 |
<div id="acym__campaign__summary__resendoptions" class="cell padding-1 margin-bottom-1 acym__zone__warning"> |
| 289 |
<?php |
| 290 |
echo acym_translationSprintf('ACYM_ALREADY_SENT'); |
| 291 |
echo acym_radio( |
| 292 |
[ |
| 293 |
'new' => acym_translation('ACYM_YES'), |
| 294 |
'all' => acym_translation('ACYM_ALREADY_SENT_ALL'), |
| 295 |
], |
| 296 |
'resend_target', |
| 297 |
null, |
| 298 |
[], |
| 299 |
['required' => true], |
| 300 |
!acym_isAdmin() |
| 301 |
); |
| 302 |
?> |
| 303 |
<div class="cell"> |
| 304 |
<span id="resend_receivers_new" style="display: none;"> |
| 305 |
<?php echo acym_translationSprintf('ACYM_X_RECIPIENTS', $data['receiversNew']); ?> |
| 306 |
</span> |
| 307 |
<span id="resend_receivers_all" style="display: none;"> |
| 308 |
<?php echo acym_translationSprintf('ACYM_X_RECIPIENTS', $data['nbSubscribers']); ?> |
| 309 |
</span> |
| 310 |
</div> |
| 311 |
</div> |
| 312 |
<?php |
| 313 |
} |
| 314 |
?> |
| 315 |
<div class="cell medium-shrink medium-margin-bottom-0 margin-bottom-1 text-left"> |
| 316 |
<?php |
| 317 |
echo acym_backToListing( |
| 318 |
in_array($data['campaignInformation']->sending_type, ['birthday', 'woocommerce_cart']) |
| 319 |
? $campaignController.'&task=specificListing&type='.$data['campaignInformation']->sending_type : $campaignController |
| 320 |
); |
| 321 |
?> |
| 322 |
</div> |
| 323 |
<div class="cell medium-auto grid-x text-right"> |
| 324 |
<div class="cell auto hide-for-small-only"></div> |
| 325 |
|
| 326 |
<?php |
| 327 |
if (empty($data['campaignInformation']->active) && !$data['campaignInformation']->isAuto && $data['campaignInformation']->sent) { |
| 328 |
?> |
| 329 |
|
| 330 |
<button type="button" class="cell button primary acy_button_submit medium-shrink" data-task="unpause_campaign"> |
| 331 |
<?php echo acym_translation('ACYM_UNPAUSE_CAMPAIGN'); ?> |
| 332 |
</button> |
| 333 |
|
| 334 |
<?php |
| 335 |
} elseif ($data['campaignInformation']->active && $data['campaignInformation']->isAuto) { |
| 336 |
?> |
| 337 |
|
| 338 |
<button type="button" class="cell button primary acy_button_submit medium-shrink" data-task="toggleActivateColumnCampaign"> |
| 339 |
<?php echo acym_translation('ACYM_DEACTIVATE_CAMPAIGN'); ?> |
| 340 |
</button> |
| 341 |
<?php |
| 342 |
} else { |
| 343 |
if (empty($data['campaignInformation']->sent) && (empty($data['campaignInformation']->active) && $data['campaignInformation']->draft)) { |
| 344 |
?> |
| 345 |
|
| 346 |
<button type="submit" |
| 347 |
class="cell button button-secondary margin-bottom-1 margin-right-1 acy_button_submit medium-shrink" |
| 348 |
data-task="saveAsDraftCampaign"> |
| 349 |
<?php echo acym_translation('ACYM_SAVE_AS_DRAFT'); ?> |
| 350 |
</button> |
| 351 |
|
| 352 |
<?php |
| 353 |
} |
| 354 |
|
| 355 |
if ($data['campaignClass']::SENDING_TYPE_NOW == $data['campaignInformation']->sending_type) { |
| 356 |
$task = 'addQueue'; |
| 357 |
$buttonText = 'ACYM_SEND_CAMPAIGN'; |
| 358 |
if (!acym_level(ACYM_ESSENTIAL) || $this->config->get('cron_last', 0) < (time() - 43200)) $buttonText = 'ACYM_ADD_TO_QUEUE'; |
| 359 |
} elseif (!$data['campaignInformation']->isAuto) { |
| 360 |
$task = 'confirmCampaign'; |
| 361 |
$buttonText = 'ACYM_CONFIRM_CAMPAIGN'; |
| 362 |
} else { |
| 363 |
$task = 'activeAutoCampaign'; |
| 364 |
$buttonText = 'ACYM_ACTIVE_CAMPAIGN'; |
| 365 |
} |
| 366 |
|
| 367 |
|
| 368 |
if ($isAbTest && empty($data['campaignInformation']->sending_params['abtest']['B'])) { |
| 369 |
$data['notAllowedSendingError'] = acym_translation('ACYM_VERSION_MISSING_AB_TEST'); |
| 370 |
} |
| 371 |
|
| 372 |
if (isset($numberOfUsersToSend) && $numberOfUsersToSend < 2) { |
| 373 |
$data['notAllowedSendingError'] = acym_translation('ACYM_NOT_ENOUGH_USERS_AB_TEST'); |
| 374 |
} |
| 375 |
|
| 376 |
if ($isAbTest && $isSent) { |
| 377 |
$data['notAllowedSendingError'] = acym_translation('ACYM_CANNOT_SEND_AB_TEST_AGAIN'); |
| 378 |
} |
| 379 |
|
| 380 |
if ($data['nbSubscribers'] <= 0) { |
| 381 |
$data['notAllowedSendingError'] = acym_translation('ACYM_ADD_RECIPIENTS_TO_SEND_THIS_CAMPAIGN'); |
| 382 |
} |
| 383 |
|
| 384 |
$buttonClass = empty($data['notAllowedSendingError']) ? '' : ' disabled'; |
| 385 |
|
| 386 |
if ($this->config->get('mailer_method') === 'acymailer' && $this->config->get('acymailer_popup', '0') === '0') { |
| 387 |
ob_start(); |
| 388 |
require acym_getView('mails', 'acymailer_popup', true); |
| 389 |
$popupData = ob_get_clean(); |
| 390 |
$button = acym_modal( |
| 391 |
acym_translation($buttonText), |
| 392 |
$popupData, |
| 393 |
'acym__acymailer__popup', |
| 394 |
'', |
| 395 |
['class' => 'cell button medium-shrink'.$buttonClass] |
| 396 |
); |
| 397 |
} else { |
| 398 |
$button = '<button type="button" class="cell button acy_button_submit medium-shrink'.$buttonClass.'" data-task="'.acym_escape($task).'">'; |
| 399 |
$button .= acym_translation($buttonText); |
| 400 |
$button .= '</button>'; |
| 401 |
} |
| 402 |
|
| 403 |
if (!empty($data['notAllowedSendingError'])) { |
| 404 |
echo acym_tooltip( |
| 405 |
[ |
| 406 |
'hoveredText' => $button, |
| 407 |
'textShownInTooltip' => $data['notAllowedSendingError'], |
| 408 |
'classContainer' => 'cell medium-shrink', |
| 409 |
] |
| 410 |
); |
| 411 |
} else { |
| 412 |
echo $button; |
| 413 |
} |
| 414 |
} |
| 415 |
?> |
| 416 |
</div> |
| 417 |
</div> |
| 418 |
</div> |
| 419 |
</div> |
| 420 |
<div class="cell medium-auto"></div> |
| 421 |
</div> |
| 422 |
<input type="hidden" value="<?php echo intval($data['campaignInformation']->id); ?>" name="campaignId" /> |
| 423 |
<input type="hidden" value="<?php echo acym_escape($data['campaignInformation']->sending_date); ?>" name="sending_date" /> |
| 424 |
<?php acym_formOptions(true, 'edit', 'summary'); ?> |
| 425 |
</form> |
| 426 |
|