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