comparison client/src/components/importschedule/Importscheduledetail.vue @ 2581:5466800da970

Fix conditional rendering of file/URL import form elements Once import via file was chosen for an import type, the file upload field appeared also for import types that do not support file upload. Indentation will be fixed in another commit to keep the diff readable here.
author Tom Gottfried <tom@intevation.de>
date Mon, 11 Mar 2019 16:35:07 +0100
parents fcb139bfa56b
children ab819b1b748b
comparison
equal deleted inserted replaced
2580:5125db802b79 2581:5466800da970
170 :url="url" 170 :url="url"
171 :featureType="featureType" 171 :featureType="featureType"
172 :sortBy="sortBy" 172 :sortBy="sortBy"
173 ></Waterwayaxis> 173 ></Waterwayaxis>
174 174
175 <div v-if="!directImport" class="d-flex flex-row"> 175 <template v-if="!directImport || !directImportAvailable">
176 <div class="d-flex flex-row">
176 <div class="flex-column mt-3 mr-4"> 177 <div class="flex-column mt-3 mr-4">
177 <div class="flex-row text-left"> 178 <div class="flex-row text-left">
178 <small class="text-muted"> 179 <small class="text-muted">
179 <translate>Scheduled</translate>? 180 <translate>Scheduled</translate>?
180 </small> 181 </small>
213 :height="30" 214 :height="30"
214 /> 215 />
215 </div> 216 </div>
216 </div> 217 </div>
217 </div> 218 </div>
218 <div v-if="!directImport" class="flex-column w-100 mr-2"> 219 <div class="flex-column w-100 mr-2">
219 <div class="flex-row text-left"> 220 <div class="flex-row text-left">
220 <small class="text-muted"> 221 <small class="text-muted">
221 <translate>Schedule</translate> 222 <translate>Schedule</translate>
222 </small> 223 </small>
223 </div> 224 </div>
372 type="text" 373 type="text"
373 /> 374 />
374 </div> 375 </div>
375 </div> 376 </div>
376 </div> 377 </div>
377 <div v-if="directImport" class="d-flex flex-row text-left"> 378 <button
379 :disabled="!isValid"
380 type="submit"
381 class="shadow-sm btn btn-info submit-button"
382 >
383 <translate>Save</translate>
384 </button>
385 </template>
386 <div v-else class="d-flex flex-row text-left">
378 <div class="mt-3 mb-3 flex-column w-100"> 387 <div class="mt-3 mb-3 flex-column w-100">
379 <div class="custom-file"> 388 <div class="custom-file">
380 <input 389 <input
381 accept=".xml" 390 accept=".xml"
382 type="file" 391 type="file"
388 {{ uploadLabel }} 397 {{ uploadLabel }}
389 </label> 398 </label>
390 </div> 399 </div>
391 </div> 400 </div>
392 </div> 401 </div>
393 <button
394 v-if="!directImport"
395 :disabled="!isValid"
396 type="submit"
397 class="shadow-sm btn btn-info submit-button"
398 >
399 <translate>Save</translate>
400 </button>
401 <button 402 <button
402 @click="triggerManualImport" 403 @click="triggerManualImport"
403 type="button" 404 type="button"
404 class="shadow-sm btn btn-outline-info trigger" 405 class="shadow-sm btn btn-outline-info trigger"
405 :disabled="!triggerActive || !isValid" 406 :disabled="!triggerActive || !isValid"