Merge branch 'profile_edit'
[platal.git] / templates / profile / adresses.address.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 Polytechnique.org                             *}
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
23 {if $ajaxadr}
24 <?xml version="1.0" encoding="utf-8"?>
25 {/if}
26 {assign var=adpref value="addresses[$i]"}
27 {assign var=adid value="addresses_$i"}
28 <input type="hidden" name="{$adpref}[removed]" value="0"/>
29 <input type="hidden" name="{$adpref}[datemaj]" value="{$adr.datemaj}"/>
30 <table class="bicol" style="display: none; margin-bottom: 1em" id="{$adid}_grayed">
31   <tr>
32     <th class="grayed">
33       <div style="float: right">
34         <a href="javascript:restoreAddress('{$adid}', '{$adpref}')">{icon name=arrow_refresh title="Restaurer l'adresse"}</a>
35       </div>
36       Restaurer l'adresse n°{$i+1}
37     </th>
38   </tr>
39 </table>
40 <table class="bicol" style="margin-bottom: 1em" id="{$adid}">
41   <tr>
42     <th>
43       <div style="float: left">
44         <input name="{$adpref}[current]" type="radio" value="1" {if $adr.current}checked="checked"{/if}
45                id="{$adid}_current" onchange="checkCurrentAddress(this); return true" />
46         <label for="{$adid}_current" class="smaller" style="font-weight: normal">actuelle</label>
47       </div>
48       <div style="float: right">
49         <a href="javascript:removeAddress('{$adid}', '{$adpref}')">{icon name=cross title="Supprimer l'adresse"}</a>
50       </div>
51       Adresse n°{$i+1}
52     </th>
53   </tr>
54   <tr>
55     <td>
56       <div style="margin-bottom: 0.2em" class="flags">
57         {include file="include/flags.radio.tpl" name="`$adpref`[pub]" notable=true val=$adr.pub display="div"}
58       </div>
59       <div style="clear: both"></div>
60       <div style="float: left">{include file="geoloc/form.address.tpl" name=$adpref id=$adid adr=$adr}</div>
61       <div style="float: left">
62         <div>
63           <input type="radio" name="{$adpref}[temporary]" id="{$adid}_temp_0" value="0"
64                  {if !$adr.temporary}checked="checked"{/if} /><label for="{$adid}_temp_0">permanente</label>
65           <input type="radio" name="{$adpref}[temporary]" id="{$adid}_temp_1" value="1"
66                  {if $adr.temporary}checked="checked"{/if} /><label for="{$adid}_temp_1">temporaire</label>
67         </div>
68         <div>
69           <input type="radio" name="{$adpref}[secondaire]" id="{$adid}_sec_0" value="0"
70                  {if !$adr.secondaire}checked="checked"{/if} /><label for="{$adid}_sec_0">ma résidence principale</label>
71           <input type="radio" name="{$adpref}[secondaire]" id="{$adid}_sec_1" value="1"
72                  {if $adr.secondaire}checked="checked"{/if} /><label for="{$adid}_sec_1">une résidence secondaire</label>
73         </div>
74         <div>
75           <input type="checkbox" name="{$adpref}[mail]" id="{$adid}_mail"
76                  {if $adr.mail}checked="checked"{/if} />
77           <label for="{$adid}_mail">on peut m'y envoyer du courrier par la poste</label>
78         </div>
79       </div>
80     </td>
81   </tr>
82   <tr class="pair">
83     <td>
84       {foreach from=$adr.tel key=t item=tel}
85       <div id="{"`$adid`_tel_`$t`"}" style="clear: both">
86       {include file="profile/adresses.tel.tpl" t=$t tel=$tel}
87       </div>
88       {/foreach}
89       {if $adr.tel|@count eq 0}
90       <div id="{"`$adid`_tel_0"}" style="clear: both">
91       {include file="profile/adresses.tel.tpl" t=0 tel=0}
92       </div>
93       {/if}
94       <div id="{$adid}_add_tel" class="center" style="clear: both">
95         <a href="javascript:addTel({$i})">
96           {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
97         </a>
98       </div>
99     </td>
100   </tr>
101 </table>
102
103 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}