Files
odoo_source/addons/website_mail_group/views/snippets/s_group.xml
T
Romeo Fragomeli 9ea1351334 [REF] *: BS5: Migrate forms and inputs
- BS5 uses native inputs instead of pseudo-element for some
  input like checkbox, radio, ...
  in BS5 input checkbox don't have "virtual visual" checkbox anymore
  (::before), so we remove the relative's rules

- removed `.custom-control` class

- `form-switch` use a new layout system in BS5 we adapt the code to
  match the Bootstrap approach (inline SVG).

- In tests, we don't check the exact value of the background as it
  change in community/enterprise, and it's difficult to check the value
  of an SVG.

- Overflow in progressbar is now hidden.
  -> we had to restore it.

- In BS5 margins in forms/inputs has been changed
  -> we had to restore it (e.g. 'mb-3')

- .form-group, .form-row, .form-inline
> Dropped form-specific layout classes for our grid system.
> Use our grid and utilities instead of .form-group, .form-row,
> or .form-inline.

- .input-group-append and .input-group-prepend
> Dropped .input-group-append and .input-group-prepend.
> You can now just add buttons and .input-group-text as direct
> children of the input groups.

Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#forms

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00

33 lines
1.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_group" name="Discussion Group">
<div class="s_group o_mail_group"
data-id="0" data-object="mail.group" data-follow="off">
<div class="input-group o_mg_subscribe_form">
<input class="o_mg_subscribe_email form-control" type="email" name="email" placeholder="your email..."/>
<button href="#" class="btn btn-primary o_mg_subscribe_btn">Subscribe</button>
</div>
</div>
</template>
<template id="s_group_options" inherit_id="website.snippet_options">
<xpath expr="." position="inside">
<div data-js='Group'
data-selector=".s_group"
data-drop-near="p, h1, h2, h3, blockquote, .card">
<we-row>
<we-select class="select_discussion_list" data-attribute-name="id" data-no-preview="true">
<!-- 'we-button' added programmatically with DB data -->
</we-select>
<we-button class="fa fa-fw fa-plus" title="Create a public discussion group in your backend"
data-create-group="" data-no-preview="true" data-name="create_mail_group_opt"/>
</we-row>
</div>
</xpath>
</template>
<record id="website_mail_group.s_group_000_js" model="ir.asset">
<field name="name">Group 000 JS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">website_mail_group/static/src/snippets/s_group/000.js</field>
</record>
</odoo>