diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index 97140ec03a453e96a1f1ef47e7d537c7350a8d48..7e22cc8d3043956af359b747066608c835c79465 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -23,6 +23,7 @@ {% endcomment %} {% load i18n %} {% block title %}{% trans "Barley net blotch" %}{% endblock %} + {% block customCSS %} <!--[if lte IE 9]> <style type="text/css">#oldIEWarning{display: block !important;}</style> @@ -30,26 +31,25 @@ <link type="text/css" rel="stylesheet" href="https://logic.testvips.nibio.no/css/3rdparty/leaflet.css" /> <link type="text/css" rel="stylesheet" href="https://logic.testvips.nibio.no/css/mapModal.css" /> -<style type="text/css"> +<style> input#latitude, input#longitude { width: 30%; display: inline-block; - margin: 10px 10px 10px 0px; - } - select#weatherStationId { + margin: 10px 10px 10px 0; + } + select#weatherStationId { width: 60%; display: inline-block; - margin: 10px 10px 10px 0px; - } - .main-label { + margin: 10px 10px 10px 0; + } + .main-label { font-size: 1.8rem; font-weight: 500 !important; - } - .space { + } + .space { margin-top: 40px; - } - - </style> + } +</style> {% endblock %} {% block content %} @@ -73,7 +73,7 @@ <div class="col-md-6"> <input type="hidden" name="timeZone" value="Europe/Oslo"/> <div class="form-group"> - <label class="main-label" for="weatherdataType">Jeg vil bruke værdata</label> + <label class="main-label">Jeg vil bruke værdata</label> <div class="radio"> <label> <input type="radio" name="weatherdataType" id="coordinates" value="coordinates" checked onchange="displayCoordinatesInput()"> @@ -109,34 +109,34 @@ </div> <div class="form-group"> <label for="sowingDate">{% trans "Sowing date" %}</label> - <input type="date" name="sowingDate" class="form-control" max="{{max_sowing_date|date:'Y-m-d'}}" onblur="validateField(this);" placeholder="Sådato"/> + <input type="date" id="sowingDate" name="sowingDate" class="form-control" max="{{max_sowing_date|date:'Y-m-d'}}" onblur="validateField(this);" placeholder="Sådato"/> <span class="help-block" id="{{ form_id }}_sowingDate_validation"></span> </div> <div class="form-group"> - <label>Vekstskifte</label><br> - <input type="checkbox" name="sameCropAsLastSeason"/> Jeg dyrket bygg på samme skifte i fjor<br/> + <label for="sameCropAsLastSeason">Vekstskifte</label><br> + <input type="checkbox" id="sameCropAsLastSeason" name="sameCropAsLastSeason"/> Jeg dyrket bygg på samme skifte i fjor<br/> <span class="help-block" id="{{ form_id }}_sameCropAsLastSeason_validation"></span> </div> <div class="form-group"> - <label>Jordarbeiding</label><br> - <input type="checkbox" name="plowed"/> Jeg har pløyd<br/> + <label for="plowed">Jordarbeiding</label><br> + <input type="checkbox" id="plowed" name="plowed"/> Jeg har pløyd<br/> <span class="help-block" id="{{ form_id }}_plowed_validation"></span> </div> </div> - <div class="col-md-6 form-group"> + <div class="col-md-6"> <div class="form-group"> - <label class="main-label" for="observationDate">Observasjonsdato</label> - <input type="date" name="observationDate" class="form-control"/> + <label for="observationDate" class="main-label" for="observationDate">Observasjonsdato</label> + <input type="date" id="observationDate" name="observationDate" class="form-control"/> <span class="help-block" id="{{ form_id }}_observationDate_validation"></span> </div> <div class="form-group"> - <label for ="observationValue">{% trans "% Infected leaves" %}</label> - <input type="number" name="observationValue" class="form-control" min="0" max="100"/> + <label for="observationValue">{% trans "% Infected leaves" %}</label> + <input type="number" id="observationValue" name="observationValue" class="form-control" min="0" max="100"/> <span class="help-block" id="{{ form_id }}_observationValue_validation"></span> </div> <div class="form-group space"> - <label class="main-label" for="sprayingDate">Sprøytedato</label> - <input type="date" name="sprayingDate" class="form-control"/> + <label for="sprayingDate" class="main-label">Sprøytedato</label> + <input type="date" id="sprayingDate" name="sprayingDate" class="form-control"/> <span class="help-block" id="{{ form_id }}_sprayingDate_validation"></span> </div> <div class="form-group"> @@ -147,7 +147,7 @@ </div> <div class="form-group"> <label for="preparationDose">og preparatdose (ml/daa)</label> - <input type="number" name="preparationDose" class="form-control"/> + <input type="number" id="preparationDose" name="preparationDose" class="form-control"/> <span class="help-block" id="{{ form_id }}_preparationDose_validation"></span> </div> @@ -225,12 +225,8 @@ const optionIndex = Array.from(selectWeatherstationElement.options).findIndex(option => option.value == selectedId); if (optionIndex !== -1) { selectWeatherstationElement.selectedIndex = optionIndex; - } else { - console.error(`No matching option found for poi.id=${selectedId}`); - } - } else { - console.info("New point selected", poiData); - } + } + } } window.openCoordinatesMap = () => { @@ -280,11 +276,10 @@ poiMapInstance.openModal(selectedPoiId); }) .catch(error => { - console.error('Unable to open map', error); + console.error('Unable to retrieve weatherstation geojson', error); }); } - window.displayWeatherstationInput = () => { document.getElementById("weatherstation").checked = true; document.getElementById('input-weatherstation').style.display="block"; @@ -542,4 +537,4 @@ }); </script> -{% endblock %} \ No newline at end of file +{% endblock %}