From 3aadada047d2a1baae19f4046ae51c18ffe08b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Jan 2023 00:54:37 +0100 Subject: [PATCH] Use toggle button and label on translate dialog A toggle button with a label is easier to understand that it should be toggled to edit. It is cleaner to only display a fuzzy label than having a column of checkboxes. Closes #3125 --- sao/CHANGELOG | 1 + sao/src/sao.less | 8 +++ sao/src/view/form.js | 58 ++++++++++--------- tryton/CHANGELOG | 1 + tryton/tryton/client.py | 3 + .../window/view_form/view/form_gtk/widget.py | 16 +++-- 6 files changed, 51 insertions(+), 36 deletions(-) diff --git a/sao/CHANGELOG b/sao/CHANGELOG index a05649cd3e..cc4eeb8374 100644 --- a/sao/CHANGELOG +++ b/sao/CHANGELOG @@ -1,3 +1,4 @@ +* Use toggle button and label on translate dialog * Support border type of images * Manage domain on id in single value list as unique * Do not validate domain and enforce uniqueness for empty fields unless they're required diff --git a/sao/src/sao.less b/sao/src/sao.less index 86ee937604..f3ea5cbf95 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -50,6 +50,14 @@ html[theme="default"] { z-index: 3; } +.input-group-addon { + > .label { + position: absolute; + right: 0px; + top: -5px; + } +} + .navbar-inverse { .close { color: @navbar-inverse-link-color; diff --git a/sao/src/view/form.js b/sao/src/view/form.js index bffff2c42e..e22688efc3 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -1313,7 +1313,7 @@ function eval_pyson(value){ class_: 'form', init: function(languages, widget) { var dialog = new Sao.Dialog( - Sao.i18n.gettext('Translate'), this.class_, 'lg'); + Sao.i18n.gettext('Translate'), this.class_, 'md'); this.languages = languages; this.read(widget, dialog); jQuery('