From 32a7a1ed09515edc3daefe0b9ad0b2782998fa66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Ru=CC=88bner?= Date: Thu, 11 Feb 2016 15:19:33 +0100 Subject: [PATCH] [FIX] website: do_not_show option in translator dialog not working Before this commit, it would do the opposite of what it should: When 'Do not show this dialog later' is checked, it would remove the localStorage item instead of creating it. When unchecked, it would create the localStorage item to prevent the dialog to shows up again. Now, we perform the correct behavior. This closes #10882, closes #11550 --- addons/website/static/src/js/website.translator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.translator.js b/addons/website/static/src/js/website.translator.js index fe720622431..1965c409883 100644 --- a/addons/website/static/src/js/website.translator.js +++ b/addons/website/static/src/js/website.translator.js @@ -67,9 +67,9 @@ var Translate = translate.Class.include({ dialog.appendTo($(document.body)); dialog.on('activate', this, function () { if (dialog.$('input[name=do_not_show]').prop('checked')) { - localStorage.removeItem(nodialog); - } else { localStorage.setItem(nodialog, true); + } else { + localStorage.removeItem(nodialog); } dialog.$el.modal('hide'); });