Skip to content
Snippets Groups Projects
Commit 3ed71d9b authored by Lene Wasskog's avatar Lene Wasskog
Browse files

fix: Validation of the radio buttons for weather data source type

parent 34fe84a1
Branches
No related tags found
No related merge requests found
...@@ -18,11 +18,6 @@ ...@@ -18,11 +18,6 @@
], ],
"_comment" : "Structure of the barleyNetBlotchForm and how to validate it", "_comment" : "Structure of the barleyNetBlotchForm and how to validate it",
"fields": [ "fields": [
{
"name" : "weatherDataSourceType",
"dataType" : "STRING",
"required" : true
},
{ {
"name" : "latitude", "name" : "latitude",
"dataType" : "DOUBLE", "dataType" : "DOUBLE",
......
...@@ -305,11 +305,12 @@ ...@@ -305,11 +305,12 @@
alert("Mangler gyldig punkt"); alert("Mangler gyldig punkt");
return false; return false;
} }
} } else if (selectedWeatherdataType === "weatherstation") {
if (selectedWeatherdataType === "weatherstation") {
if(theForm["weatherStationId"].options[theForm["weatherStationId"].selectedIndex].value == "-1") { if(theForm["weatherStationId"].options[theForm["weatherStationId"].selectedIndex].value == "-1") {
alert("Mangler værstasjon") alert("Mangler værstasjon")
} }
} else {
alert("Mangler type værdatakilde")
} }
// Observation: Either no fields or all fields must be set // Observation: Either no fields or all fields must be set
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment