Skip to content
Snippets Groups Projects
Commit 7db0ed60 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #960

Closes #960

Merge request studip/studip!555
parent a9c387a3
No related branches found
No related tags found
No related merge requests found
......@@ -381,7 +381,7 @@
@confirm="publishCurrentElement"
>
<template v-slot:dialogContent>
<form class="default" @submit.prevent="">
<form v-show="!oerExportRunning" class="default" @submit.prevent="">
<fieldset>
<legend><translate>Grunddaten</translate></legend>
<label>
......@@ -419,6 +419,11 @@
</label>
</fieldset>
</form>
<courseware-companion-box
v-show="oerExportRunning"
:msgCompanion="$gettext('Export läuft, bitte haben sie einen Moment Geduld...')"
mood="pointing"
/>
</template>
</studip-dialog>
<studip-dialog
......@@ -520,6 +525,7 @@ export default {
},
exportRunning: false,
exportChildren: false,
oerExportRunning: false,
oerChildren: true,
containerList: [],
consumModeTrap: false,
......@@ -1062,7 +1068,13 @@ export default {
},
async publishCurrentElement() {
this.exportToOER(this.currentElement, { withChildren: this.oerChildren });
if (this.oerExportRunning) {
return;
}
this.oerExportRunning = true;
await this.exportToOER(this.currentElement, { withChildren: this.oerChildren });
this.oerExportRunning = false;
this.showElementOerDialog(false);
},
async closeDeleteDialog() {
......
......@@ -187,6 +187,9 @@ export default {
headers: { "Content-Type": "multipart/form-data"}
}).then( () => {
this.companionInfo({ info: this.$gettextInterpolate('Die Seite wurde an %{ oerTitle } gesendet.', {oerTitle: this.oerTitle}) });
}).catch(error => {
this.companionError({ info: this.$gettext('Beim Veröffentlichen der Seite ist ein Fehler aufgetreten.') });
console.debug(error);
});
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment