| 1 |
<div class="cell grid-x acym__sending__methods__choose acym__selection"> |
| 2 |
<?php |
| 3 |
$services = $data['sendingMethods']; |
| 4 |
uksort($services, function ($first, $next) { |
| 5 |
if ($first === 'phpmail' || $first === 'acymailer') return -1; |
| 6 |
if ($next === 'sendinblue') return -1; |
| 7 |
|
| 8 |
return $first !== 'smtp' || $next === 'phpmail' ? 1 : -1; |
| 9 |
}); |
| 10 |
?> |
| 11 |
<?php if (empty($data['isSml'])) { ?> |
| 12 |
<div class="acym__title acym__title__secondary margin-top-1 medium-12 <?php echo !empty($data['step']) && $data['step'] == 'phpmail' ? 'text-center' |
| 13 |
: ''; ?>"><?php echo acym_translation('ACYM_SENDING_MEHTODS'); ?></div> |
| 14 |
<?php } ?> |
| 15 |
<div class="cell grid-x grid-margin-x grid-margin-y acym__sending__methods__choose__selection text-center <?php echo !empty($data['step']) && $data['step'] == 'phpmail' |
| 16 |
? 'align-center' |
| 17 |
: ''; ?>"> |
| 18 |
<?php |
| 19 |
foreach ($services as $key => $sendingMethod) { |
| 20 |
if (!empty($data['isSml']) && $key === 'acymailer') { |
| 21 |
continue; |
| 22 |
} |
| 23 |
|
| 24 |
$selected = isset($sendingMethod['selected']) && $sendingMethod['selected']; |
| 25 |
$class = !empty($sendingMethod['recommended']) ? 'acym__sending__methods__one__premium' : ''; |
| 26 |
$class .= empty($data['step']) ? ' acym__sending__methods__one__config' : ''; |
| 27 |
$name = !empty($sendingMethod['recommended']) ? $sendingMethod['name'].' <br>('.acym_translation('ACYM_RECOMMENDED').')' : $sendingMethod['name']; |
| 28 |
$idCheckbox = 'acym__sending__methods-'.(empty($data['isSml']) ? 'default' : 'sml').'-'.$key; |
| 29 |
?> |
| 30 |
<div class="cell large-3 medium-6 grid-x align-center acym_vcenter acym__sending__methods__one <?php echo $class; ?>"> |
| 31 |
<label for="<?php echo $idCheckbox ?>" data-acym-method="<?php echo $key; ?>" |
| 32 |
class="acym__selection__card cell acym_vcenter align-center <?php echo $selected ? 'acym__selection__card-selected' : ''; ?>"> |
| 33 |
<?php |
| 34 |
if (!empty($sendingMethod['icon'])) { ?> |
| 35 |
<i class="cell <?php echo $sendingMethod['icon']; ?> text-center"></i> |
| 36 |
<?php } else { ?> |
| 37 |
<img src="<?php echo $sendingMethod['image']; ?>" |
| 38 |
alt="" |
| 39 |
class="cell <?php echo !empty($sendingMethod['image_class']) ? $sendingMethod['image_class'] : '' ?>"> |
| 40 |
<?php } ?> |
| 41 |
</label> |
| 42 |
<span class="cell acym__sending__methods__name"><?php echo $name; ?></span> |
| 43 |
<input type="radio" |
| 44 |
name="<?php echo !empty($data['isSml']) ? 'sml' : 'config' ?>[mailer_method]" |
| 45 |
<?php echo $selected ? 'checked' : ''; ?> |
| 46 |
id="<?php echo $idCheckbox; ?>" |
| 47 |
value="<?php echo $key; ?>" |
| 48 |
style="display: none"> |
| 49 |
</div> |
| 50 |
<?php } ?> |
| 51 |
</div> |
| 52 |
<?php |
| 53 |
$class = ''; |
| 54 |
if (!empty($data['step'])) { |
| 55 |
$class = 'medium-10'; |
| 56 |
echo '<div class="cell medium-1 hide-for-small-only"></div>'; |
| 57 |
} |
| 58 |
?> |
| 59 |
<div class="cell <?php echo $class; ?> grid-x text-left"> |
| 60 |
<?php |
| 61 |
foreach ($data['sendingMethodsHtmlSettings'] as $html) { |
| 62 |
echo $html; |
| 63 |
} |
| 64 |
?> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
|