Update conversations.php
This commit is contained in:
+6
-2
@@ -2011,8 +2011,12 @@
|
|||||||
// templates loaded into select by loadQuickReplies
|
// templates loaded into select by loadQuickReplies
|
||||||
// show template container only if templates exist
|
// show template container only if templates exist
|
||||||
const tplContainer = document.getElementById('templateSelectContainer');
|
const tplContainer = document.getElementById('templateSelectContainer');
|
||||||
if (tplContainer && document.getElementById('templateSelect').children.length) {
|
const tplSelect = document.getElementById('templateSelect');
|
||||||
tplContainer.style.display = (document.getElementById('message-type').value === 'template') ? 'inline-block' : 'none';
|
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
|
// Initialize recording handlers so the mic works even before opening a conversation
|
||||||
|
|||||||
Reference in New Issue
Block a user