mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
Refined visibility dropdown in post settings
This commit is contained in:
parent
830d24cb20
commit
7778d3c470
@ -78,7 +78,7 @@
|
||||
</GhFormGroup>
|
||||
|
||||
{{#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
|
||||
@hideLabels={{true}}
|
||||
@segment={{this.post.visibilitySegment}}
|
||||
|
@ -69,14 +69,14 @@ export default BaseValidator.create({
|
||||
|
||||
visibility(model) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
|
||||
visibilityFilter(model) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user