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

Removing the "Extended season trap site type"

parent ea4df48b
No related branches found
No related tags found
No related merge requests found
...@@ -140,7 +140,11 @@ public class BarkbeetleController extends HttpServlet { ...@@ -140,7 +140,11 @@ public class BarkbeetleController extends HttpServlet {
FormValidation formValidation = FormValidator.validateForm("modules/barkbeetle/seasonTrapsiteForm", request, getServletContext()); FormValidation formValidation = FormValidator.validateForm("modules/barkbeetle/seasonTrapsiteForm", request, getServletContext());
if(formValidation.isValid()) if(formValidation.isValid())
{ {
// New trapsites are always activated
if(trapsite.getSeasonTrapsiteId() == null)
{
trapsite.setActivated(true);
}
trapsite.setSeason(formValidation.getFormField("season").getValueAsInteger()); trapsite.setSeason(formValidation.getFormField("season").getValueAsInteger());
trapsite.setTrapsiteType(BarkbeetleBean.getInstance().getTrapsiteType(formValidation.getFormField("trapsiteTypeId").getValueAsInteger())); trapsite.setTrapsiteType(BarkbeetleBean.getInstance().getTrapsiteType(formValidation.getFormField("trapsiteTypeId").getValueAsInteger()));
......
...@@ -31,9 +31,7 @@ ...@@ -31,9 +31,7 @@
{ {
"name" : "trapsiteTypeId", "name" : "trapsiteTypeId",
"dataType" : "INTEGER", "dataType" : "INTEGER",
"fieldType" : "SELECT_SINGLE", "required" : true
"required" : true,
"nullValue" : "-1"
}, },
{ {
"name" : "userId", "name" : "userId",
......
File deleted
...@@ -208,20 +208,8 @@ ...@@ -208,20 +208,8 @@
<form id="${formId}" role="form" action="/barkbeetle?action=seasonTrapsiteFormSubmit" method="POST" onsubmit="return validateForm(this);""> <form id="${formId}" role="form" action="/barkbeetle?action=seasonTrapsiteFormSubmit" method="POST" onsubmit="return validateForm(this);"">
<input type="hidden" name="seasonTrapsiteId" value="${seasonTrapsite.seasonTrapsiteId!"-1"}"/> <input type="hidden" name="seasonTrapsiteId" value="${seasonTrapsite.seasonTrapsiteId!"-1"}"/>
<input type="hidden" name="locationUpdated" value="<#if seasonTrapsite.locationUpdated?has_content>${seasonTrapsite.locationUpdated?c}<#else>false</#if>"/> <input type="hidden" name="locationUpdated" value="<#if seasonTrapsite.locationUpdated?has_content>${seasonTrapsite.locationUpdated?c}<#else>false</#if>"/>
<input type="hidden" name="trapsiteTypeId" value="1"/>
<div class="form-group"> <div class="form-group">
<label for="trapsiteType">Type fellelokalitet *</label>
<select class="form-control" name="trapsiteTypeId" onblur="validateField(this);">
<#list seasonTrapsiteTypes as trapsite>
<option value="${trapsite.trapsiteTypeId}"
<#if (seasonTrapsite.trapsiteType?has_content && seasonTrapsite.trapsiteType.trapsiteTypeId == trapsite.trapsiteTypeId)
|| (!(seasonTrapsite.trapsiteType?has_content) && trapsite.trapsiteTypeId == 1)>
selected="selected"</#if>
>${trapsite.description}</option>
</#list>
</select>
</div>
<div class="form-group">
<label for="season">Sesong *</label> <label for="season">Sesong *</label>
<input type="text" class="form-control" name="season" placeholder="Sesong" value="${season}" onblur="validateField(this);"/> <input type="text" class="form-control" name="season" placeholder="Sesong" value="${season}" onblur="validateField(this);"/>
<span class="help-block" id="${formId}_season_validation"></span> <span class="help-block" id="${formId}_season_validation"></span>
......
...@@ -49,9 +49,7 @@ ...@@ -49,9 +49,7 @@
Barkbillefylkeskontakter</a>, Barkbillefylkeskontakter</a>,
<a href="/images/modules/barkbeetle/Instruks_registranter_i_Barkbilleovervakingen.pdf" target="new">Instruks registranter</a>, og <a href="/images/modules/barkbeetle/Instruks_registranter_i_Barkbilleovervakingen.pdf" target="new">Instruks registranter</a>, og
<a href="/images/modules/barkbeetle/Montering_av_barkbillefelle.pdf">Monteringsanvisning <a href="/images/modules/barkbeetle/Montering_av_barkbillefelle.pdf">Monteringsanvisning
Beka-felle</a> (kun noen få har i tillegg Beka-felle</a>.</p>
<a href="/images/modules/barkbeetle/Instruks_utvidet_sesong.pdf" target="new">utvidet
sesong</a> med egen instruksjon).</p>
<p><strong>Barkbillefylkeskontakt</strong> oppretter her lokaliteter for sitt fylke («Legg til <p><strong>Barkbillefylkeskontakt</strong> oppretter her lokaliteter for sitt fylke («Legg til
ny») og tildeler disse registranter som sørger for fellemontering, tømming ny») og tildeler disse registranter som sørger for fellemontering, tømming
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment