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 | } | |
f42e15fc AL |
40 | var bouton = document.getElementById('submit_bt'); |
41 | bouton.disabled = "disabled"; | |
42 | bouton.value="Envoi..."; | |
d2164ce7 SJ |
43 | } |
44 | ||
fdbeba4f | 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> | |
aab2ffdd | 55 | |
d2164ce7 | 56 | <form action="{$platal->ns}mail" method="post" enctype="multipart/form-data" onsubmit="return check(this);"> |
e7fdf9dd | 57 | {xsrf_token_field} |
0359898c | 58 | <table class='bicol'> |
0337d704 | 59 | <tr> |
faefdbb7 | 60 | <th colspan="2">Écrire un email :</th> |
0337d704 | 61 | </tr> |
62 | <tr> | |
e8439508 | 63 | <td class="titre">Expéditeur :</td> |
0337d704 | 64 | <td> |
3232ad9b | 65 | <input type="text" name="from" size="55" maxlength="255" |
7912097e | 66 | value="{if $smarty.request.from}{$smarty.request.from}{else}"{$user->fullName()}" <{$user->bestEmail()}>{/if}" /> |
0337d704 | 67 | </td> |
68 | </tr> | |
9898b36e | 69 | <tr> |
e8439508 | 70 | <td class="titre">Répondre à :</td> |
9898b36e | 71 | <td> |
3232ad9b | 72 | <input type="text" name="replyto" size="55" maxlength="255" value="{$smarty.request.replyto}" /> |
9898b36e | 73 | </td> |
74 | </tr> | |
0337d704 | 75 | |
76 | <tr> | |
77 | <th colspan="2">Destinataires</th> | |
78 | </tr> | |
79 | <tr valign="top"> | |
80 | <td style='padding-left: 1em' class='titre'> | |
0359898c | 81 | <em>annuaire</em> |
0337d704 | 82 | </td> |
83 | <td> | |
a44f405e SJ |
84 | <label><input type="checkbox" name="membres[X]" value="1" {if $smarty.request.membres.X}checked="checked"{/if} /> |
85 | <em>écrire à tous les X de l'annuaire du groupe</em></label><br /> | |
86 | <label><input type="checkbox" name="membres[ext]" value="1" {if $smarty.request.membres.ext}checked="checked"{/if} /> | |
87 | <em>écrire à tous les extérieurs de l'annuaire du groupe</em></label><br /> | |
88 | <label><input type="checkbox" name="membres[groupe]" value="1" {if $smarty.request.membres.groupe}checked="checked"{/if} /> | |
cd78feae | 89 | <em>écrire à toutes les personnes morales de l'annuaire du groupe</em></label> |
06db561e | 90 | <a href="{$platal->ns}annuaire" class='popup'>(voir annuaire)</a><br /> |
0337d704 | 91 | </td> |
92 | </tr> | |
93 | ||
94 | {foreach from=$listes item=l} | |
95 | <tr> | |
96 | <td style='padding-left: 1em' class='titre'> | |
0359898c | 97 | {$l.list} |
0337d704 | 98 | </td> |
99 | <td> | |
a44f405e SJ |
100 | <label><input type="checkbox" name="ml[{$l.list}]" value="1" {if $smarty.request.ml[$l.list]}checked="checked"{/if} /> |
101 | {$l.addr}</label> | |
0bc80a07 | 102 | <a href="{$platal->ns}lists/members/{$l.list}" class="popup">(voir composition)</a> |
0337d704 | 103 | </td> |
104 | </tr> | |
105 | {/foreach} | |
106 | ||
0337d704 | 107 | <tr> |
faefdbb7 | 108 | <th colspan="2">Contenu de l'email</th> |
0337d704 | 109 | </tr> |
110 | <tr> | |
111 | <td class="titre"> | |
e8439508 | 112 | Sujet : |
0337d704 | 113 | </td> |
cd78feae | 114 | <td><input type="text" name="sujet" value="{$smarty.request.sujet}" size="55" maxlength="70" /></td> |
0337d704 | 115 | </tr> |
116 | <tr> | |
5b21237d | 117 | <td colspan="2" class="smaller"> |
cd78feae | 118 | <input type="checkbox" name="wiki" value="1" checked="checked" onchange="updateWikiView(this);" id="wiki_syntaxe"/> |
a44f405e SJ |
119 | <label for="wiki_syntaxe">activer </label><a href="wiki_help" class="popup3">la syntaxe wiki</a> |
120 | <label for="wiki_syntaxe">pour le formattage du message</label> | |
5b21237d | 121 | </td> |
122 | </tr> | |
fdbeba4f | 123 | <tr id="preview" class="pair" style="display: none"> |
cd78feae | 124 | <td colspan="2"> |
fdbeba4f | 125 | <div id="mail_preview"></div> |
cd78feae | 126 | <div class="center"><input type="submit" name="send" value="Envoyer le message" /></div> |
fdbeba4f | 127 | </td> |
128 | </tr> | |
5b21237d | 129 | <tr> |
648020d2 | 130 | <td colspan="2" class="center"> |
fdbeba4f | 131 | <textarea name="body" id="mail_text" cols="72" rows="25"> |
648020d2 | 132 | {if $smarty.request.body} |
133 | {$smarty.request.body} | |
134 | {else} | |
135 | <cher> <prenom>, | |
fdbeba4f | 136 | |
34ade5a6 | 137 | Nous avons le plaisir de t'adresser la lettre mensuelle du groupe {$asso->nom}. |
0337d704 | 138 | |
6e828e47 | 139 | (insérer le texte…) |
0337d704 | 140 | |
34ade5a6 | 141 | Le bureau du groupe {$asso->nom}. |
ccf0feca | 142 | {/if}</textarea> |
0337d704 | 143 | </td> |
144 | </tr> | |
145 | <tr> | |
91a14f73 | 146 | <td class="titre"> |
9da274fa | 147 | {icon name=email_attach} Attacher un fichier |
91a14f73 | 148 | </td> |
149 | <td> | |
150 | <input type="file" name="uploaded" /> | |
151 | </td> | |
152 | </tr> | |
153 | <tr> | |
fdbeba4f | 154 | <td colspan="2" align="center"> |
155 | <input type="submit" name="preview" id="preview_bt" value="Aperçu" onclick="previewWiki('mail_text', 'mail_preview', true, 'preview'); return false;" /> | |
f42e15fc | 156 | <input type="submit" name="send" id="submit_bt" value="Envoyer le message" /> |
fdbeba4f | 157 | </td> |
0337d704 | 158 | </tr> |
159 | </table> | |
160 | </form> | |
161 | ||
448c8cdc | 162 | {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *} |