[FIX] website_forum: issue in biography (unnecessary tags added by editor) + menu control (Users / My Profile)
This commit is contained in:
committed by
Thibault Delavallée
parent
10741e2799
commit
fd5516ade8
@@ -496,7 +496,10 @@ class WebsiteForum(http.Controller):
|
||||
posts_ids = Post.browse(cr, uid, posts.keys(), context=context)
|
||||
posts = dict(map(lambda x: (x.id, (x.parent_id or x, x.parent_id and x or False)), posts_ids))
|
||||
|
||||
post['users'] = 'True'
|
||||
if user.id is uid:
|
||||
post['my_profile'] = 'True'
|
||||
else:
|
||||
post['users'] = 'True'
|
||||
|
||||
values.update({
|
||||
'uid': uid,
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
|
||||
</li>
|
||||
<li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or '' ">
|
||||
<a t-attf-href="/forum/#{ slug(forum) }/user/#{user.id}">My Profile</a>
|
||||
<a t-attf-href="/forum/#{ slug(forum) }/user/#{uid}">My Profile</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
|
||||
@@ -857,12 +857,15 @@
|
||||
<label class="col-md-4 control-label mb16" for="user.partner_id.website_description">Biography</label>
|
||||
<div class="col-md-7 mb16">
|
||||
<textarea name="description" style="min-height: 120px" required="True"
|
||||
class="form-control"><t t-esc="user.partner_id.website_description"/></textarea>
|
||||
class="form-control load_editor" id="description"><t t-esc="user.partner_id.website_description"/></textarea>
|
||||
</div>
|
||||
<div class="col-sm-offset-4 col-md-4 mb16">
|
||||
<button class="btn btn-primary btn-lg">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
CKEDITOR.replace("description");
|
||||
</script>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user