Author: deepak
Date: Thu May 21 12:10:57 2015
New Revision: 1680840
URL:
http://svn.apache.org/r1680840Log:
Applied patch from jira issue OFBIZ-6397 : Survey : FTL error message when using Enumeration or Geo question type
Thanks Gil Portenseigne for reporting the issue and providing the fix.
Modified:
ofbiz/trunk/applications/content/template/survey/genericsurvey.ftl
Modified: ofbiz/trunk/applications/content/template/survey/genericsurvey.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/survey/genericsurvey.ftl?rev=1680840&r1=1680839&r2=1680840&view=diff==============================================================================
--- ofbiz/trunk/applications/content/template/survey/genericsurvey.ftl (original)
+++ ofbiz/trunk/applications/content/template/survey/genericsurvey.ftl Thu May 21 12:10:57 2015
@@ -92,15 +92,14 @@ under the License.
<#assign formatString = surveyQuestionAndAppl.get("formatString")!/>
<#assign enums = surveyQuestionAndAppl.getRelated("Enumeration", null, null, false)/>
<#list enums as enum>
+ <#assign selected = ''/>
<#if (((answer.textResponse)?has_content && answer.textResponse == enum.enumId) || (defValue == enum.enumId))>
<#assign selected = 'selected'/>
- <#else>
- <#assign selected = ''/>
</#if>
<#if (formatString?has_content)>
<#assign description = Static["org.ofbiz.base.util.string.FlexibleStringExpander"].expandString(formatString, enum)/>
<#else>
- <#assign description = geo.getString("description")/>
+ <#assign description = enum.getString("description")/>
</#if>
<option value='${enum.enumId}' ${selected}>${description}</option>
</#list>
@@ -111,10 +110,9 @@ under the License.
<#assign parentGeoId = surveyQuestionAndAppl.get("geoId")!/>
<#assign geos = Static["org.ofbiz.common.geo.GeoWorker"].expandGeoGroup(parentGeoId, delegator)>
<#list geos as geo>
+ <#assign selected = ''/>
<#if (((answer.textResponse)?has_content && answer.textResponse == geo.geoId) || (defValue == geo.geoId))>
<#assign selected = 'selected'/>
- <#else>
- <#assign selected = ''/>
</#if>
<#if (formatString?has_content)>
<#assign description = Static["org.ofbiz.base.util.string.FlexibleStringExpander"].expandString(formatString, geo)/>