From: Fabien Pinckaers Date: Tue, 2 Dec 2014 13:48:13 +0000 (+0100) Subject: [FIX] links and threads X-Git-Url: http://git.inspyration.org/?p=odoo%2Fodoo.git;a=commitdiff_plain;h=7ae48c1839178190b7a80f6cb6ce03e53a736d17 [FIX] links and threads --- diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index bc3a7bc..3a1397e 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -275,7 +275,6 @@ class WebsiteForum(http.Controller): cr, uid, context = request.cr, request.uid, request.context if not request.session.uid: return login_redirect() - post_tag_ids = forum._tag_to_write_vals(post.get('post_tags', '')) new_question = request.env['forum.post'].create({ 'forum_id': forum.id, diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index b30accc..af17c90 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -133,16 +133,14 @@ if ($link.attr("value").search("^http(s?)://.*")) { var $warning = $('
'+ ''+ - 'Please enter valid URl.'+ + 'Please enter valid URL. Example: http://www.odoo.com'+ '
'); $link.parent().append($warning); - $link.parent().find("button#btn_post_your_article")[0].disabled = true; - $link.parent().find("input[name='content']")[0].value = ''; + $("button#btn_post_your_article")[0].disabled = true; } else { openerp.jsonRpc("/forum/get_url_title", 'call', {'url': $link.attr("value")}).then(function (data) { - $link.parent().find("input[name='content']")[0].value = data; - $('button').prop('disabled', false); - $('input').prop('readonly', false); + $("input[name='post_name']")[0].value = data; + $('button#btn_post_your_article').prop('disabled', false); }); } }); diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml index badbfe9..b2aabd3 100644 --- a/addons/website_forum/views/website_forum.xml +++ b/addons/website_forum/views/website_forum.xml @@ -208,7 +208,7 @@
- +