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 @@
],
"_comment" : "Structure of the barleyNetBlotchForm and how to validate it",
"fields": [
{
"name" : "weatherDataSourceType",
"dataType" : "STRING",
"required" : true
},
{
"name" : "latitude",
"dataType" : "DOUBLE",
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment