| 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 |
$cancelUrl = empty($data['return']) ? '' : $data['return']; |
| 5 |
acym_cancelButton('ACYM_CANCEL', $cancelUrl); |
| 6 |
|
| 7 |
if (acym_isAdmin() && $data['mail']->editor != 'acyEditor') { |
| 8 |
?> |
| 9 |
<button type="submit" |
| 10 |
data-task="test" |
| 11 |
class="cell large-shrink button-secondary medium-6 button acy_button_submit acym__template__save acy_button_submit"> |
| 12 |
<?php echo esc_html(acym_translation('ACYM_SEND_TEST')); ?> |
| 13 |
</button> |
| 14 |
<?php |
| 15 |
} |
| 16 |
|
| 17 |
acym_modalInclude( |
| 18 |
'<button type="button" id="acym__template__start-from" class="cell button-secondary button button-full-width">'.esc_html( |
| 19 |
acym_translation('ACYM_START_FROM') |
| 20 |
).'</button>', |
| 21 |
dirname(__FILE__).DS.'choose_template_ajax.php', |
| 22 |
'acym__template__choose__modal', |
| 23 |
$data, |
| 24 |
'', |
| 25 |
['class' => 'cell large-shrink medium-6 margin-bottom-0'] |
| 26 |
); |
| 27 |
|
| 28 |
$beforeSave = ''; |
| 29 |
if ($data['mail']->editor === 'acyEditor') { |
| 30 |
$beforeSave = 'editorApply'; |
| 31 |
if (!empty($data['multilingual'])) { |
| 32 |
$beforeSave = 'editorApplyMultilingual'; |
| 33 |
} |
| 34 |
} |
| 35 |
?> |
| 36 |
<button id="apply" |
| 37 |
data-before-action="<?php echo esc_attr($beforeSave); ?>" |
| 38 |
type="button" |
| 39 |
data-task="apply" |
| 40 |
class="cell large-shrink button-secondary medium-6 button acym__template__save acy_button_submit"> |
| 41 |
<?php echo esc_html(acym_translation('ACYM_SAVE')); ?> |
| 42 |
</button> |
| 43 |
<button style="display: none;" |
| 44 |
data-before-action="<?php echo esc_attr($beforeSave); ?>" data-task="apply" class="acy_button_submit" id="data_apply"></button> |
| 45 |
<button id="save" |
| 46 |
data-before-action="<?php echo esc_attr($beforeSave); ?>" |
| 47 |
type="button" |
| 48 |
data-task="save" |
| 49 |
class="cell large-shrink medium-6 button acy_button_submit"> |
| 50 |
<?php echo esc_html(acym_translation('ACYM_SAVE_EXIT')); ?> |
| 51 |
</button> |
| 52 |
<button style="display: none;" data-before-action="<?php echo esc_attr($beforeSave); ?>" data-task="save" class="acy_button_submit" id="data_save"></button> |
| 53 |
|