- {if $adr.geoloc}
- <tr>
- <td class="cold" colspan="5">
- <input type="hidden" name="change{$adrid}" value="0"/>
- <span class="erreur">La geolocalisation n'a pas donné un résultat certain, valide la nouvelle adresse ou modifie l'ancienne pour que ton adresse puisse être prise en compte.</span><br />
- <script type="text/javascript">setTimeout("document.location += '#adr{$adrid}'", 10);</script>
- <textarea name="txt[{$adrid}]" cols="30" rows="4" onchange="form.change{$adrid}.value=1"
- {if !$adr.cityid}style="background:#FAA"{/if}
- >{$adr.txt}</textarea>
- <textarea cols="30" rows="4"
- style="border:inherit;background:#AFA"
- onclick="blur()"
- >{$adr.geoloc}</textarea><p class="right">
- [<a href="{$smarty.server.PHP_SELF}?old_tab={$smarty.request.old_tab}&parsevalid[{$adrid}]=1&modifier=1">Valider</a>]
- </p>
- {else}
- <tr class="center">
- <td class="cold" colspan="2">
- <input type="hidden" name="change{$adrid}" />
- <textarea name="txt[{$adrid}]" cols="43" rows="4" onchange="form.change{$adrid}.value=1"
- {if $adr.nouvelle != 'new' && !$adr.cityid}style="background:#FAA"{/if}
- >{$adr.txt}</textarea>
- {/if}
- <input type="hidden" name="cityid[{$adrid}]" value="{$adr.cityid}" />
- <input type="hidden" name="adr1[{$adrid}]" value="{$adr.adr1}" />
- <input type="hidden" name="adr2[{$adrid}]" value="{$adr.adr2}" />
- <input type="hidden" name="adr3[{$adrid}]" value="{$adr.adr3}" />
- <input type="hidden" name="postcode[{$adrid}]" value="{$adr.postcode}"/>
- <input type="hidden" name="city[{$adrid}]" value="{$adr.city}" />
- <input type="hidden" name="country[{$adrid}]" value="{$adr.country}" />
- <input type="hidden" name="region[{$adrid}]" value="{$adr.region}" />
- </td>
- </tr>
+<input type="hidden" name="{$name}[changed]" value="0"/>
+{if $adr.geoloc}
+<div class="erreur" id="{$id}_geoloc_error">
+ La geolocalisation n'a pas donné un résultat certain, valide la nouvelle adresse
+ ou modifie l'ancienne pour que ton adresse puisse être prise en compte.
+</div>
+<script type="text/javascript">setTimeout("document.location += '#{$adid}'", 10);</script>
+{/if}
+<div>
+<textarea name="{$name}[text]" cols="30" rows="4"
+ onchange="form['{$name}[changed]'].value=1"
+ {if !$adr.cityid && $adr.datemaj}class="error"{/if}
+ >{$adr.text}</textarea>
+{if $adr.geoloc}
+<span id="{$id}_geoloc">
+<textarea cols="30" rows="4"
+ class="valid"
+ name="{$name}[geoloc]"
+ onclick="blur()"
+ >{$adr.geoloc}</textarea>
+<input type="hidden" name="{$name}[geoloc_cityid]" value="{$adr.geoloc_cityid}" />
+<input type="hidden" name="{$name}[parsevalid]" value="0" />
+</span>
+</div>
+<div class="center" id="{$id}_geoloc_valid">
+ <a href="javascript:validAddress('{$id}', '{$name}')">Valider ta version</a>
+ •
+ <a href="javascript:validGeoloc('{$id}', '{$name}')">Valider la version géolocalisée</a>
+{/if}
+</div>
+<input type="hidden" name="{$name}[cityid]" value="{$adr.cityid}" />
+<input type="hidden" name="{$name}[adr1]" value="{$adr.adr1}" />
+<input type="hidden" name="{$name}[adr2]" value="{$adr.adr2}" />
+<input type="hidden" name="{$name}[adr3]" value="{$adr.adr3}" />
+<input type="hidden" name="{$name}[postcode]" value="{$adr.postcode}"/>
+<input type="hidden" name="{$name}[city]" value="{$adr.city}" />
+<input type="hidden" name="{$name}[country]" value="{$adr.country|default:'00'}" />
+<input type="hidden" name="{$name}[countrytxt]" value="{$adr.countrytxt}" />
+<input type="hidden" name="{$name}[region]" value="{$adr.region}" />
+<input type="hidden" name="{$name}[regiontxt]" value="{$adr.regiontxt}" />
+<input type="hidden" name="{$name}[checked]" value="{$adr.checked}" />
+<input type="hidden" name="{$name}[precise_lat]" value="{$adr.precise_lat}" />
+<input type="hidden" name="{$name}[precise_lon]" value="{$adr.precise_lon}" />
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}