Löschen/Deaktivierung
This commit is contained in:
@@ -1060,8 +1060,14 @@ export function initEditor() {
|
||||
}
|
||||
}
|
||||
|
||||
function isTemplateSection() {
|
||||
if (current?.section?.is_template) return true;
|
||||
const slug = (current?.section?.slug || '').toString().toLowerCase();
|
||||
return slug === 'emailtemplate';
|
||||
}
|
||||
|
||||
async function confirmTemplateReferences(actionLabel) {
|
||||
if (!current?.section?.is_template || !current?.id) return true;
|
||||
if (!current?.id || !isTemplateSection()) return true;
|
||||
const res = await apiAction('templates.references', { method: 'GET', data: { template_id: current.id } }).catch(() => null);
|
||||
if (!res || res.ok === false) {
|
||||
return confirm(`Referenzen konnten nicht geprüft werden. ${actionLabel} trotzdem?`);
|
||||
|
||||
Reference in New Issue
Block a user