From 730132a931f0e90eb7d66c7c216e88b0f2bca2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 14 May 2024 19:44:39 +0200 Subject: [PATCH] Put textarea and richtext under an input-group If the widget is translatable, the translate button is an input-group-btn which must be under the same input-group as the principal input. Closes #13238 (grafted from 20af97ade53035f1c725cb2600e9abbb2664f664) --HG-- branch : 7.0 --- sao/src/sao.less | 2 +- sao/src/view/form.js | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sao/src/sao.less b/sao/src/sao.less index 8139510f67..a01ee296fb 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -724,7 +724,7 @@ img.icon { } } .form-text, .form-richtext { - > textarea, .richtext { + textarea, .richtext { height: 100%; line-height: 2.5ex; min-height: 12.5ex; diff --git a/sao/src/view/form.js b/sao/src/view/form.js index d7eef85b2a..8a52ca8d1d 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -2272,10 +2272,13 @@ function eval_pyson(value){ this.el = jQuery('
', { 'class': this.class_ }); + this.group = jQuery('
', { + 'class': 'input-group', + }).appendTo(this.el); this.input = this.labelled = jQuery('