changeset 1707:74b66527ae81

feat: schedule toggle added to en-/disable scheduling for import
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 08 Jan 2019 12:34:29 +0100
parents fb05027d93b6
children 49e047c2106e
files client/src/components/importschedule/Importscheduledetail.vue
diffstat 1 files changed, 26 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue	Mon Jan 07 17:05:00 2019 +0100
+++ b/client/src/components/importschedule/Importscheduledetail.vue	Tue Jan 08 12:34:29 2019 +0100
@@ -85,11 +85,32 @@
           <div class="flex-column mt-3 w-100 mr-2">
             <div class="flex-row text-left">
               <small class="text-muted">
+                <translate>Scheduled</translate>?
+              </small>
+            </div>
+            <div class="flex-flex-row text-left">
+              <toggle-button
+                v-model="scheduled"
+                class="mt-2"
+                :speed="100"
+                :labels="{
+                  checked: this.$options.on,
+                  unchecked: this.$options.off
+                }"
+                :width="60"
+                :height="30"
+              />
+            </div>
+          </div>
+          <div class="flex-column mt-3 w-100 mr-2">
+            <div class="flex-row text-left">
+              <small class="text-muted">
                 <translate>Simple Schedule</translate>
               </small>
             </div>
             <div class="flex-flex-row text-left">
               <toggle-button
+                :disabled="!scheduled"
                 v-model="easyCron"
                 class="mt-2"
                 :speed="100"
@@ -109,7 +130,10 @@
               </small>
             </div>
             <div v-if="easyCron" class="text-left w-50">
-              <select v-model="simple" class="form-control"
+              <select
+                :disabled="!scheduled"
+                v-model="simple"
+                class="form-control"
                 ><option value="weekly"><translate>Weekly</translate></option>
                 <option value="monthly"><translate>Monthly</translate></option>
               </select>
@@ -252,16 +276,6 @@
               />
             </div>
           </div>
-          <div class="flex-column w-100 mr-2">
-            <div class="flex-row text-left">
-              <small class="text-muted"><translate>Email</translate> </small>
-            </div>
-            <input
-              :disabled="!eMailNotification"
-              class="form-control"
-              type="email"
-            />
-          </div>
           <button type="submit" class="shadow-sm btn btn-info submit-button">
             <translate>Submit</translate>
           </button>
@@ -299,6 +313,7 @@
       import_: null,
       importSource: null,
       eMailNotification: false,
+      scheduled: false,
       easyCron: true,
       cronMode: "",
       minutes: null,