Skip to content
Snippets Groups Projects
Commit bb3ccef4 authored by Ron Lucke's avatar Ron Lucke
Browse files

TIC #3112

Closes #3112

Merge request studip/studip!2353
parent f693995e
Branches
No related tags found
No related merge requests found
......@@ -281,6 +281,7 @@
<option value="other"><translate>Sonstiges</translate></option>
</select>
</label>
<template v-if="currentElement.attributes.purpose === 'oer'">
<label>
<translate>Lizenztyp</translate>
<select v-model="currentElement.attributes.payload.license_type">
......@@ -316,6 +317,7 @@
</option>
</select>
</label>
</template>
</form>
</courseware-tab>
<courseware-tab :name="textEdit.image" :index="2">
......
......@@ -113,6 +113,7 @@
<option value="other">{{ $gettext('Sonstiges') }}</option>
</select>
</label>
<template v-if="purposeIsOer">
<label>
{{ $gettext('Lizenztyp') }}
<select v-model="license_type">
......@@ -140,6 +141,7 @@
</option>
</select>
</label>
</template>
</form>
</template>
</studip-wizard-dialog>
......@@ -249,6 +251,9 @@ export default {
hasTemplates() {
return this.templates.length > 0;
},
purposeIsOer() {
return this.purpose === 'oer';
},
},
methods: {
...mapActions({
......@@ -302,10 +307,10 @@ export default {
payload: {
description: this.description,
color: this.color,
license_type: this.license_type,
required_time: this.required_time,
difficulty_start: this.difficulty_start,
difficulty_end: this.difficulty_end,
license_type: this.purposeIsOer ? this.license_type : '',
required_time: this.purposeIsOer ? this.required_time : '',
difficulty_start: this.purposeIsOer ? this.difficulty_start : '',
difficulty_end: this.purposeIsOer ? this.difficulty_end : '',
},
},
templateId: this.selectedTemplate ? this.selectedTemplate.id : null,
......
......@@ -91,6 +91,7 @@
<option value="other">{{ $gettext('Sonstiges') }}</option>
</select>
</label>
<template v-if="purposeIsOer">
<label>
{{ $gettext('Lizenztyp') }}
<select v-model="addWizardData.license_type">
......@@ -126,6 +127,7 @@
</option>
</select>
</label>
</template>
</form>
</template>
</studip-wizard-dialog>
......@@ -183,7 +185,10 @@ export default {
},
colors() {
return this.mixinColors.filter(color => color.darkmode);
}
},
purposeIsOer() {
return this.addWizardData.purpose === 'oer';
},
},
mounted() {
this.initAddWizardData();
......@@ -243,10 +248,10 @@ export default {
payload: {
description: this.addWizardData.description,
color: this.addWizardData.color,
license_type: this.addWizardData.license_type,
required_time: this.addWizardData.required_time,
difficulty_start: this.addWizardData.difficulty_start,
difficulty_end: this.addWizardData.difficulty_end
license_type: this.purposeIsOer ? this.addWizardData.license_type : '',
required_time: this.purposeIsOer ? this.addWizardData.required_time : '',
difficulty_start: this.purposeIsOer ? this.addWizardData.difficulty_start : '',
difficulty_end: this.purposeIsOer ? this.addWizardData.difficulty_end : ''
}
},
relationships: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment