Update conversations.php

This commit is contained in:
Lizandro Guarnizo
2026-01-24 01:33:19 -05:00
parent d1731ccfdd
commit ff1e03d03c
+6 -2
View File
@@ -2011,8 +2011,12 @@
// templates loaded into select by loadQuickReplies
// show template container only if templates exist
const tplContainer = document.getElementById('templateSelectContainer');
if (tplContainer && document.getElementById('templateSelect').children.length) {
tplContainer.style.display = (document.getElementById('message-type').value === 'template') ? 'inline-block' : 'none';
const tplSelect = document.getElementById('templateSelect');
const typeSelect = document.getElementById('message-type');
if (tplContainer && tplSelect && tplSelect.children.length) {
// If message-type selector exists, show only when 'template' is selected. Otherwise show (legacy/simple UI).
const showTpl = typeSelect ? (typeSelect.value === 'template') : true;
tplContainer.style.display = showTpl ? 'inline-block' : 'none';
}
// Initialize recording handlers so the mic works even before opening a conversation