Remove non-working options from xnet mail page.
[platal.git] / templates / xnetgrp / mail.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2014 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
24 <h1>{$asso->nom}&nbsp;: Envoyer un email</h1>
25
26 <p class="descr">
27 Ton message peut être personnalisé&nbsp;: si tu rentres les mots &lt;cher&gt;, &lt;prenom&gt;,
28 &lt;nom&gt;, ces mots seront remplacés, pour chacun des destinataires, par "cher" accordé au
29 masculin ou féminin, par son prénom, ou son nom.
30 </p>
31
32 <script type="text/javascript">//<![CDATA[
33   {literal}
34   function check(form)
35   {
36     if(form.sujet.value == "" && !confirm("Le sujet de l'email est vide, veux-tu continuer ?")) {
37         form.sujet.focus();
38         return false;
39     }
40     var bouton = document.getElementById('submit_bt');
41     bouton.disabled = "disabled";
42     bouton.value="Envoi...";
43   }
44
45   function updateWikiView(box) {
46     if (!box.checked) {
47       document.getElementById("preview_bt").style.display = "none";
48       document.getElementById("preview").style.display = "none";
49     } else {
50       document.getElementById("preview_bt").style.display = "";
51     }
52   }
53   {/literal}
54 //]]></script>
55
56 <form action="{$platal->ns}mail" method="post" enctype="multipart/form-data" onsubmit="return check(this);">
57   {xsrf_token_field}
58   <table class='bicol'>
59     <tr>
60       <th colspan="2">Écrire un email&nbsp;:</th>
61     </tr>
62     <tr>
63       <td class="titre">Expéditeur&nbsp;:</td>
64       <td>
65         <input type="text" name="from" size="55" maxlength="255"
66           value="{if $smarty.request.from}{$smarty.request.from}{else}&quot;{$user->fullName()}&quot; &lt;{$user->bestEmail()}&gt;{/if}" />
67       </td>
68     </tr>
69     <tr>
70       <td class="titre">Répondre à&nbsp;:</td>
71       <td>
72         <input type="text" name="replyto" size="55" maxlength="255" value="{$smarty.request.replyto}" />
73       </td>
74     </tr>
75
76     <tr>
77       <th colspan="2">Destinataires</th>
78     </tr>
79     <tr valign="top">
80       <td style='padding-left: 1em' class='titre'>
81         <em>annuaire</em>
82       </td>
83       <td>
84         <label><input type="checkbox" name="membres[X]" value="1"  {if $smarty.request.membres.X}checked="checked"{/if} />
85         <em>écrire à tous les membres du groupe</em></label><br />
86         <a href="{$platal->ns}annuaire" class='popup'>(voir annuaire)</a><br />
87       </td>
88     </tr>
89
90     {foreach from=$listes item=l}
91     <tr>
92       <td style='padding-left: 1em' class='titre'>
93         {$l.list}
94       </td>
95       <td>
96         <label><input type="checkbox" name="ml[{$l.list}]" value="1" {if $smarty.request.ml[$l.list]}checked="checked"{/if} />
97         {$l.addr}</label>
98         <a href="{$platal->ns}lists/members/{$l.list}" class="popup">(voir composition)</a>
99       </td>
100     </tr>
101     {/foreach}
102
103     <tr>
104       <th colspan="2">Contenu de l'email</th>
105     </tr>
106     <tr>
107       <td class="titre">
108         Sujet&nbsp;:
109       </td>
110       <td><input type="text" name="sujet" value="{$smarty.request.sujet}" size="55" maxlength="70" /></td>
111     </tr>
112     <tr>
113       <td colspan="2" class="smaller">
114         <input type="checkbox" name="wiki" value="1" checked="checked" onchange="updateWikiView(this);" id="wiki_syntaxe"/>
115         <label for="wiki_syntaxe">activer </label><a href="wiki_help" class="popup3">la syntaxe wiki</a>
116         <label for="wiki_syntaxe">pour le formattage du message</label>
117       </td>
118     </tr>
119     <tr id="preview" class="pair" style="display: none">
120       <td colspan="2">
121         <div id="mail_preview"></div>
122         <div class="center"><input type="submit" name="send" value="Envoyer le message" /></div>
123       </td>
124     </tr>
125     <tr>
126       <td colspan="2" class="center">
127         <textarea name="body" id="mail_text" cols="72" rows="25">
128 {if $smarty.request.body}
129 {$smarty.request.body}
130 {else}
131 &lt;cher&gt; &lt;prenom&gt;,
132
133 Nous avons le plaisir de t'adresser la lettre mensuelle du groupe {$asso->nom}.
134
135 (insérer le texte&hellip;)
136
137 Le bureau du groupe {$asso->nom}.
138 {/if}</textarea>
139       </td>
140     </tr>
141     <tr>
142       <td class="titre">
143         {icon name=email_attach} Attacher un fichier
144       </td>
145       <td>
146         <input type="file" name="uploaded" />
147       </td>
148     </tr>
149     <tr>
150       <td colspan="2">
151         <p style="font-size: larger;">
152           <b>Attention</b>&nbsp;: si après avoir cliqué sur le bouton "Envoyer le message"
153           la page met un temps long à répondre, ceci peut être lié au fait que le serveur
154           est en train d'envoyer beaucoup de mails et cet outil n'est certainement pas
155           adapté pour cette situation.
156         </p>
157         <p>
158           Au lieu d'utiliser cet outil, il est possible d'utiliser la
159           <a href="{$platal->ns}nl">newsletter</a> du groupe pour écrire au groupe.
160         </p>
161         <p>
162           Pour connaître quelles solutions Polytechnique.org propose pour effectuer
163           un envoi massif de mails ciblés, merci de contacter
164           <a href="mailto:contact@polytechnique.org">contact@polytechnique.org</a>.
165         </p>
166       </td>
167     </tr>
168     <tr>
169       <td colspan="2" align="center">
170         <input type="submit" name="preview" id="preview_bt" value="Aperçu" onclick="previewWiki('mail_text', 'mail_preview', true, 'preview'); return false;" />
171         <input type="submit" name="send" id="submit_bt" value="Envoyer le message" />
172       </td>
173     </tr>
174   </table>
175 </form>
176
177 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}