diff options
| -rw-r--r-- | addons/website_mail/static/src/js/follow.js | 2 | ||||
| -rw-r--r-- | addons/website_mail/views/website_mail_templates.xml | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/addons/website_mail/static/src/js/follow.js b/addons/website_mail/static/src/js/follow.js index 02ec8196b09..e2c349ce224 100644 --- a/addons/website_mail/static/src/js/follow.js +++ b/addons/website_mail/static/src/js/follow.js @@ -85,8 +85,6 @@ publicWidget.registry.follow = publicWidget.Widget.extend({ * @param {jQuery} $jsFollowEls */ _updateSubscriptionDOM: function (follow, email, $jsFollowEls) { - $jsFollowEls.find(".js_follow_btn").toggleClass('d-none', follow); - $jsFollowEls.find(".js_unfollow_btn").toggleClass('d-none', !follow); $jsFollowEls.find('input.js_follow_email') .val(email || "") .attr("disabled", email && (follow || this.isUser) ? "disabled" : false); diff --git a/addons/website_mail/views/website_mail_templates.xml b/addons/website_mail/views/website_mail_templates.xml index 549043a28fb..cca4395575d 100644 --- a/addons/website_mail/views/website_mail_templates.xml +++ b/addons/website_mail/views/website_mail_templates.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <template id="follow"> - <div class="input-group js_follow" t-att-data-id="object.id" + <div t-attf-class="input-group js_follow #{div_class}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-follow="object.id and object.message_is_follower and 'on' or 'off'" t-att-data-unsubscribe="'unsubscribe' if 'unsubscribe' in request.params else None"> @@ -22,7 +22,7 @@ </div> </button> </div> - <div t-else="" t-attf-class="#{request.env.user.has_group('base.group_public') and 'input-group-append'} #{div_class}"> + <div t-else="" t-attf-class="#{request.env.user.has_group('base.group_public') and 'input-group-append'}"> <button href="#" t-attf-class="btn btn-secondary js_unfollow_btn">Unsubscribe</button> <button href="#" t-attf-class="btn btn-primary js_follow_btn">Subscribe</button> </div> |
