summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src/xml
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2020-01-17 07:51:56 +0000
committerYannick Tivisse <yti@odoo.com>2020-02-28 08:58:43 +0000
commit49d64a8fb1fd79a6e53c3768183f6359d9bee6e4 (patch)
tree1dd92636aeb17c7234bff9dfb1cee9ab37db09ac /addons/website_forum/static/src/xml
parentee519c222f0d1aec3f1b4082bbd76d13dedd07b2 (diff)
[IMP] website_forum: Add privacy
Add privacy on forum: public or private. If private, we must select one group that has access. For forum linked to eLearning course: the privacy of forum is the same as the course. If the course is not yet published, the forum will be invisible (unless we have the group group_website_slides_officer). If a forum linked to a course is unlinked or removed, the forum will become private and his group will be set to group_website_slides_officer. All posts and tags have the same access rules as their linked forum. closes odoo/odoo#43486 Taskid: 2169965 Related: odoo/upgrade#758 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/website_forum/static/src/xml')
-rw-r--r--addons/website_forum/static/src/xml/website_forum_templates.xml27
1 files changed, 25 insertions, 2 deletions
diff --git a/addons/website_forum/static/src/xml/website_forum_templates.xml b/addons/website_forum/static/src/xml/website_forum_templates.xml
index 0d3ce2407d0..afe95135158 100644
--- a/addons/website_forum/static/src/xml/website_forum_templates.xml
+++ b/addons/website_forum/static/src/xml/website_forum_templates.xml
@@ -3,7 +3,7 @@
<t t-name="website_forum.add_new_forum">
<form id="editor_new_forum">
<div class="form-group row">
- <label for="page-name" class="col-md-4 col-form-label">Forum Name:</label>
+ <label for="page-name" class="col-md-4 col-form-label">Forum Name</label>
<div class="col-md-8">
<input type="text" name="forum_name" class="form-control" required="required"/>
<div class="custom-control custom-checkbox mt-2">
@@ -13,7 +13,8 @@
</div>
</div>
<div class="form-group row mt-2">
- <label class="col-md-4 col-form-label">Forum Mode:</label>
+ <label class="col-md-4 col-form-label" data-toggle="tooltip" data-placement="bottom"
+ title="Questions and Answers mode: only one answer allowed\n Discussions mode: multiple answers allowed">Forum Mode</label>
<div class="col-md-8">
<div class="custom-control custom-radio">
<input type="radio" id="questions" name="mode" class="custom-control-input" value="questions" checked="checked"/>
@@ -25,6 +26,28 @@
</div>
</div>
</div>
+ <div class="form-group row mt-2">
+ <label class="col-md-4 col-form-label" data-toggle="tooltip" data-placement="bottom"
+ title="Public: Forum is pubic\nSigned In: Forum is visible for signed in users\nSome users: Forum and their content are hidden for non members of selected group">Privacy</label>
+ <div class="col-md-8">
+ <div class="custom-control custom-radio">
+ <input type="radio" id="public" name="privacy" class="custom-control-input" value="public" checked="checked"/>
+ <label class="custom-control-label" for="public">Public</label>
+ </div>
+ <div class="custom-control custom-radio">
+ <input type="radio" id="connected" name="privacy" class="custom-control-input" value="connected"/>
+ <label class="custom-control-label" for="connected">Signed In</label>
+ </div>
+ <div class="custom-control custom-radio">
+ <input type="radio" id="private" name="privacy" class="custom-control-input" value="private"/>
+ <label class="custom-control-label" for="private">Some Users</label>
+ </div>
+ <div class="form-group show_visibility_group d-none">
+ <input type="text" class="form-control" name="group_id" id="group_id" placeholder="Select Authorized Group"/>
+ <p id="group-required" class="text-danger mt-1 mb-0 d-none">Please fill in this field</p>
+ </div>
+ </div>
+ </div>
</form>
</t>
</templates>