[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
This commit is contained in:
Robert Rübner
2018-02-07 16:34:38 +01:00
committed by Romain Derie
parent b2b71efb36
commit 32a7a1ed09
@@ -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');
});