Commit | Line | Data |
---|---|---|
c6a7beb2 FB |
1 | {**************************************************************************} |
2 | {* *} | |
c441aabe | 3 | {* Copyright (C) 2003-2014 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"} | |
4555d490 NI |
25 | {if $isMe || hasPerm('admin') || $new} |
26 | {assign var=hiddenaddr value=false} | |
27 | {elseif hasPerm('directory_hidden') || (($address.pub neq 'hidden') && ($address.pub neq 'private'))} | |
28 | {assign var=hiddenaddr value=false} | |
29 | {elseif hasPerm('directory_private') && ($address.pub neq 'hidden')} | |
30 | {assign var=hiddenaddr value=false} | |
077c74b0 | 31 | {else} |
4555d490 | 32 | {assign var=hiddenaddr value=true} |
077c74b0 FB |
33 | {/if} |
34 | ||
041a5cec | 35 | <table class="bicol" style="display: none; margin-bottom: 1em" id="{$prefid}_grayed"> |
9a1cb883 FB |
36 | <tr> |
37 | <th class="grayed"> | |
38 | <div style="float: right"> | |
9fce7016 | 39 | <a href="javascript:toggleAddress('{$i}',0)">{icon name=arrow_refresh title="Restaurer l'adresse"}</a> |
9a1cb883 FB |
40 | </div> |
41 | Restaurer l'adresse n°{$i+1} | |
42 | </th> | |
43 | </tr> | |
44 | </table> | |
041a5cec | 45 | <table class="bicol" style="margin-bottom: 1em" id="{$prefid}"> |
c6a7beb2 | 46 | <tr> |
3ac6d61d | 47 | <th colspan="2"> |
c6a7beb2 | 48 | <div style="float: left"> |
041a5cec SJ |
49 | <label> |
50 | <input name="{$prefname}[current]" type="radio" {if $address.current}checked="checked"{/if} | |
51 | onchange="checkCurrentAddress({$i})" /> | |
52 | <span class="smaller" style="font-weight: normal">actuelle</span> | |
53 | </label> | |
c6a7beb2 FB |
54 | </div> |
55 | <div style="float: right"> | |
9fce7016 | 56 | <a href="javascript:toggleAddress('{$i}',1)"> |
041a5cec SJ |
57 | {icon name=cross title="Supprimer l'adresse"} |
58 | </a> | |
c6a7beb2 | 59 | </div> |
077c74b0 | 60 | Adresse n°{$i+1}{if $hiddenaddr} (masquée){/if} |
c6a7beb2 FB |
61 | </th> |
62 | </tr> | |
077c74b0 | 63 | <tr {if $hiddenaddr}style="display: none"{/if}> |
3ac6d61d SJ |
64 | <td colspan="2" class="flags"> |
65 | {include file="include/flags.radio.tpl" name="`$prefname`[pub]" val=$address.pub mainField='addresses' mainId=$i subField='phones' subId=-1} | |
66 | </td> | |
67 | </tr> | |
b9fc85ac | 68 | {include file="geoloc/form.address.tpl" prefname=$prefname prefid=$prefid address=$address id=$i hiddenaddr=$hiddenaddr} |
3ac6d61d SJ |
69 | <tr {if $hiddenaddr}style="display: none"{/if}> |
70 | {if !$isMe} | |
c6a7beb2 | 71 | <td> |
a3328b1e | 72 | <small><strong>Adresse postale :</strong><br />{$address.postalText|nl2br}</small> |
3ac6d61d SJ |
73 | </td> |
74 | <td> | |
75 | {else} | |
76 | <td colspan="2"> | |
77 | {/if} | |
32346370 | 78 | <div style="float: left"> |
c6a7beb2 | 79 | <div> |
041a5cec SJ |
80 | <label> |
81 | <input type="radio" name="{$prefname}[temporary]" value="0" | |
82 | {if !$address.temporary}checked="checked"{/if} /> | |
83 | permanente | |
84 | </label> | |
85 | <label> | |
86 | <input type="radio" name="{$prefname}[temporary]" value="1" | |
87 | {if $address.temporary}checked="checked"{/if} /> | |
88 | temporaire | |
89 | </label> | |
c6a7beb2 FB |
90 | </div> |
91 | <div> | |
041a5cec SJ |
92 | <label> |
93 | <input type="radio" name="{$prefname}[secondary]" value="0" | |
94 | {if !$address.secondary}checked="checked"{/if} /> | |
95 | ma résidence principale | |
96 | </label> | |
97 | <label> | |
98 | <input type="radio" name="{$prefname}[secondary]" value="1" | |
99 | {if $address.secondary}checked="checked"{/if} /> | |
100 | une résidence secondaire | |
101 | </label> | |
c6a7beb2 FB |
102 | </div> |
103 | <div> | |
041a5cec SJ |
104 | <label> |
105 | <input type="checkbox" name="{$prefname}[mail]" {if $address.mail}checked="checked"{/if} /> | |
2b10c5b5 | 106 | on peut {if $isMe}m'{/if}y envoyer du courrier par la poste |
041a5cec | 107 | </label> |
c6a7beb2 | 108 | </div> |
baee0f5a SJ |
109 | {if !t($isMe)} |
110 | <div> | |
111 | <label> | |
112 | <input type="checkbox" name="{$prefname}[deliveryIssue]" {if $address.deliveryIssue}checked="checked"{/if} /> | |
113 | n'habite pas à l'adresse indiquée | |
114 | </label> | |
115 | </div> | |
116 | {else} | |
117 | <div style="display: none"><input type="hidden" name="deliveryIssue" value="{$address.deliveryIssue}" /></div> | |
118 | {/if} | |
646a4582 | 119 | <div> |
041a5cec SJ |
120 | <label> |
121 | Commentaire : | |
122 | <input type="text" size="35" maxlength="100" | |
123 | name="{$prefname}[comment]" value="{$address.comment}" /> | |
124 | </label> | |
646a4582 | 125 | </div> |
c6a7beb2 FB |
126 | </div> |
127 | </td> | |
128 | </tr> | |
077c74b0 | 129 | <tr class="pair" {if $hiddenaddr}style="display: none"{/if}> |
3ac6d61d | 130 | <td colspan="2"> |
eb54852e | 131 | {foreach from=$address.phones key=t item=tel} |
6fc390c7 SJ |
132 | <div id="{"`$prefid`_phones_`$t`"}" style="clear: both"> |
133 | {include file="profile/phone.tpl" prefname="`$prefname`[phones]" prefid="`$prefid`_phones" telid=$t tel=$tel | |
134 | subField='phones' mainField='addresses' mainId=$i} | |
bde2be3b | 135 | </div> |
c6a7beb2 | 136 | {/foreach} |
eb54852e | 137 | {if $address.phones|@count eq 0} |
6fc390c7 SJ |
138 | <div id="{"`$prefid`_phones_0"}" style="clear: both"> |
139 | {include file="profile/phone.tpl" prefname="`$prefname`[phones]" prefid="`$prefid`_phones" telid=0 tel=0 | |
140 | subField='phones' mainField='addresses' mainId=$i} | |
bde2be3b | 141 | </div> |
c6a7beb2 | 142 | {/if} |
6fc390c7 SJ |
143 | <div id="{$prefid}_phones_add" class="center" style="clear: both; padding-top: 4px"> |
144 | <a href="javascript:addTel('{$prefid}_phones','{$prefname}[phones]','phones','addresses','{$i}')"> | |
c6a7beb2 FB |
145 | {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone |
146 | </a> | |
147 | </div> | |
148 | </td> | |
149 | </tr> | |
150 | </table> | |
151 | ||
448c8cdc | 152 | {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *} |