Autocomplete enterprise name in profile edition. (Closes #836)
[platal.git] / templates / xnetgrp / mail.tpl
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
23
24 <h1>{$asso.nom}&nbsp;: Envoyer un mail</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 updateWikiView(box) {
35     if (!box.checked) {
36       document.getElementById("preview_bt").style.display = "none";
37       document.getElementById("preview").style.display = "none";
38     } else {
39       document.getElementById("preview_bt").style.display = "";
40     }
41   }
42   {/literal}
43 //]]></script>
44  
45 <form action="{$platal->ns}mail" method="post" enctype="multipart/form-data">
46   <table class='bicol'>
47     <tr>
48       <th colspan="2">Écrire un mail&nbsp;:</th>
49     </tr>
50     <tr>
51       <td class="titre">Expéditeur&nbsp;:</td>
52       <td>
53         <input type="text" name="from" size="55" maxlength="70"
54           value="{if $smarty.request.from}{$smarty.request.from}{else}&quot;{$smarty.session.prenom} {$smarty.session.nom}&quot; <{$smarty.session.bestalias}@polytechnique.org>{/if}" />
55       </td>
56     </tr>
57     <tr>
58       <td class="titre">Répondre à&nbsp;:</td>
59       <td>
60         <input type="text" name="replyto" size="55" maxlength="70" value="{$smarty.request.replyto}" />
61       </td>
62     </tr>
63
64     <tr>
65       <th colspan="2">Destinataires</th>
66     </tr>
67     <tr valign="top">
68       <td style='padding-left: 1em' class='titre'>
69         <em>annuaire</em>
70       </td>
71       <td>
72         <input type="checkbox" name="membres[X]" value="1"  {if $smarty.request.membres.X}checked="checked"{/if} />
73         <em>écrire à tous les X de l'annuaire du groupe</em><br />
74         <input type="checkbox" name="membres[ext]" value="1"  {if $smarty.request.membres.ext}checked="checked"{/if} />
75         <em>écrire à tous les extérieurs de l'annuaire du groupe</em><br />
76         <input type="checkbox" name="membres[groupe]" value="1"  {if $smarty.request.membres.groupe}checked="checked"{/if} />
77         <em>écrire à toutes les personnes morales de l'annuaire du groupe</em>
78         <a href="{$platal->ns}annuaire" class='popup'>(voir annuaire)</a><br />
79       </td>
80     </tr>
81
82     {foreach from=$listes item=l}
83     <tr>
84       <td style='padding-left: 1em' class='titre'>
85         {$l.list}
86       </td>
87       <td>
88         <input type="checkbox" name="ml[{$l.list}]" value="1" {if $smarty.request.ml[$l.list]}checked="checked"{/if} />
89         {$l.addr}
90         <a href="{$platal->ns}lists/admin/{$l.list}" class="popup">(voir composition)</a>
91       </td>
92     </tr>
93     {/foreach}
94
95     <tr>
96       <th colspan="2">Contenu du mail</th>
97     </tr>
98     <tr>
99       <td class="titre">
100         Sujet&nbsp;:
101       </td>
102       <td><input type="text" name="sujet" value="{$smarty.request.sujet|default:"remplir le sujet ..."}" size=55 maxlength=70></td>
103     </tr>
104     <tr>
105       <td colspan="2" class="smaller">
106         <input type="checkbox" name="wiki" value="1" checked="1" onchange="updateWikiView(this);" />
107         activer <a href="wiki_help" class="popup3">la syntaxe wiki</a> pour le formattage du message
108       </td>
109     </tr>
110     <tr id="preview" class="pair" style="display: none">
111       <td colspan="2" id="mail_preview">
112         <div id="mail_preview"></div>
113         <div class="center"><input type="submit" name="send" value="Envoyer le message"></div>
114       </td>
115     </tr>
116     <tr>
117       <td colspan="2" class="center">
118         <textarea name="body" id="mail_text" cols="72" rows="25">
119 {if $smarty.request.body}
120 {$smarty.request.body}
121 {else}
122 &lt;cher&gt; &lt;prenom&gt;,
123
124 Nous avons le plaisir de t'adresser la lettre mensuelle du groupe {$asso.nom}.
125
126 (insérer le texte...)
127
128 Le bureau du groupe {$asso.nom}.
129 {/if}
130          </textarea>
131       </td>
132     </tr>
133     <tr>
134       <td class="titre">
135         {icon name=email_attach} Attacher un fichier
136       </td>
137       <td>
138         <input type="file" name="uploaded" />
139       </td>
140     </tr>
141     <tr>
142       <td colspan="2" align="center">
143         <input type="submit" name="preview" id="preview_bt" value="Aperçu" onclick="previewWiki('mail_text', 'mail_preview', true, 'preview'); return false;" />
144         <input type="submit" name="send" value="Envoyer le message" />
145       </td>
146     </tr>
147   </table>
148 </form>
149
150 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}