From 98a97d0fea20bf462d9212ee6f4c15ac3e693968 Mon Sep 17 00:00:00 2001 From: Romain Estievenart Date: Mon, 29 Aug 2022 06:58:57 +0000 Subject: [PATCH] [IMP] *: removes .form-group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this commit removes the usage of .form-group class which is deprecated since BS5. Here is the css rules that was used: a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997 As we can see, it simply adds a `margin-bottom` of `1rem` which corresponds to the `.mb-3` BS class. b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326 As we already checked all `form-inline` in [1] and [2], we don't have to do anything about these rules. '''Breaking change: Dropped form-specific layout classes for our grid system. Use our grid and utilities instead of .form-group, .form-row, or .form-inline.''' https://getbootstrap.com/docs/5.0/migration/#forms Notes: - `position: relative` is already on `#new-password-group`. - `.field-db`, `#editor-media-image`, `.unsplash_img_container` and `#url-form-group` seems unused. - Sometimes margins are unnecessary because of blocks overlapping. (e.g. `margin-bottom` is not needed if margin-top is set on the following node) - CSS rules applied on `.s_website_form_rows > .form-group` are now in the XML by adding `mb-0 py-2` BS classes. Follow-up of: [1] https://github.com/odoo/odoo/pull/97967 [2] https://github.com/odoo/enterprise/pull/30343 closes odoo/odoo#100052 Related: odoo/enterprise#31261 Signed-off-by: Adrien Dieudonné (adr) --- .../views/templates.xml | 2 +- .../static/src/scss/signup_policy.scss | 2 +- .../views/auth_signup_login_templates.xml | 10 ++--- addons/auth_totp/views/templates.xml | 2 +- .../l10n_ar_website_sale/views/templates.xml | 4 +- .../src/js/mass_mailing_link_dialog_fix.js | 2 +- .../mass_mailing_sms_templates_portal.xml | 4 +- .../views/payment_portal_templates.xml | 6 +-- .../views/payment_authorize_templates.xml | 16 +++---- .../views/payment_demo_templates.xml | 6 +-- addons/portal/static/src/scss/portal.scss | 4 -- addons/portal/views/portal_templates.xml | 6 +-- addons/purchase/views/portal_templates.xml | 2 +- addons/sale/views/variant_templates.xml | 2 +- .../src/legacy/xml/name_and_signature.xml | 2 +- .../static/src/legacy/xml/web_calendar.xml | 2 +- addons/web/views/webclient_templates.xml | 4 +- .../media_dialog/video_selector.xml | 2 +- .../static/src/js/wysiwyg/widgets/link.js | 2 +- .../src/js/wysiwyg/widgets/link_dialog.js | 4 +- .../static/src/scss/web_editor.common.scss | 11 ----- addons/web_editor/static/src/xml/wysiwyg.xml | 18 ++++---- addons/website/data/website_data.xml | 16 +++---- addons/website/data/website_demo.xml | 4 +- .../src/components/dialog/edit_menu.xml | 4 +- .../src/components/dialog/page_properties.js | 2 +- .../static/src/components/dialog/seo.xml | 6 +-- .../src/components/translator/translator.js | 3 +- .../src/snippets/s_website_form/001.scss | 8 ---- .../website/static/src/xml/website.editor.xml | 6 +-- addons/website/static/src/xml/website.xml | 2 +- .../static/src/xml/website_form_editor.xml | 2 +- .../website/views/snippets/s_website_form.xml | 2 +- addons/website/views/website_templates.xml | 6 +-- .../website_crm_partner_assign_templates.xml | 44 +++++++++---------- .../views/website_customer_templates.xml | 2 +- .../static/src/js/booth_register.js | 6 +-- .../event_booth_registration_templates.xml | 10 ++--- .../views/event_booth_templates.xml | 2 +- .../event_booth_registration_templates.xml | 12 ++--- .../js/website_event_track_proposal_form.js | 10 ++--- .../views/event_track_templates_proposal.xml | 6 +-- .../website_hr_recruitment_templates.xml | 16 +++---- .../views/website_links_template.xml | 10 ++--- .../views/snippets_templates.xml | 10 ++--- .../views/donation_templates.xml | 8 ++-- .../website_profile/views/website_profile.xml | 18 ++++---- addons/website_sale/views/templates.xml | 32 +++++++------- .../static/src/js/slides_course_tag_add.js | 8 ++-- .../static/src/xml/slide_management.xml | 2 +- .../src/xml/website_slides_channel_tag.xml | 6 +-- .../static/src/xml/website_slides_share.xml | 2 +- .../static/src/xml/website_slides_upload.xml | 22 +++++----- .../static/src/js/slides_upload.js | 4 +- .../static/src/xml/website_slide_upload.xml | 2 +- 55 files changed, 190 insertions(+), 216 deletions(-) diff --git a/addons/auth_password_policy_portal/views/templates.xml b/addons/auth_password_policy_portal/views/templates.xml index e7d188053e3..82f6a37dcbd 100644 --- a/addons/auth_password_policy_portal/views/templates.xml +++ b/addons/auth_password_policy_portal/views/templates.xml @@ -1,7 +1,7 @@