*: website_slides
After [1], the website "new content" dialogs were replaced by formView
dialogs of targeted content (blog, slides, product,...).
The goal of this commit is to restore the "course layout image preview"
on the "New Course" dialog for the "channel_type" field (as on the old
frontend dialog).
Remarks:
- The field was added on 'website' module so it can be used on other
website related modules if needed.
- Some CSS related to the old form was removed in this commit too.
Follows the merge of the "website in backend" task at [1].
[1]: 31cc10b91d
task-2687506
closes odoo/odoo#96346
Related: odoo/enterprise#29922
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
33 lines
1.5 KiB
XML
33 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="slide_channel_view_form_add" model="ir.ui.view">
|
|
<field name="name">slide.channel.view.form.add</field>
|
|
<field name="model">slide.channel</field>
|
|
<field name="arch" type="xml">
|
|
<form js_class="website_new_content_form">
|
|
<div class="oe_title">
|
|
<label for="name" string="Course Title"/>
|
|
<h1><field name="name" placeholder="e.g. Computer Science for kids" class="w-100"/></h1>
|
|
</div>
|
|
<group>
|
|
<field name="website_url" invisible="1"/>
|
|
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" placeholder="Tags"/>
|
|
<field name="channel_type" widget="image_radio" options="{'images': ['/website_slides/static/src/img/channel-training-layout.png', '/website_slides/static/src/img/channel-documentation-layout.png']}" string="Choose a layout"/>
|
|
<field name="description" placeholder="Common tasks for a computer scientist is asking the right questions and answering questions..." class="mb-3"/>
|
|
<field name="allow_comment" string="Allow Rating"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="slide_channel_action_add" model="ir.actions.act_window">
|
|
<field name="name">New Course</field>
|
|
<field name="res_model">slide.channel</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
<field name="view_id" ref="slide_channel_view_form_add"/>
|
|
</record>
|
|
|
|
</odoo>
|