UX: publishes page, on public change, only when page is published (#12123)

This commit is contained in:
Joffrey JAFFEUX
2021-02-18 17:34:50 +01:00
committed by GitHub
parent b79c06f3b7
commit e175e17ebb
2 changed files with 5 additions and 2 deletions

View File

@@ -122,6 +122,9 @@ export default Controller.extend(ModalFunctionality, StateHelpers, {
@action
onChangePublic(isPublic) {
this.publishedPage.set("public", isPublic);
this.publish();
if (this.showUnpublish) {
this.publish();
}
},
});

View File

@@ -23,7 +23,7 @@
<p class="description">
{{input
type="checkbox"
checked=publishedPage.public
checked=(readonly publishedPage.public)
click=(action "onChangePublic" value="target.checked")
}}
{{i18n "topic.publish_page.public_description"}}