[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) <qsm@odoo.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user