1 {**************************************************************************}
3 {* Copyright (C) 2003-2011 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
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. *}
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. *}
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 *}
21 {**************************************************************************}
23 {if $smarty.request.texte}
24 {assign var=texte value=$smarty.request.texte|smarty:nodefaults}
26 {if $smarty.request.titre}
27 {assign var=titre value=$smarty.request.titre|smarty:nodefaults}
29 {if $smarty.request.promo_min}
30 {assign var=promo_min value=$smarty.request.promo_min|smarty:nodefaults}
32 {if $smarty.request.promo_max}
33 {assign var=promo_max value=$smarty.request.promo_max|smarty:nodefaults}
35 {if $smarty.request.expiration}
36 {assign var=expiration value=$smarty.request.expiration|smarty:nodefaults}
38 {if $smarty.request.important}
39 {assign var=important value=$smarty.request.important|smarty:nodefaults}
42 <script type="text/javascript">//<![CDATA[
44 function updatePreview()
46 if (document.getElementById('image').value != '' || document.getElementById('image_url').value != '') {
49 var titre = document.getElementById('titre').value;
50 var texte = document.getElementById('texte').value;
52 if (titre == '' || texte == '') {
53 document.getElementById('valid').style.display = 'none';
54 document.getElementById('info').style.display = '';
56 document.getElementById('valid').style.display = '';
57 document.getElementById('info').style.display = 'none';
59 var page = 'events/preview?titre=' + encodeURIComponent(titre) + '&texte=' + encodeURIComponent(texte);
60 $('#preview').updateHtml(page);
67 {include file="events/preview.tpl"}
71 <form action="{$platal->path}" method="post" enctype="multipart/form-data">
75 <th colspan="2">Contenu de l'annonce</th>
78 <td class="titre">Titre</td>
80 <input type="text" name="titre" id="titre" size="50" maxlength="200" value="{$titre}" />
84 <td class="titre">Texte</td>
86 <textarea name="texte" id="texte" rows="10" cols="60" onfocus="update_texte_count(this.form)">{$texte}</textarea>
92 <a href="wiki_help/notitle" class="popup3">
93 {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour le texte de l'annonce
98 <td colspan="2" class="smaller">
99 <script type="text/javascript">//<![CDATA[
100 var form_propose_texte = false;
102 function update_texte_count(f) {
103 if (!form_propose_texte && f) form_propose_texte = f;
104 form_propose_texte.texte_count.value=form_propose_texte.texte.value.length;
105 setTimeout("update_texte_count(0)", 100);
109 Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 800 caractères soit une douzaine de ligne. Tu en es déjà à <input type='text' name='texte_count' size="4" /> caractères.
110 <script type="text/javascript">update_texte_count(document.getElementById('texte').form);</script>
114 <td class="titre">Illustration</td>
117 <div style="float: left; text-align: center">
118 <em>Image actuelle</em><br />
119 <img src="events/photo/{$eid}?{$smarty.now}" alt="Image actuelle" /><br />
120 <input type="submit" name="action" value="Pas d'image" />
123 {if $upload && $upload->exists()}
124 <div style="float: right; text-align: center">
125 <em>Nouvelle image</em><br />
126 <img src="events/photo?{$smarty.now}" alt="Nouvelle Image" /><br />
127 <input type="submit" name="action" value="Supprimer l'image" />
130 <div style="clear: both">
131 Choisir un fichier : <input type="file" name="image" id="image" /><br />
132 Indiquer une adresse : <input type="text" name="image_url" id="image_url" value="" />
139 <input type="submit" name="preview" value="Aperçu" onclick="return updatePreview();" />
141 <p id="info" {if trim($texte) && trim($titre)}style="display: none"{/if}>
142 Le bouton de confirmation n'apparaît que si l'aperçu est concluant.
145 N'oublie pas de remplir les informations suivantes :
148 <table class="bicol">
150 <th colspan="2">Informations complémentaires</th>
154 Tu peux limiter la visibilité de ton annonce aux camarades de certaines promotions :
157 {include file="include/field.promo.tpl"}
160 Choisis la date d'expiration de ton annonce :
165 Dernier jour d'affichage
168 {valid_date name="expiration" value=$expiration to=60}
177 <label><input type="checkbox" name="important" {if $important}checked="checked"{/if}/>
178 Marquer cette annonce comme très importante</label>
184 <div class="center" {if !trim($texte) || !trim($titre)}style="display: none"{/if} id="valid">
185 <input type="hidden" name="evt_id" value="{$smarty.post.evt_id}" />
186 <input type="submit" name="action" value="Proposer" />
191 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}