| @@ -1,47 +1,0 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -use AcyMailing\Classes\OverrideClass; | |
| 4 | - | |
| 5 | -trait OverrideInsertion | |
| 6 | -{ | |
| 7 | - public function dynamicText(?int $mailId): ?object | |
| 8 | - { | |
| 9 | - $overridesClass = new OverrideClass(); | |
| 10 | - $overrideParams = $overridesClass->getParamsByMailId($mailId); | |
| 11 | - if (!empty($overrideParams)) { | |
| 12 | - return $this->pluginDescription; | |
| 13 | - } | |
| 14 | - | |
| 15 | - return null; | |
| 16 | - } | |
| 17 | - | |
| 18 | - public function textPopup(): void | |
| 19 | - { | |
| 20 | - $mailId = acym_getVar('int', 'mail_id', 0); | |
| 21 | - if (empty($mailId)) return; | |
| 22 | - ?> | |
| 23 | - <script type="text/javascript"> | |
| 24 | - function changeOverrideTag(tagname, element) { | |
| 25 | - if (!tagname) return; | |
| 26 | - setTag('{' + tagname + '}', element); | |
| 27 | - } | |
| 28 | - </script> | |
| 29 | - <?php | |
| 30 | - echo '<div class="acym__popup__listing text-center grid-x">'; | |
| 31 | - echo '<h1 class="acym__title acym__title__secondary text-center cell">'.esc_html(acym_translation('ACYM_ORIGINAL_EMAIL_DATA')).'</h1>'; | |
| 32 | - | |
| 33 | - $overridesClass = new OverrideClass(); | |
| 34 | - $overrideParams = $overridesClass->getParamsByMailId($mailId); | |
| 35 | - | |
| 36 | - foreach ($overrideParams as $key => $overrideParam) { | |
| 37 | - echo '<div style="cursor:pointer" | |
| 38 | - class="grid-x medium-12 cell acym__row__no-listing acym__listing__row__popup text-left" | |
| 39 | - onclick="changeOverrideTag(\''.esc_attr($key).'\', jQuery(this));"> | |
| 40 | - <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.esc_html($overrideParam['nicename']).'</div> | |
| 41 | - <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.esc_html($overrideParam['description']).'</div> | |
| 42 | - </div>'; | |
| 43 | - } | |
| 44 | - | |
| 45 | - echo '</div>'; | |
| 46 | - } | |
| 47 | -} | |