| @@ -1,57 +1,0 @@ | ||
| 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 | -if (!empty($data['mailInformation'])) { | |
| 6 | - $data['mail'] = $data['mailInformation']; | |
| 7 | -} | |
| 8 | -?> | |
| 9 | -<div class="cell grid-x" id="acym__campaigns__edit_email__attachments"> | |
| 10 | - <label class="cell"><?php echo esc_html(acym_translation('ACYM_ATTACHMENTS')); ?></label> | |
| 11 | - <?php if (!empty($data['mail']->attachments)) { ?> | |
| 12 | - <?php | |
| 13 | - foreach ($data['mail']->attachments as $i => $oneAttach) { | |
| 14 | - $onlyFilename = explode('/', $oneAttach['filename']); | |
| 15 | - $onlyFilename = end($onlyFilename); | |
| 16 | - | |
| 17 | - echo '<div class="acym__listing__row cell grid-x" id="acym__campaigns__attach__del'.esc_attr($i).'">'; | |
| 18 | - | |
| 19 | - acym_tooltip( | |
| 20 | - [ | |
| 21 | - 'hoveredText' => '<span class="cell acym__campaigns__attachments__already">'.esc_html( | |
| 22 | - $onlyFilename.' ('.(round($oneAttach['size'] / 1000, 1)).' Ko)' | |
| 23 | - ).'</span>', | |
| 24 | - 'textShownInTooltip' => $oneAttach['filename'], | |
| 25 | - 'classContainer' => 'medium-11 cell', | |
| 26 | - ] | |
| 27 | - ); | |
| 28 | - $mailId = !empty($data['mail']->mail_id) ? $data['mail']->mail_id : $data['mail']->id; | |
| 29 | - echo '<div class="cell medium-1 text-center"> | |
| 30 | - <a data-id="'.esc_attr($i).'" data-mail="'.intval($mailId).'" class="acym__campaigns__attach__delete"> | |
| 31 | - <i class="acymicon-delete acym__color__red"></i> | |
| 32 | - </a> | |
| 33 | - </div> | |
| 34 | - </div>'; | |
| 35 | - } | |
| 36 | - } | |
| 37 | - | |
| 38 | - for ($i = 0; $i < 10; $i++) { | |
| 39 | - ?> | |
| 40 | - <div <?php echo $i >= 1 ? 'style="display:none"' : ''; ?> | |
| 41 | - class="cell grid-x grid-margin-x acym__campaigns__attach__elements" | |
| 42 | - id="acym__campaigns__attach__<?php echo intval($i); ?>"> | |
| 43 | - <?php $data['uploadFileType']->display('attachments', $i); ?> | |
| 44 | - <div class="cell medium-auto"></div> | |
| 45 | - <div class="cell medium-1 text-center "> | |
| 46 | - <i style="display: none;" | |
| 47 | - id="attachments<?php echo intval($i); ?>suppr" | |
| 48 | - data-id="<?php echo intval($i); ?>" | |
| 49 | - class="acymicon-delete acym__color__red acym__campaigns__attach__remove"></i> | |
| 50 | - </div> | |
| 51 | - </div> | |
| 52 | - <?php } ?> | |
| 53 | -</div> | |
| 54 | -<div class="cell"> | |
| 55 | - <a href="javascript:void(0);" id="acym__campaigns__attach__add"><?php echo esc_html(acym_translation('ACYM_ADD_ATTACHMENT')); ?></a> | |
| 56 | - <?php echo esc_html(acym_translationSprintf('ACYM_MAX_UPLOAD', $data['maxupload'])); ?> | |
| 57 | -</div> | |