[FIX] web_editor: QWebPlugin branching shows condition

Before this commit, when displaying the available conditional branches
on a node, the QWebPlugin's select element only had the name of the attribute.

This commit adds to this name, the actual condition present inside the attribute.

Part-of: odoo/odoo#128228
This commit is contained in:
Lucas Perais
2023-07-20 17:01:32 +02:00
parent d9eeb6ab9b
commit f3eb3e3def
@@ -201,9 +201,9 @@ export class QWebPlugin {
for (const element of groupElements) {
const optionElement = document.createElement('option');
if (element.hasAttribute('t-if')) {
optionElement.innerText = 'if';
optionElement.innerText = `if: "${element.getAttribute("t-if")}"`;
} else if (element.hasAttribute('t-elif')) {
optionElement.innerText = 'elif';
optionElement.innerText = `elif: "${element.getAttribute("t-elif")}"`;
} else if (element.hasAttribute('t-else')) {
optionElement.innerText = 'else';
}