Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
5ddeb07c | 3 | {* Copyright (C) 2003-2007 Polytechnique.org *} |
0337d704 | 4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} | |
6 | {* This program is free software; you can redistribute it and/or modify *} | |
7 | {* it under the terms of the GNU General Public License as published by *} | |
8 | {* the Free Software Foundation; either version 2 of the License, or *} | |
9 | {* (at your option) any later version. *} | |
10 | {* *} | |
11 | {* This program is distributed in the hope that it will be useful, *} | |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} | |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} | |
14 | {* GNU General Public License for more details. *} | |
15 | {* *} | |
16 | {* You should have received a copy of the GNU General Public License *} | |
17 | {* along with this program; if not, write to the Free Software *} | |
18 | {* Foundation, Inc., *} | |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} | |
20 | {* *} | |
21 | {**************************************************************************} | |
22 | ||
0b14f91d FB |
23 | <script type="text/javascript">//<![CDATA[ |
24 | {literal} | |
25 | function removeAddress(id, pref) | |
26 | { | |
27 | document.getElementById(id).style.display = "none"; | |
28 | document.forms.prof_annu[pref + "[removed]"].value = "1"; | |
29 | } | |
0337d704 | 30 | |
0b14f91d FB |
31 | {/literal} |
32 | //]]></script> | |
0337d704 | 33 | |
0b14f91d FB |
34 | {foreach key=i item=adr from=$addresses} |
35 | {assign var=adpref value="addresses[$i]"} | |
36 | {assign var=adid value="addresses_$i"} | |
37 | <table class="bicol" id="{$adid}" style="margin-bottom: 1em"> | |
38 | <tr> | |
39 | <th> | |
40 | <div style="float: left"> | |
41 | <input name="{$adpref}[active]" type="radio" value="{$adr.id}" {if $adr.current}checked="checked"{/if} | |
42 | id="{$adid}_active"/> | |
43 | <label for="{$adid}_active" class="smaller" style="font-weight: normal">actuelle</label> | |
44 | </div> | |
45 | <div style="float: right"> | |
46 | <a href="javascript:removeAddress('{$adid}', '{$adpref}')">{icon name=cross title="Supprimer l'adresse"}</a> | |
47 | </div> | |
48 | Adresse n°{$i + 1} | |
49 | </th> | |
50 | </tr> | |
51 | <tr> | |
52 | <td> | |
53 | <div>{include file="include/flags.radio.tpl" name="$adpref[pub]" notable=true val=$adr.pub}</div> | |
54 | <div {if !$adr.geoloc}class="center"{/if}>{include file="geoloc/form.address.tpl" name=$adpref id=$adid adr=$adr}</div> | |
55 | </td> | |
56 | </tr> | |
57 | </table> | |
58 | <input type="hidden" name="{$adpref}[removed]" value="0"/> | |
59 | {/foreach} | |
60 | ||
61 | {* | |
0337d704 | 62 | {section name=i loop=$nb_adr start=1 max=$nb_adr} |
0337d704 | 63 | {assign var='adrid' value=$ordre_adrid[i]} |
64 | {assign var='adr' value=$adresses.$adrid} | |
42d9575b | 65 | {include file="geoloc/form.address.tpl" adr=$adr titre=$titre} |
0337d704 | 66 | <tr> |
67 | <td class="colg"> | |
79a5acea | 68 | <span class="titre">Adresse:</span> |
0337d704 | 69 | </td> |
a778f541 | 70 | <td class="cold" colspan="4"> |
0337d704 | 71 | <input type="radio" name="temporaire[{$adrid}]" value="0" {if !$adr.temporaire}checked="checked"{/if} /> |
72 | permanente | |
73 | <input type="radio" name="temporaire[{$adrid}]" value="1" {if $adr.temporaire}checked="checked"{/if} /> | |
74 | temporaire | |
75 | </td> | |
76 | </tr> | |
77 | <tr> | |
78 | <td class="colg"> | |
79 | | |
80 | </td> | |
a778f541 | 81 | <td class="cold" colspan="4"> |
0337d704 | 82 | <input type="radio" name="secondaire[{$adrid}]" value="0" {if !$adr.secondaire}checked="checked"{/if} /> |
a7de4ef7 | 83 | ma résidence principale |
0337d704 | 84 | <input type="radio" name="secondaire[{$adrid}]" value="1" {if $adr.secondaire}checked="checked"{/if} /> |
a7de4ef7 | 85 | une résidence secondaire |
0337d704 | 86 | </td> |
87 | </tr> | |
88 | <tr> | |
89 | <td class="colg"> | |
90 | | |
91 | </td> | |
a778f541 | 92 | <td class="cold" colspan="4"> |
0337d704 | 93 | <input type="checkbox" name="courrier[{$adrid}]" value="1" {if $adr.courrier}checked="checked"{/if} /> on peut m'y envoyer du courrier par la poste |
94 | </td> | |
95 | </tr> | |
79a5acea | 96 | {foreach from=$adr.tels item="tel"} |
8303b851 | 97 | <tr class="flags"> |
98 | <td class="colg"> | |
99 | <input type="hidden" name="telid{$tel.telid}[{$adrid}]" value="{$tel.telid}"/> | |
5ee95138 | 100 | {if $tel.new_tel && !$tel.tel} |
8303b851 | 101 | <input type="hidden" name="new_tel{$tel.telid}[{$adrid}]" value="1"/> |
102 | {/if} | |
103 | <span class="titre" onclick="this.style.display='none';var d = document.getElementById('tel_type{$adrid}_{$tel.telid}');d.style.display='inline';d.select();d.focus();">{$tel.tel_type} :</span> | |
e9cd41fb | 104 | <input id="tel_type{$adrid}_{$tel.telid}" style="display:none" type="text" size="5" maxlength="30" name="tel_type{$tel.telid}[{$adrid}]" value="{$tel.tel_type}"/> |
8303b851 | 105 | </td> |
106 | <td> | |
107 | <input type="text" size="19" maxlength="28" name="tel{$tel.telid}[{$adrid}]" value="{$tel.tel}" /> | |
5ee95138 | 108 | {if $tel.tel} |
a7de4ef7 | 109 | <a href="profile/edit/{$onglet}?adrid={$adrid}&telid={$tel.telid}&deltel=1">{icon name=cross title="Supprimer ce tél."}</a> |
5ee95138 | 110 | {/if} |
8303b851 | 111 | </td> |
112 | {include file="include/flags.radio.tpl" name="tel_pub`$tel.telid`[$adrid]" val=$tel.tel_pub display="mini"} | |
113 | </tr> | |
79a5acea | 114 | {/foreach} |
0337d704 | 115 | <tr><td colspan="5"> </td></tr> |
116 | {/section} | |
117 | <tr><td colspan="5"> </td></tr> | |
118 | </table> | |
0b14f91d | 119 | *} |
a7de4ef7 | 120 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |