[FIX] website_mass_mailing: editing the newsletter warning banner in the translation web editor
Steps to reproduce: - install website, website_mass_mailing - go to website, edit and add a popup window (you should see warning banner stating that a newsletter popup is present on this window). Save. - go to settings > languages > load a new language (fr_FR for example) and translate the website - go back to the website > select the new language > click the TRANSLATE button Previous behavior: the warning banner is not editable, also click the "Edit popup" button does nothing Current behavior: clicking the "Edit popup" button triggers an alert with a quick explanatory text opw-2280188 closes odoo/odoo#53988 X-original-commit: af57e4924dbd432f9362881dae71d2a4e4595a1f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
This commit is contained in:
committed by
Nicolas Lempereur
parent
b93e9780de
commit
f29f7c63ae
@@ -615,6 +615,10 @@
|
||||
padding-right: 25px;
|
||||
}
|
||||
}
|
||||
iframe.wysiwyg_iframe + .o_field_translate {
|
||||
right: 30px !important;
|
||||
top: 7px !important;
|
||||
}
|
||||
|
||||
// Text field with oe_inline class
|
||||
.o_field_text.oe_inline {
|
||||
|
||||
@@ -184,6 +184,14 @@ msgstr ""
|
||||
msgid "Website popups"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_mass_mailing
|
||||
#. openerp-web
|
||||
#: code:addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Website popups can only be translated through mailing list configuration in the Email Marketing app."
|
||||
msgstr ""
|
||||
|
||||
#. module: website_mass_mailing
|
||||
#: model_terms:ir.ui.view,arch_db:website_mass_mailing.s_newsletter_subscribe_form
|
||||
msgid "your email..."
|
||||
|
||||
@@ -4,6 +4,7 @@ odoo.define('website_mass_mailing.editor', function (require) {
|
||||
var core = require('web.core');
|
||||
var rpc = require('web.rpc');
|
||||
var WysiwygMultizone = require('web_editor.wysiwyg.multizone');
|
||||
var WysiwygTranslate = require('web_editor.wysiwyg.multizone.translate');
|
||||
var options = require('web_editor.snippets.options');
|
||||
var wUtils = require('website.utils');
|
||||
|
||||
@@ -199,4 +200,17 @@ WysiwygMultizone.include({
|
||||
return Promise.all(defs);
|
||||
},
|
||||
});
|
||||
|
||||
WysiwygTranslate.include({
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
start: function () {
|
||||
this.$target.on('click.newsletter_popup_option', '.o_edit_popup', function (ev) {
|
||||
alert(_t('Website popups can only be translated through mailing list configuration in the Email Marketing app.'));
|
||||
});
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user