Before this commit the layout of the front-end edition of tags in blog was broken. And the default value of the select element was not filled. We fixed those design issues and also improve some small design details. And for the select issue, we add a return value in the computeWidgetState of the addTag method because even if the value will still be empty we need to return something because we want the select to be filled by the default value of setValue() wich is "/". task-2312878 closes odoo/odoo#58860 X-original-commit: 9a04c8146c799ecd5efa6ba42582d4664a1a3a51 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
30 lines
1.5 KiB
XML
30 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="website_blog" inherit_id="website.snippets" name="Snippet Blog">
|
|
<xpath expr="//t[@id='blog_posts_hook']" position="replace">
|
|
<t t-snippet="website_blog.s_latest_posts" t-thumbnail="/website_blog/static/src/img/s_latest_posts.svg"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="snippet_options" inherit_id="website.snippet_options" name="Blog snippet options">
|
|
<xpath expr="." position="inside">
|
|
<div data-js="BlogPostTagSelection" data-selector=".o_wblog_post_page_cover" data-target="#o_wblog_post_name">
|
|
<we-row string="Tag List">
|
|
<we-button data-name="edit_tags_opt" class="fa fa-pencil" title="Edit" data-edit-tag-list="" data-no-preview="true"/>
|
|
<we-button data-name="save_tags_opt" class="fa fa-save" title="Save" data-save-tag-list="" data-no-preview="true"/>
|
|
</we-row>
|
|
|
|
<div class="o_wblog_tag_list"/>
|
|
|
|
<!-- Addition controls -->
|
|
<we-select string="Existing" data-name="blog_existing_tag_opt" data-no-preview="true"/>
|
|
<we-row string="New tag" class="o_wblog_new_tag">
|
|
<we-input data-name="new_tag_input_opt" data-set-new-tag-name="" placeholder="Name"/>
|
|
<we-button title="Confirm" data-name="new_tag_button_opt" class="fa fa-plus o_we_text_success" data-confirm-new="" data-no-preview="true"/>
|
|
</we-row>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|