| 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\Helpers\EntitySelectHelper; |
| 6 |
|
| 7 |
?> |
| 8 |
<h5 class="cell auto medium-text-left text-center hide-for-small-only hide-for-medium-only acym__title margin-bottom-0"> |
| 9 |
<?php echo esc_html(acym_translation('ACYM_LIST')); ?> |
| 10 |
</h5> |
| 11 |
<?php acym_cancelButton(); |
| 12 |
$beforeSave = ''; |
| 13 |
if ($data['currentTab'] === $data['tabs']['subscribers']) { |
| 14 |
if (!empty($data['listInformation']->id) && !empty($data['subscribersEntitySelect'])) { |
| 15 |
$entityHelper = new EntitySelectHelper(); |
| 16 |
acym_modal( |
| 17 |
acym_translation('ACYM_MANAGE_SUBSCRIBERS'), |
| 18 |
$entityHelper->entitySelect( |
| 19 |
[ |
| 20 |
'entity' => 'user', |
| 21 |
'entityParams' => ['join' => 'join_list-'.$data['subscribersEntitySelect']], |
| 22 |
'columnsToDisplay' => $entityHelper->getColumnsForUser('userlist.user_id'), |
| 23 |
'buttonSubmit' => [ |
| 24 |
'text' => acym_translation('ACYM_CONFIRM'), |
| 25 |
'action' => 'saveSubscribers', |
| 26 |
], |
| 27 |
'displayedName' => 'subscriber', |
| 28 |
] |
| 29 |
), |
| 30 |
'acym__lists__settings__subscribers__entity__modal', |
| 31 |
[], |
| 32 |
['class' => 'cell medium-6 large-shrink button button-secondary'] |
| 33 |
); |
| 34 |
} |
| 35 |
} elseif ($data['currentTab'] !== $data['tabs']['unsubscriptions']) { |
| 36 |
if (!empty($data['translation_languages'])) { |
| 37 |
$beforeSave = 'languageList'; |
| 38 |
} |
| 39 |
} |
| 40 |
?> |
| 41 |
<button data-before-action="<?php echo esc_attr($beforeSave); ?>" |
| 42 |
type="submit" |
| 43 |
data-task="apply" |
| 44 |
class="cell acy_button_submit button-secondary button medium-6 large-shrink"> |
| 45 |
<?php echo esc_html(acym_translation('ACYM_SAVE')); ?> |
| 46 |
</button> |
| 47 |
<button data-before-action="<?php echo esc_attr($beforeSave); ?>" |
| 48 |
type="submit" |
| 49 |
data-task="save" |
| 50 |
class="cell acy_button_submit button medium-6 large-shrink margin-right-0"> |
| 51 |
<?php echo esc_html(acym_translation('ACYM_SAVE_EXIT')); ?> |
| 52 |
</button> |
| 53 |
|