Address storage
[platal.git] / templates / profile / adresses.tpl
CommitLineData
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}
d5489b09 25function removeObject(id, pref)
0b14f91d
FB
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"}
7568a515 37<input type="hidden" name="{$adpref}[removed]" value="0"/>
0b14f91d
FB
38<table class="bicol" id="{$adid}" style="margin-bottom: 1em">
39 <tr>
40 <th>
41 <div style="float: left">
42 <input name="{$adpref}[active]" type="radio" value="{$adr.id}" {if $adr.current}checked="checked"{/if}
43 id="{$adid}_active"/>
44 <label for="{$adid}_active" class="smaller" style="font-weight: normal">actuelle</label>
45 </div>
46 <div style="float: right">
d5489b09 47 <a href="javascript:removeObject('{$adid}', '{$adpref}')">{icon name=cross title="Supprimer l'adresse"}</a>
0b14f91d
FB
48 </div>
49 Adresse n°{$i + 1}
50 </th>
51 </tr>
52 <tr>
53 <td>
54 <div>{include file="include/flags.radio.tpl" name="$adpref[pub]" notable=true val=$adr.pub}</div>
7568a515
FB
55 <div style="clear: both"></div>
56 <div style="float: left">{include file="geoloc/form.address.tpl" name=$adpref id=$adid adr=$adr}</div>
57 <div style="float: right">
58 <div>
59 <input type="radio" name="{$adpref}[temporary]" id="{$adid}_temp_0" value="0"
60 {if !$adr.temporary}checked="checked"{/if} /><label for="{$adid}_temp_0">permanente</label>
61 <input type="radio" name="{$adpref}[temporary]" id="{$adid}_temp_1" value="1"
62 {if $adr.temporary}checked="checked"{/if} /><label for="{$adid}_temp_1">temporaire</label>
63 </div>
64 <div>
65 <input type="radio" name="{$adpref}[secondaire]" id="{$adid}_sec_0" value="0"
66 {if !$adr.secondaire}checked="checked"{/if} /><label for="{$adid}_sec_0">ma résidence principale</label>
67 <input type="radio" name="{$adpref}[secondaire]" id="{$adid}_sec_1" value="1"
68 {if $adr.secondaire}checked="checked"{/if} /><label for="{$adid}_sec_1">une résidence secondaire</label>
69 </div>
70 <div>
71 <input type="checkbox" name="{$adpref}[mail]" id="{$adid}_mail"
72 {if $adr.mail}checked="checked"{/if} />
73 <label for="{$adid}_mail">on peut m'y envoyer du courrier par la poste</label>
74 </div>
75 </div>
76 </td>
77 </tr>
d5489b09 78 <tr class="pair">
7568a515
FB
79 <td>
80 {foreach from=$adr.tel key=t item=tel}
81 {assign var=telpref value="`$adpref`[tel][`$t`]"}
82 {assign var=telid value="`$adid`_tel_`$t`"}
83 <div id="{$telid}" style="clear: both">
84 <div style="float: right" class="flags">
85 {include file="include/flags.radio.tpl" name="`$telpref`[pub]" val=$tel.pub display="div"}
86 </div>
d5489b09 87 <span class="titre">N°{$t}</span>
7568a515
FB
88 <input type="hidden" name="{$telpref}[removed]" value="0" />
89 <input type="text" size="10" maxlength="30" name="{$telpref}[type]" value="{$tel.type}" />
90 <input type="text" size="19" maxlength="28" name="{$telpref}[tel]" value="{$tel.tel}" />
d5489b09
FB
91 <a href="javascript:removeObject('{$telid}', '{$telpref}')">
92 {icon name=cross title="Supprimer ce numéro de téléphone"}
93 </a>
7568a515
FB
94 </div>
95 {/foreach}
0b14f91d
FB
96 </td>
97 </tr>
98</table>
0b14f91d
FB
99{/foreach}
100
a7de4ef7 101{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}