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