From 7b82e5f89d99608e0420cfae3af31a3fdc03f9cb Mon Sep 17 00:00:00 2001 From: jpr-odoo Date: Mon, 5 Oct 2020 09:54:11 +0000 Subject: [PATCH] [IMP] web_editor: improve confirmation message In this commit, Improved the web_editor confirmation message for better readability. task-2349785 Closes https://github.com/odoo/odoo/pull/59115 closes odoo/odoo#59115 Signed-off-by: Quentin Smetz (qsm) --- .../static/src/js/editor/snippets.options.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index d8887d67095..e7689ad653f 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -2677,10 +2677,18 @@ const SnippetOptionWidget = Widget.extend({ requiresReload = !!reloadMessage; if (requiresReload) { const save = await new Promise(resolve => { - Dialog.confirm(this, _t("This change needs to reload the page, this will save all your changes and reload the page, are you sure you want to proceed?") + ' ' + Dialog.confirm(this, _t("To apply this change, we need to save all your previous modifications and reload the page.") + ' ' + (typeof reloadMessage === 'string' ? reloadMessage : ''), { - confirm_callback: () => resolve(true), - cancel_callback: () => resolve(false), + buttons: [{ + text: _t('Save and Reload'), + classes: 'btn-primary', + close: true, + click: () => resolve(true), + }, { + text: _t("Cancel"), + close: true, + click: () => resolve(false) + }], }); }); if (!save) {