diff --git a/client/src/components/content-block-form/ContentBlockForm.vue b/client/src/components/content-block-form/ContentBlockForm.vue index f8901aa2..0c3f7a6e 100644 --- a/client/src/components/content-block-form/ContentBlockForm.vue +++ b/client/src/components/content-block-form/ContentBlockForm.vue @@ -14,6 +14,7 @@ :checked="localContentBlock.isAssignment" class="content-block-form__task-toggle" label="Inhaltsblock als Auftrag formatieren" + v-if="hasDefaultFeatures" @input="localContentBlock.isAssignment=$event" /> @@ -139,8 +140,12 @@ import {CHOOSER, transformInnerContents} from '@/components/content-block-form/helpers.js'; import ContentElementActions from '@/components/content-block-form/ContentElementActions.vue'; import {ContentBlock, numberOrUndefined} from "@/@types"; + import {DEFAULT_FEATURES} from "@/consts/features.consts"; // TODO: refactor this file, it's huuuuuge! + interface ContentBlockFormData { + localContentBlock: any; + } export default Vue.extend({ props: { @@ -152,6 +157,15 @@ type: Object as PropType, required: true, }, + features: { + type: String, + default: DEFAULT_FEATURES + } + }, + provide(): object { + return { + features: this.features + }; }, components: { ContentElementActions, @@ -161,7 +175,7 @@ ContentFormSection, Toggle, }, - data() { + data(): ContentBlockFormData { return { localContentBlock: Object.assign({}, { title: this.contentBlock.title, @@ -176,6 +190,9 @@ isValid(): boolean { return this.localContentBlock.title > ''; }, + hasDefaultFeatures(): boolean { + return this.features === DEFAULT_FEATURES; + } }, methods: { update(index: number, element: any, parent?: number) { diff --git a/client/src/components/content-forms/ContentBlockElementChooserWidget.vue b/client/src/components/content-forms/ContentBlockElementChooserWidget.vue index 196d20df..5742b99d 100644 --- a/client/src/components/content-forms/ContentBlockElementChooserWidget.vue +++ b/client/src/components/content-forms/ContentBlockElementChooserWidget.vue @@ -13,7 +13,7 @@ Neuer Inhalt