[FIX] web: stat button string in a span

With only the module appointment installed, go to Calendar App,
Online Appointments and click on "Create". In the form view displayed a
stat button "Customer Preview" is visible but is badly styled. This is
due to the fact that "Customer Preview" is no longer wrap by a span since
the rewriting of the form view (see odoo/odoo@48ef812a63).
We fix the problem by making the default slot content of ViewButton be a
span wrapping the prop string (if any).

Part-of: odoo/odoo#98072
This commit is contained in:
Mathieu Duckerts-Antoine
2022-08-17 11:21:27 +02:00
parent 223b9e998c
commit 64aa8dd3b0
@@ -18,7 +18,7 @@
t-on-click.stop="onClick"
>
<t t-if="icon" t-tag="icon.tag" t-att-class="icon.class" t-att-src="icon.src"/>
<t t-slot="contents"><t t-esc="props.string"/></t>
<t t-slot="contents"><span t-if="props.string" t-esc="props.string"/></t>
</t>
</t>