[FIX] website: fix toggle redirect compressed layout in page properties

Before this commit and since [1] when the website builder was moved from
the "frontend" to the "backend" of Odoo in Odoo 16, the option to enable
URL redirect when updating a page URL was "compressed":
- The toggle/switch element has not enough room to be displayed entirely
  if there were too many dependencies
- The toggle/switch label was split in multiple lines, words could even
  be split in 2.

Step to reproduce:
- Go to / in the website builder (so the / finds a lot of dependencies)
- Open page property
- Change the URL field, you see the redirect url field appear with the
  mentioned issues.

Note:
- In other languages, the switch label could be even longer, splitting
  the line makes even more sense
- Removing a class is generally something to be avoided in stable, but
  this type of class should not be xpath'd anyway. And given the
  template structure, it's unlikely someone would have xpath it as it's
  easy to xpath any element without relying on classes.
  One solution would have been to add a new class to cancel the first
  one but it seems overkill in this case.

[1]: https://github.com/odoo/odoo/commit/2ef7e788263b4742a8e0788f47673b7b31da3726

closes odoo/odoo#146244

X-original-commit: 8c17c487e6632192874133a2ce4265a0f1eaf6fb
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
Romain Derie
2023-12-15 01:36:01 +00:00
committed by xO-Tx
parent 1069763b3a
commit 2a2fd932af
@@ -22,7 +22,7 @@
/>
</div>
<div t-if="enableRedirect">
<div class="d-flex mt-4">
<div class="mt-4">
<Switch
extraClasses="'me-auto'"
label="'Redirect Old URL'"