Happy New Year!
[platal.git] / templates / profile / general.searchname.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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 <tr id="search_name_{$i}"{if t($class)} class="{$class}" {if !t($error_name)}style="{$style}"{/if}{/if}>
24   <td>
25     <input type="hidden" name="search_names[{$i}][always_displayed]" value="{$sn.always_displayed}"/>
26     <input type="hidden" name="search_names[{$i}][has_particle]" value="{$sn.has_particle}"/>
27     <span class="flags">
28       <span id="flag_{$i}">{if $sn.pub}{icon name="flag_green" title="site public"}
29       {else}{icon name="flag_red" title="site privĂ©"}{/if}</span>
30     </span>&nbsp;
31     {if t($sn_type_list)}
32     <select id="search_name_select_{$i}" name="search_names[{$i}][typeid]"
33       onchange="changeNameFlag({$i});updateNameDisplay({$isFemale});">
34         {foreach from=$sn_type_list item=sn_type}
35           <option value="{$sn_type.id}">{$sn_type.name}</option>
36         {/foreach}
37     </select>
38     {foreach from=$sn_type_list item=sn_type}
39     <input type="hidden" name="sn_type_{$sn_type.id}_{$i}" value="{$sn_type.pub}"/>
40     {/foreach}
41     {else}
42     {$sn.type_name}
43     <input type="hidden" name="search_names[{$i}][pub]" value="{$sn.pub}"/>
44     <input type="hidden" name="search_names[{$i}][type]" value="{$sn.type}"/>
45     <input type="hidden" name="search_names[{$i}][type_name]" value="{$sn.type_name}"/>
46     <input type="hidden" name="search_names[{$i}][typeid]" value="{$sn.typeid}"/>
47     {/if}
48   </td>
49   <td>
50     <input type="text" name="search_names[{$i}][name]" value="{$sn.name}"
51       {if $sn.has_particle}title="Coche la case en bout de ligne si ton nom commence par une particle."{/if}
52       {if t($sn.error)} class="error"{/if} size="25" onkeyup="updateNameDisplay({$isFemale});"/>
53   </td>
54   <td>
55     {if $sn.has_particle}<input type="checkbox"{if $sn.particle neq ''} checked="checked"{/if}
56       title="Coche cette case si ton nom commence par une particle." onchange="toggleParticle({$i});"/>
57     {/if}
58     <input type="hidden"  name="search_names[{$i}][particle]" value="{$sn.particle}"/>
59     {if !$sn.always_displayed}<a href="javascript:removeSearchName({$i},{$isFemale})">
60       {icon name=cross title="Supprimer ce nom"}
61     </a>{/if}
62   </td>
63 </tr>
64
65 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}