html_code_entry_type_geolocation.html
1 <#if entry.fields?has_content>
2 <#assign addressField = getFieldValueByCode( entry, "address" )>
3 <#assign xField = getFieldValueByCode( entry, "X" )>
4 <#assign yField = getFieldValueByCode( entry, "Y" )>
5 </#if>
6 <div class="form-group">
7 <label class="col-sm-2 control-label" for="form${entry.idEntry}_address" id="attribute${entry.idEntry}">${entry.title}<#if entry.mandatory> *</#if></label>
8 <div class="col-sm-10">
9 <#if list_responses??>
10 <#list list_responses as response>
11 <#if response.entry.idEntry == entry.idEntry && response.toStringValueResponse??>
12 <#if response.field.title??>
13 <#if response.field.title == "X">
14 <#assign lat = response.toStringValueResponse />
15 <input type="hidden" name="${entry.idEntry}_x" id="${entry.idEntry}_x" value="${response.toStringValueResponse!}"/>
16 <#elseif response.field.title == "Y">
17 <#assign lon = response.toStringValueResponse />
18 <input type="hidden" name="${entry.idEntry}_y" id="${entry.idEntry}_y" value="${response.toStringValueResponse!}"/>
19 <#elseif response.field.title == "idAddress">
20 <input type="hidden" name="${entry.idEntry}_idAddress" id="${entry.idEntry}_idAddress" value="${response.toStringValueResponse!}"/>
21 <#else>
22 <input type="text" name="${entry.idEntry}_address" id="${entry.idEntry}_address" size="50" <#if response.entry.error??>class="error"<#else>class="${entry.CSSClass!}"</#if> value="${response.toStringValueResponse!}" />
23 </#if>
24 </#if>
25 </#if>
26 </#list>
27 <#else>
28 <input type="text" value="" name="${entry.idEntry}_address" id="${entry.idEntry}_address" size="50" />
29 <input type="hidden" name="${entry.idEntry}_x" id="${entry.idEntry}_x" value=""/>
30 <input type="hidden" name="${entry.idEntry}_y" id="${entry.idEntry}_y" value=""/>
31 <input type="hidden" name="${entry.idEntry}_idAddress" id="${entry.idEntry}_idAddress" value=""/>
32 </#if>
33 <#if entry.helpMessage?exists&&entry.helpMessage!=''>
34 <p class="help-block">${entry.helpMessage}</p>
35 </#if>
36
37 <#if list_responses??>
38 <#assign show_error = 0>
39 <#list list_responses as response>
40 <#if response.entry.idEntry == entry.idEntry && response.entry.error?? && show_error == 0>
41 <#assign show_error = 1>
42 <div class="alert alert-error">
43 <#assign error = response.entry.error>
44 <#if error.mandatoryError>
45 #i18n{announce.message.mandatory.entry}
46 <#else>
47 ${error.errorMessage}
48 </#if>
49 </div>
50 </#if>
51 </#list>
52 </#if>
53 <#if entry.mapProvider?has_content>
54 <#include entry.mapProvider.htmlCode />
55 </#if>
56 </div>
57 </div>