diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index a347a4927508bb7ec526f157fdfe4f56a6a67aa5..87659ef708099daf8f713d0f2b076592a7813f6f 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -215,6 +215,8 @@ const theForm = document.getElementById("{{ form_id }}"); const inputLatitudeElement = document.getElementById("latitude"); const inputLongitudeElement = document.getElementById("longitude"); + const radioGrid = document.getElementById("grid") + const radioWeatherstation = document.getElementById("weatherstation") const selectWeatherstationElement = document.getElementById("weatherStationId"); let poiIdList = [] @@ -315,13 +317,15 @@ } window.displayWeatherstationInput = () => { - document.getElementById("weatherstation").checked = true; + radioWeatherstation.checked = true; + console.error("Check radioWeatherstation!") document.getElementById('input-weatherstation').style.display="block"; document.getElementById('input-coordinates').style.display="none"; } window.displayCoordinatesInput = () => { - document.getElementById("grid").checked = true; + radioGrid.checked = true; + console.error("Check radioGrid!") document.getElementById('input-weatherstation').style.display="none"; document.getElementById('input-coordinates').style.display="block"; getTimezoneForSelectedPoint() @@ -612,6 +616,7 @@ var userSettings = getLocalSettings(getNameSpaced("{{ form_id }}",formFields), false); if(!isDictEmpty(userSettings)) { + console.error("Found previously stored usersettings", userSettings); renderUserSettings(userSettings); if(theForm["weatherDataSourceType"].value == "grid") { displayCoordinatesInput(); @@ -621,6 +626,7 @@ displayCoordinatesInput(); } } else { + console.error("Found no previously stored usersettings"); displayCoordinatesInput(); } }).catch(function(error) {