Mercurial > gemma
changeset 2994:5124644494df
imports: send email when triggering file-upload for ubn, ufa, ugm
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 10 Apr 2019 15:00:22 +0200 |
parents | ec3196e2d579 |
children | 5222bfe5b4af |
files | client/src/components/importconfiguration/ScheduledImports.vue client/src/components/importconfiguration/types/Bottleneck.vue |
diffstat | 2 files changed, 31 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Wed Apr 10 14:28:45 2019 +0200 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Wed Apr 10 15:00:22 2019 +0200 @@ -108,29 +108,28 @@ :sortBy="sortBy" /> - <template v-if="!directImport || !directImportAvailable"> - <div class="d-flex flex-row mt-3"> - <div class="flex-column mr-4"> - <div class="flex-row text-left"> - <small class="text-muted"> - <translate>Email Notification</translate> - </small> - </div> - <div class="flex-flex-row text-left"> - <toggle-button - v-model="eMailNotification" - class="mt-2" - :speed="100" - :labels="{ - checked: this.$options.on, - unchecked: this.$options.off - }" - :width="60" - :height="30" - /> - </div> + <div class="d-flex flex-row mt-3"> + <div class="flex-column mr-4"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>Email Notification</translate> + </small> </div> - + <div class="flex-flex-row text-left"> + <toggle-button + v-model="eMailNotification" + class="mt-2" + :speed="100" + :labels="{ + checked: this.$options.on, + unchecked: this.$options.off + }" + :width="60" + :height="30" + /> + </div> + </div> + <template v-if="!directImport || !directImportAvailable"> <div class="flex-column mr-4"> <div class="flex-row text-left"> <small class="text-muted"> @@ -172,7 +171,9 @@ /> </div> </div> - </div> + </template> + </div> + <template v-if="!directImport || !directImportAvailable"> <div class="flex-column w-100 mr-2"> <div class="flex-row text-left"> <small class="text-muted"> @@ -346,16 +347,17 @@ <button @click="triggerManualImport" type="button" - class="shadow-sm btn btn-outline-info" + class="shadow-sm btn btn-outline-info mr-auto" :disabled="!triggerActive || !isValid" > <font-awesome-icon class="fa-fw mr-2" fixed-width icon="play" /> <translate>Trigger import</translate> </button> <button + v-if="!directImport || !directImportAvailable" :disabled="!isValid" type="submit" - class="ml-auto shadow-sm btn btn-info mr-3" + class="shadow-sm btn btn-info mr-3" > <translate>Save</translate> </button> @@ -676,6 +678,9 @@ } formData.append(routeParam, this.uploadFile); + if (this.eMailNotification) { + formData.append("send-email", this.eMailNotification); + } HTTP.post("/imports/" + routeParam, formData, { headers: { "X-Gemma-Auth": localStorage.getItem("token"),
--- a/client/src/components/importconfiguration/types/Bottleneck.vue Wed Apr 10 14:28:45 2019 +0200 +++ b/client/src/components/importconfiguration/types/Bottleneck.vue Wed Apr 10 15:00:22 2019 +0200 @@ -42,7 +42,7 @@ </div> </div> </div> - <div v-if="!url" class="d-flex flex-row"> + <div v-if="!directImport && !url" class="d-flex flex-row"> <small ><translate class="text-danger">Please enter a URL</translate></small >