Skip to content

Commit

Permalink
Fixed issue #18871: Can't add email attachment in email templates (#3215
Browse files Browse the repository at this point in the history
)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Jun 16, 2023
1 parent 4676e4d commit c742911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -59,7 +59,7 @@
<div class="row">
<label class='form-label col-12' for="attachments_<?php echo "{$grouplang}-{$tab}"; ?>"><?php echo $details['attachments']; ?></label>
<div class="col-12">
<button class="add-attachment btn btn-outline-secondary" data-bs-target="#attachments-<?php echo $grouplang; ?>-<?php echo $tab ?>" data-ck-target="<?="email_{$tab}_{$grouplang}"?>" id="add-attachment-<?php echo "{$grouplang}-{$tab}"; ?>"><?php eT("Add file"); ?></button> &nbsp;
<button class="add-attachment btn btn-outline-secondary" data-target="#attachments-<?php echo $grouplang; ?>-<?php echo $tab ?>" data-ck-target="<?="email_{$tab}_{$grouplang}"?>" id="add-attachment-<?php echo "{$grouplang}-{$tab}"; ?>"><?php eT("Add file"); ?></button> &nbsp;
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions assets/packages/emailtemplates/emailtemplates.js
Expand Up @@ -14,7 +14,7 @@ var PrepEmailTemplates = function(){
}
addAttachment(currentTarget, url);
window.KCFinder = null;
const modal = new bootstrap.Modal(document.getElementById('kc-modal-open'));
const modal = bootstrap.Modal.getOrCreateInstance(document.getElementById('kc-modal-open'));
modal.hide();
},

Expand Down Expand Up @@ -103,7 +103,7 @@ var PrepEmailTemplates = function(){
$(newrow).find('input.relevance').val(relevance).attr('name', 'attachments' + templatetype + '[' + index + '][relevance]');
$(newrow).find('input.filename').attr('name', 'attachments' + templatetype + '[' + index + '][url]');
$(newrow).appendTo($(target).find('tbody'));
const modal = new bootstrap.Modal(document.getElementById('kc-modal-open'));
const modal = bootstrap.Modal.getOrCreateInstance(document.getElementById('kc-modal-open'));
modal.hide();
}
else
Expand Down

0 comments on commit c742911

Please sign in to comment.