From ff1e03d03cad396df947f02361f462dc85d7dea0 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sat, 24 Jan 2026 01:33:19 -0500 Subject: [PATCH] Update conversations.php --- conversations.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conversations.php b/conversations.php index 72fd276..16f98d6 100644 --- a/conversations.php +++ b/conversations.php @@ -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