Skip to content
Snippets Groups Projects
Commit 7e140bad authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfixes and improvements of Apple Fruit Moth Module

parent 13d8d698
Branches
Tags
No related merge requests found
...@@ -181,8 +181,8 @@ public class AppleFruitMothController extends HttpServlet { ...@@ -181,8 +181,8 @@ public class AppleFruitMothController extends HttpServlet {
ossc.setLastUpdated(SystemTime.getSystemTime()); ossc.setLastUpdated(SystemTime.getSystemTime());
ossc.setWarningStatus(formValidation.getFormField("warningStatus").getValueAsInteger()); ossc.setWarningStatus(formValidation.getFormField("warningStatus").getValueAsInteger());
ossc.setDegreeOfParasitation(formValidation.getFormField("degreeOfParasitation") != null ? formValidation.getFormField("degreeOfParasitation").getValueAsDouble(): null); ossc.setDegreeOfParasitation( !formValidation.getFormField("degreeOfParasitation").isEmpty() ? formValidation.getFormField("degreeOfParasitation").getValueAsDouble(): null);
ossc.setThousandBerrySample(formValidation.getFormField("thousandBerrySample") != null ? formValidation.getFormField("thousandBerrySample").getValueAsDouble(): null); ossc.setThousandBerrySample( !formValidation.getFormField("thousandBerrySample").isEmpty() ? formValidation.getFormField("thousandBerrySample").getValueAsDouble(): null);
ossc.setRemarks(formValidation.getFormField("remarks") != null ? formValidation.getFormField("remarks").getWebValue() : ""); ossc.setRemarks(formValidation.getFormField("remarks") != null ? formValidation.getFormField("remarks").getWebValue() : "");
observationSite.getObservationSiteSeasonCommonDataSet().add(ossc); observationSite.getObservationSiteSeasonCommonDataSet().add(ossc);
SessionControllerGetter.getAppleFruitMothBean().storeObservationSite(observationSite); SessionControllerGetter.getAppleFruitMothBean().storeObservationSite(observationSite);
......
...@@ -76,12 +76,12 @@ ...@@ -76,12 +76,12 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="degreeOfParasitation">${i18nBundle.degreeOfParasitation} (${i18nBundle.internal})</label> <label for="degreeOfParasitation">${i18nBundle.degreeOfParasitation} (${i18nBundle.internal})</label>
<input type="number" step="any" class="form-control" name="degreeOfParasitation" placeholder="${i18nBundle.degreeOfParasitation}" value="<#if observationSiteSeasonCommonData??>${observationSiteSeasonCommonData.degreeOfParasitation?c!""}</#if>" onblur="validateField(this);" /> <input type="number" step="any" class="form-control" name="degreeOfParasitation" placeholder="${i18nBundle.degreeOfParasitation}" value="<#if observationSiteSeasonCommonData?? && observationSiteSeasonCommonData.degreeOfParasitation??>${observationSiteSeasonCommonData.degreeOfParasitation?c!""}</#if>" onblur="validateField(this);" />
<span class="help-block" id="${formId}_degreeOfParasitation_validation"></span> <span class="help-block" id="${formId}_degreeOfParasitation_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="thousandBerrySample">${i18nBundle.thousandBerrySample} (${i18nBundle.internal})</label> <label for="thousandBerrySample">${i18nBundle.thousandBerrySample} (${i18nBundle.internal})</label>
<input type="number" step="any" class="form-control" name="thousandBerrySample" placeholder="${i18nBundle.thousandBerrySample}" value="<#if observationSiteSeasonCommonData??>${observationSiteSeasonCommonData.thousandBerrySample?c!""}</#if>" onblur="validateField(this);" /> <input type="number" step="any" class="form-control" name="thousandBerrySample" placeholder="${i18nBundle.thousandBerrySample}" value="<#if observationSiteSeasonCommonData?? && observationSiteSeasonCommonData.thousandBerrySample??>${observationSiteSeasonCommonData.thousandBerrySample?c!""}</#if>" onblur="validateField(this);" />
<span class="help-block" id="${formId}_thousandBerrySample_validation"></span> <span class="help-block" id="${formId}_thousandBerrySample_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment