[FIX] website: remove share page info option from page manager

Advanced user can do it from the backend by the way and it is not
obvious to understand the impact to set/unset this option.

Seems like I was the only guy to think that this feature was needed

task-1878245
This commit is contained in:
Jeremy Kersten
2018-09-13 13:55:51 +02:00
parent 8e40fed773
commit 9747ff249f
3 changed files with 0 additions and 20 deletions
-4
View File
@@ -943,14 +943,10 @@ class Page(models.Model):
'name': data['name'],
'url': url,
'is_published': data['website_published'],
'website_id': False if data['share_page_info'] else website.id,
'website_indexed': data['website_indexed'],
'date_publish': data['date_publish'] or None,
'is_homepage': data['is_homepage'],
}
# toggle is hidden to prevent user to unshare a page
if 'share_page_info' in data:
w_vals['website_id'] = False if data['share_page_info'] else website.id
page.with_context(no_cow=True).write(w_vals)
# Create redirect if needed
@@ -220,7 +220,6 @@ var PagePropertiesDialog = weWidgets.Dialog.extend({
is_menu: this.$('#is_menu').prop('checked'),
is_homepage: this.$('#is_homepage').prop('checked'),
website_published: this.$('#is_published').prop('checked'),
share_page_info: this.$('#share_page_info').prop('checked'),
create_redirect: this.$('#create_redirect').prop('checked'),
redirect_type: this.$('#redirect_type').val(),
website_indexed: this.$('#is_indexed').prop('checked'),
@@ -127,21 +127,6 @@
</label>
</div>
</div>
<div t-if='widget.page.website_id' class="form-group row" id="website_restriction">
<!-- TODO hide with multi-website group -->
<label class="control-label col-md-5" for="share_page_info">
Share this page
<i class="fa fa-question-circle-o" title="When enabled, this page will be shared between all the websites. This change is not reversible."></i>
</label>
<div class="col-md-2">
<a>
<label class="o_switch" for="share_page_info" >
<input type="checkbox" t-att-checked="widget.page.website_id ? undefined : true" id="share_page_info"/>
<span/>
</label>
</a>
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-5" for="date_publish">Publishing Date</label>
<div class="col-md-7">