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