Adds explanations for the different types of names.
[platal.git] / templates / include / emails.combobox.tpl
CommitLineData
b715c1e1
SJ
1{**************************************************************************}
2{* *}
3{* Copyright (C) 2003-2008 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
4f06d57b
SJ
23{assign var=new value="new"|cat:$i}
24{assign var=combobox value="combobox"|cat:$i}
25{if !$isjob}
b715c1e1
SJ
26<tr {if $class}class="{$class}"{/if}>
27 <td>
4f06d57b 28{/if}
b715c1e1
SJ
29 <span class="titre">{if $name eq "email_directory"}Email annuaire AX
30 {elseif $name eq "email"}Ajouter une adresse email{else}
31 Email professionnel{/if}</span>
4f06d57b 32{if !$isjob}
b715c1e1
SJ
33 </td>
34 {if $name eq "email"}<td></td>{/if}
35 <td>
4f06d57b
SJ
36{else}
37 <br />
38 <span class="flags">
39 {include file="include/flags.radio.tpl" name="`$jobpref`[`$prefix`email_pub]" val=$pub}
40 </span>
41 <br />
42{/if}
43 <select name="{$name}" id="{$combobox}">
b715c1e1
SJ
44 {if $email_type eq "directory"}
45 <optgroup label="Email annuaire AX">
46 <option value="{$email_directory}" {if
47 $val eq $email_directory}selected="selected"{/if}>{$email_directory}</option>
48 </optgroup>
49 {/if}
50 {if $name eq "email_directory"}
51 <optgroup label="Emails polytechniciens">
52 {if $melix}
53 <option value="{$melix}@{#globals.mail.alias_dom#}" {if
54 $val eq $melix|cat:'@'|cat:#globals.mail.alias_dom#}selected="selected"{/if}>
55 {$melix}@{#globals.mail.alias_dom#}</option>
56 <option value="{$melix}@{#globals.mail.alias_dom2#}" {if
57 $val eq $melix|cat:'@'|cat:#globals.mail.alias_dom2#}selected="selected"{/if}>
58 {$melix}@{#globals.mail.alias_dom2#}</option>
59 {/if}
60 {foreach from=$list_email_X item=email}
61 <option value="{$email.alias}@{#globals.mail.domain#}" {if
62 $val eq $email.alias|cat:'@'|cat:#globals.mail.domain#}selected="selected"{/if}>
63 {$email.alias}@{#globals.mail.domain#}</option>
64 <option value="{$email.alias}@{#globals.mail.domain2#}" {if
65 $val eq $email.alias|cat:'@'|cat:#globals.mail.domain2#}selected="selected"{/if}>
66 {$email.alias}@{#globals.mail.domain2#}</option>
67 {/foreach}
68 </optgroup>
69 {/if}
70 {if (($name neq "email") && ($list_email_redir|@count neq 0))}
71 <optgroup label="Redirections">
72 {foreach from=$list_email_redir item=email}
73 <option value="{$email}" {if $val eq $email}selected="selected"{/if}>{$email}</option>
74 {/foreach}
75 </optgroup>
76 {/if}
77 {if $list_email_pro|@count neq 0}
78 <optgroup label="Emails professionels">
79 {foreach from=$list_email_pro item=email}
80 <option value="{$email}" {if
81 $val eq $email}selected="selected"{/if}>{$email}</option>
82 {/foreach}
83 </optgroup>
84 {/if}
85 <optgroup label="Autres choix">
6ea6d9c1 86 <option value="new@example.org" {if $error}selected="selected"{/if}>Utiliser une autre adresse email</option>
b715c1e1
SJ
87 <option value="" {if (($val eq '') && (!$error))}selected="selected"{/if}>{if
88 $name neq "email"}Ne pas mettre d'adresse email{else}&nbsp;{/if}</option>
89 </optgroup>
90 </select>
91 {if $name eq "email_directory"}
92 <input type="checkbox" disabled="disabled" checked="checked"/>
93 {icon name="flag_orange" title="Visible sur l'annuaire"}
4f06d57b 94 {elseif ($name neq "email") && (!$isjob)}
b715c1e1 95 <span class="flags">
c7139c07 96 {include file="include/flags.radio.tpl" name="`$jobpref`[`$prefix`email_pub]" val=$pub}
b715c1e1
SJ
97 </span>
98 {/if}
99 <br />
4f06d57b 100 <span class="{$new}" style="display: none">
b715c1e1 101 <input type="text" maxlength="60" {if $error}class="error" value="{$val}"{/if} name="{if (($name neq "email_directory")
c7139c07 102 && ($name neq "email"))}jobs[{$i}][{$prefix}email_new]{else}{$name}_new{/if}"/>
b715c1e1
SJ
103 </span>
104 <script type="text/javascript">//<![CDATA[
105 {literal}
106 $(function() {
4f06d57b
SJ
107 var i = {/literal}{$i}{literal};
108 $('select#combobox' + i).change(function() {
109 $('.new' + i).hide();
110 if ($('select#combobox' + i).val() == "new@example.org") {
111 $('.new' + i).show();
b715c1e1
SJ
112 }
113 }).change();
114 });
115 {/literal}
116 // ]]></script>
4f06d57b 117{if !$isjob}
b715c1e1
SJ
118 </td>
119 {if $name eq "email"}<td></td>{/if}
120</tr>
4f06d57b
SJ
121{else}
122<br />
123{/if}
b715c1e1 124{if $name neq "email"}
4f06d57b
SJ
125{if !$isjob}
126 <tr {if $class}class="{$class} {$new}"{else}class="{$new}"{/if} style="display: none">
b715c1e1 127 <td colspan="2">
4f06d57b
SJ
128{else}
129 <div class="{$new}" style="display: none">
130{/if}
b715c1e1
SJ
131 <p><small><strong><em>Attention :</em></strong> cette adresse email figurera dans
132 {if $name eq "email_directory"}l'annuaire papier{else}tes informations professionnelles
133 {/if} mais n'est pas ajoutée à la liste de tes redirections. Nous te conseillons fortement de
134 <strong><a href="emails/redirect">l'ajouter là</a></strong>, surtout
135 si tu n'en as plus de valide.</small></p>
4f06d57b 136{if !$isjob}
b715c1e1
SJ
137 </td>
138 </tr>
4f06d57b
SJ
139{else}
140 </div>
141{/if}
b715c1e1
SJ
142{/if}
143
144{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}