[REF] website_forum: adapt code after jQuery update

Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
This commit is contained in:
Vincent Schippefilt
2019-03-06 20:07:17 +01:00
committed by Aaron Bohy
co-authored by Aaron Bohy Christophe Matthieu Mathieu Duckerts-Antoine David Monjoie Martin Geubelle svs-odoo
parent f7917b1502
commit 3482e3a5a7
@@ -21,7 +21,7 @@ WebsiteNewMenu.include({
* and redirects the user to this new forum.
*
* @private
* @returns {Deferred} Unresolved if there is a redirection
* @returns {Promise} Unresolved if there is a redirection
*/
_createNewForum: function () {
var self = this;
@@ -42,7 +42,9 @@ WebsiteNewMenu.include({
$add.find('label').append(_t("Add to menu"));
$group.after($add);
}
}).then(function (forum_name, field, $dialog) {
}).then(function (result) {
var forum_name = result.val;
var $dialog = result.dialog;
if (!forum_name) {
return;
}
@@ -55,7 +57,7 @@ WebsiteNewMenu.include({
},
}).then(function (url) {
window.location.href = url;
return $.Deferred();
return new Promise(function () {});
});
});
},