diff --git a/cerealblotchmodels/static/cerealblotchmodels/formdefinitions/barleyNetBlotchForm.json b/cerealblotchmodels/static/cerealblotchmodels/formdefinitions/barleyNetBlotchForm.json index eafca7770e4014fb1dca56dbc7737e194991df89..0b84b056c8b5ba9ccf3f8e9d9095ffaea118c0f7 100755 --- a/cerealblotchmodels/static/cerealblotchmodels/formdefinitions/barleyNetBlotchForm.json +++ b/cerealblotchmodels/static/cerealblotchmodels/formdefinitions/barleyNetBlotchForm.json @@ -18,11 +18,6 @@ ], "_comment" : "Structure of the barleyNetBlotchForm and how to validate it", "fields": [ - { - "name" : "weatherDataSourceType", - "dataType" : "STRING", - "required" : true - }, { "name" : "latitude", "dataType" : "DOUBLE", diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index 1ae14c157d93c3a30cebe7b3c8ec1f94b172ffec..3920553db5518de5da601f0d92e903e8b17ddbc6 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -305,11 +305,12 @@ alert("Mangler gyldig punkt"); return false; } - } - if (selectedWeatherdataType === "weatherstation") { + } else if (selectedWeatherdataType === "weatherstation") { if(theForm["weatherStationId"].options[theForm["weatherStationId"].selectedIndex].value == "-1") { alert("Mangler værstasjon") } + } else { + alert("Mangler type værdatakilde") } // Observation: Either no fields or all fields must be set