Fix advanced search for sections.
[platal.git] / templates / profile / adresses.address.tpl
CommitLineData
c6a7beb2
FB
1{**************************************************************************}
2{* *}
9f5bd98e 3{* Copyright (C) 2003-2010 Polytechnique.org *}
c6a7beb2
FB
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
041a5cec
SJ
23{assign var=prefname value="addresses[$i]"}
24{assign var=prefid value="addresses_$i"}
077c74b0
FB
25{if !hasPerm('directory_private') && ($address.pub eq 'private') && !$new}
26{assign var=hiddenaddr value=true}
27{else}
28{assign var=hiddenaddr value=false}
29{/if}
30
041a5cec 31<table class="bicol" style="display: none; margin-bottom: 1em" id="{$prefid}_grayed">
9a1cb883
FB
32 <tr>
33 <th class="grayed">
34 <div style="float: right">
9fce7016 35 <a href="javascript:toggleAddress('{$i}',0)">{icon name=arrow_refresh title="Restaurer l'adresse"}</a>
9a1cb883
FB
36 </div>
37 Restaurer l'adresse n°{$i+1}
38 </th>
39 </tr>
40</table>
041a5cec 41<table class="bicol" style="margin-bottom: 1em" id="{$prefid}">
c6a7beb2
FB
42 <tr>
43 <th>
44 <div style="float: left">
041a5cec
SJ
45 <label>
46 <input name="{$prefname}[current]" type="radio" {if $address.current}checked="checked"{/if}
47 onchange="checkCurrentAddress({$i})" />
48 <span class="smaller" style="font-weight: normal">actuelle</span>
49 </label>
c6a7beb2
FB
50 </div>
51 <div style="float: right">
9fce7016 52 <a href="javascript:toggleAddress('{$i}',1)">
041a5cec
SJ
53 {icon name=cross title="Supprimer l'adresse"}
54 </a>
c6a7beb2 55 </div>
077c74b0 56 Adresse n°{$i+1}{if $hiddenaddr} (masquée){/if}
c6a7beb2
FB
57 </th>
58 </tr>
077c74b0 59 <tr {if $hiddenaddr}style="display: none"{/if}>
c6a7beb2 60 <td>
2dcac0f5 61 <div style="margin-bottom: 0.2em" class="flags">
041a5cec 62 {include file="include/flags.radio.tpl" name="`$prefname`[pub]" val=$address.pub}
92412b28 63 </div>
c6a7beb2 64 <div style="clear: both"></div>
041a5cec
SJ
65 <div style="float: left">
66 {include file="geoloc/form.address.tpl" prefname=$prefname prefid=$prefid address=$address id=$i}
67 </div>
32346370 68 <div style="float: left">
c6a7beb2 69 <div>
041a5cec
SJ
70 <label>
71 <input type="radio" name="{$prefname}[temporary]" value="0"
72 {if !$address.temporary}checked="checked"{/if} />
73 permanente
74 </label>
75 <label>
76 <input type="radio" name="{$prefname}[temporary]" value="1"
77 {if $address.temporary}checked="checked"{/if} />
78 temporaire
79 </label>
c6a7beb2
FB
80 </div>
81 <div>
041a5cec
SJ
82 <label>
83 <input type="radio" name="{$prefname}[secondary]" value="0"
84 {if !$address.secondary}checked="checked"{/if} />
85 ma résidence principale
86 </label>
87 <label>
88 <input type="radio" name="{$prefname}[secondary]" value="1"
89 {if $address.secondary}checked="checked"{/if} />
90 une résidence secondaire
91 </label>
c6a7beb2
FB
92 </div>
93 <div>
041a5cec
SJ
94 <label>
95 <input type="checkbox" name="{$prefname}[mail]" {if $address.mail}checked="checked"{/if} />
96 on peut m'y envoyer du courrier par la poste
97 </label>
c6a7beb2 98 </div>
646a4582 99 <div>
041a5cec
SJ
100 <label>
101 Commentaire&nbsp;:
102 <input type="text" size="35" maxlength="100"
103 name="{$prefname}[comment]" value="{$address.comment}" />
104 </label>
646a4582 105 </div>
c6a7beb2
FB
106 </div>
107 </td>
108 </tr>
077c74b0 109 <tr class="pair" {if $hiddenaddr}style="display: none"{/if}>
c6a7beb2 110 <td>
eb54852e 111 {foreach from=$address.phones key=t item=tel}
041a5cec 112 <div id="{"`$prefid`_tel_`$t`"}" style="clear: both">
eb54852e 113 {include file="profile/phone.tpl" prefname="`$prefname`[phones]"
041a5cec 114 prefid="`$prefid`_tel" telid=$t tel=$tel}
bde2be3b 115 </div>
c6a7beb2 116 {/foreach}
eb54852e 117 {if $address.phones|@count eq 0}
041a5cec 118 <div id="{"`$prefid`_tel_0"}" style="clear: both">
eb54852e 119 {include file="profile/phone.tpl" prefname="`$prefname`[phones]" prefid="`$prefid`_tel" telid=0 tel=0}
bde2be3b 120 </div>
c6a7beb2 121 {/if}
041a5cec 122 <div id="{$prefid}_tel_add" class="center" style="clear: both; padding-top: 4px">
eb54852e 123 <a href="javascript:addTel('{$prefid}_tel','{$prefname}[phones]')">
c6a7beb2
FB
124 {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
125 </a>
126 </div>
127 </td>
128 </tr>
129</table>
130
131{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}