From b966fda6e1f15517b9f1d2fd3e786d58fbbb0ba9 Mon Sep 17 00:00:00 2001 From: brli <brita.linnestad@nibio.no> Date: Wed, 6 Nov 2024 13:43:29 +0100 Subject: [PATCH] fix: Store startdate but not enddate --- applefruitmoth/templates/applefruitmoth/index.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/applefruitmoth/templates/applefruitmoth/index.html b/applefruitmoth/templates/applefruitmoth/index.html index 5416c0da..5e7cf538 100755 --- a/applefruitmoth/templates/applefruitmoth/index.html +++ b/applefruitmoth/templates/applefruitmoth/index.html @@ -82,7 +82,6 @@ }); storeLocalSettings(userSettings); - console.info("Store current user settings", userSettings); } @@ -92,15 +91,15 @@ const inputLatitudeElement = document.getElementById("latitude"); const inputLongitudeElement = document.getElementById("longitude"); - const userSettingsFields = ["latitude","longitude","timezone","weatherStationId"]; + const userSettingsFields = ["latitude","longitude","timezone","weatherStationId","startdate"]; const userSettingsRadios = ["weatherdataType","radioDays"]; let poiIdList = [] let selectedPoint = null; let selectedFeature = undefined; - let startDate; - let endDate; + //let startDate; + //let endDate; function selectCoordinates(coordinatesData) { const selectedLatitude = coordinatesData ? coordinatesData.latitude : undefined; @@ -116,7 +115,6 @@ window.loadUserSettings = () => { let userSettings = getLocalSettings(getNameSpaced("{{ form_id }}",userSettingsFields.concat(userSettingsRadios)), false); - console.info("User settings available when page is loaded", userSettings) // Settings found, render form and run model if(Object.keys(userSettings).length > 0) @@ -144,8 +142,8 @@ } window.onload = async(event) => { - startDate = document.getElementById("startdate"); - endDate = document.getElementById("endDate"); + //startDate = document.getElementById("startdate"); + //endDate = document.getElementById("endDate"); await applefruitMoth.renderWeatherstations(); loadUserSettings() runModel(); -- GitLab