diff --git a/addons/auth_totp_portal/static/src/js/totp_frontend.js b/addons/auth_totp_portal/static/src/js/totp_frontend.js index c456d5dcf70..f14eb55f21c 100644 --- a/addons/auth_totp_portal/static/src/js/totp_frontend.js +++ b/addons/auth_totp_portal/static/src/js/totp_frontend.js @@ -278,7 +278,7 @@ publicWidget.registry.RevokeTrustedDeviceButton = publicWidget.Widget.extend({ this._rpc({ model: 'auth_totp.device', method: 'remove', - args: [parseInt(this.target.id)] + args: [parseInt(this.el.id)] }) ); window.location = window.location; diff --git a/addons/mail_group/static/src/js/mail_group.js b/addons/mail_group/static/src/js/mail_group.js index e1774c0ea34..fce6175cc6d 100644 --- a/addons/mail_group/static/src/js/mail_group.js +++ b/addons/mail_group/static/src/js/mail_group.js @@ -15,8 +15,8 @@ publicWidget.registry.MailGroup = publicWidget.Widget.extend({ * @override */ start: function () { - this.mailgroupId = this.$target.data('id'); - this.isMember = this.$target.data('isMember') || false; + this.mailgroupId = this.$el.data('id'); + this.isMember = this.$el.data('isMember') || false; const searchParams = (new URL(document.location.href)).searchParams; this.token = searchParams.get('token'); this.forceUnsubscribe = searchParams.has('unsubscribe'); @@ -32,15 +32,15 @@ publicWidget.registry.MailGroup = publicWidget.Widget.extend({ */ _onSubscribeBtnClick: async function (ev) { ev.preventDefault(); - const $email = this.$target.find(".o_mg_subscribe_email"); + const $email = this.$el.find(".o_mg_subscribe_email"); const email = $email.val(); if (!email.match(/.+@.+/)) { - this.$target.addClass('o_has_error').find('.form-control, .form-select').addClass('is-invalid'); + this.$el.addClass('o_has_error').find('.form-control, .form-select').addClass('is-invalid'); return false; } - this.$target.removeClass('o_has_error').find('.form-control, .form-select').removeClass('is-invalid'); + this.$el.removeClass('o_has_error').find('.form-control, .form-select').removeClass('is-invalid'); const action = (this.isMember || this.forceUnsubscribe) ? 'unsubscribe' : 'subscribe'; @@ -57,29 +57,29 @@ publicWidget.registry.MailGroup = publicWidget.Widget.extend({ if (response === 'added') { this.isMember = true; - this.$target.find('.o_mg_subscribe_btn').text(_t('Unsubscribe')).removeClass('btn-primary').addClass('btn-outline-primary'); + this.$el.find('.o_mg_subscribe_btn').text(_t('Unsubscribe')).removeClass('btn-primary').addClass('btn-outline-primary'); } else if (response === 'removed') { this.isMember = false; - this.$target.find('.o_mg_subscribe_btn').text(_t('Subscribe')).removeClass('btn-outline-primary').addClass('btn-primary'); + this.$el.find('.o_mg_subscribe_btn').text(_t('Subscribe')).removeClass('btn-outline-primary').addClass('btn-primary'); } else if (response === 'email_sent') { // The confirmation email has been sent - this.$target.html( + this.$el.html( $('