mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
Refined visibility dropdown in post settings
This commit is contained in:
parent
830d24cb20
commit
7778d3c470
@ -78,7 +78,7 @@
|
|||||||
</GhFormGroup>
|
</GhFormGroup>
|
||||||
|
|
||||||
{{#if (eq this.post.visibility "filter")}}
|
{{#if (eq this.post.visibility "filter")}}
|
||||||
<GhFormGroup @errors={{this.post.errors}} @hasValidated={{this.post.hasValidated}} @property="visibilityFilter">
|
<GhFormGroup @errors={{this.post.errors}} @hasValidated={{this.post.hasValidated}} @property="visibilityFilter" @class="nt3">
|
||||||
<GhMembersSegmentSelect
|
<GhMembersSegmentSelect
|
||||||
@hideLabels={{true}}
|
@hideLabels={{true}}
|
||||||
@segment={{this.post.visibilitySegment}}
|
@segment={{this.post.visibilitySegment}}
|
||||||
|
@ -69,14 +69,14 @@ export default BaseValidator.create({
|
|||||||
|
|
||||||
visibility(model) {
|
visibility(model) {
|
||||||
if (isBlank(model.visibility) && !model.isNew) {
|
if (isBlank(model.visibility) && !model.isNew) {
|
||||||
model.errors.add('visibility', 'Please select a product');
|
model.errors.add('visibility', 'Please select at least one product');
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
visibilityFilter(model) {
|
visibilityFilter(model) {
|
||||||
if (isBlank(model.visibilityFilter) && !isBlank(model.visibility) && model.visibility === 'filter' && !model.isNew) {
|
if (isBlank(model.visibilityFilter) && !isBlank(model.visibility) && model.visibility === 'filter' && !model.isNew) {
|
||||||
model.errors.add('visibilityFilter', 'Please select a product');
|
model.errors.add('visibilityFilter', 'Please select at least one product');
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user