Merge branch 'xorg/maint'
[platal.git] / templates / payment / payment.tpl
CommitLineData
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
91ebb7ff 23{if $smarty.request.op eq "submit" and !$pl_errors}
0337d704 24
19ec6c8a 25<h1>Télépaiements</h1>
75d4576e 26
0337d704 27<table class="bicol">
28 <tr>
29 <th colspan="2">Paiement via {$meth->text}</th>
30 </tr>
40cab3b7
SJ
31{if t($public)}
32 <tr>
33 <td><b>Nom</b></td>
34 <td>{$full_name}</td>
35 </tr>
36{/if}
0337d704 37 <tr>
38 <td><b>Transaction</b></td>
39 <td>{$pay->text}</td>
40 </tr>
41 <tr>
98a7e9dc 42 <td><b>Montant</b></td>
75d4576e 43 <td>{$amount} &euro;</td>
0337d704 44 </tr>
bff6d838 45{if $comment}
46 <tr>
d6c91d50 47 <td><b>Commentaire</b></td>
bff6d838 48 <td>{$comment}</td>
49 </tr>
50{/if}
5dcca1b1
AL
51{if $meth->id == 1}
52 <tr>
53 <td><span class="erreur">Remarque pour les utilisateurs de Paypal</span></td>
7e0a2959 54 <td><span class="erreur">Merci de cliquer sur "revenir au site marchand" à la fin de la transaction, sinon celle-ci n'apparaitra pas sur polytechnique.net.</span></td>
5dcca1b1
AL
55 </tr>
56{/if}
0337d704 57 <tr>
58 <td>&nbsp;</td>
59 <td>
60 <form method="post" action="{$pay->api->urlform}">
61 <div>
62 <!-- infos commercant -->
63 {foreach from=$pay->api->infos.commercant key="name" item="value"}
8a7fab54 64 <input type="hidden" name="{$name}" value="{$value}" />
0337d704 65 {/foreach}
8a7fab54 66 <!-- infos client -->
0337d704 67 {foreach from=$pay->api->infos.client key="name" item="value"}
8a7fab54 68 <input type="hidden" name="{$name}" value="{$value}" />
0337d704 69 {/foreach}
8a7fab54 70 <!-- infos commande -->
0337d704 71 {foreach from=$pay->api->infos.commande key="name" item="value"}
8a7fab54 72 <input type="hidden" name="{$name}" value="{$value}" />
0337d704 73 {/foreach}
8a7fab54 74
75 <!-- infos divers -->
0337d704 76 {foreach from=$pay->api->infos.divers key="name" item="value"}
8a7fab54 77 <input type="hidden" name="{$name}" value="{$value}" />
0337d704 78 {/foreach}
8a7fab54 79 <input type="submit" value="Valider" />
0337d704 80 </div>
81 </form>
82 </td>
83 </tr>
84</table>
85<p>
d6c91d50 86En cliquant sur "Valider", tu seras redirigé{if $sex}e{/if} vers le site de {$pay->api->nomsite}, où il te
75d4576e 87sera demandé de saisir ton numéro de carte bancaire. Lorsque le paiement aura été effectué, tu
0337d704 88recevras une confirmation par email.
89</p>
90{if $pay->api->text}
91<p>
92{$pay->api->text}
93</p>
94{/if}
19ec6c8a
SJ
95{if $evtlink}
96<p class="erreur">
97Si tu n'es pas encore inscrit à cet événement, n'oublie pas d'aller t'<a href='http://www.polytechnique.net/{$evtlink.diminutif}/events/sub/{$evtlink.eid}'>inscrire</a>.
98</p>
99{/if}
0337d704 100
101{else}
102
19ec6c8a 103{if t($donation)}
75d4576e 104{include wiki=Docs.Dons}
19ec6c8a 105{/if}
a2558f2b 106
6d85e513 107<form method="post" action="{$platal->pl_self()}">
0337d704 108 <table class="bicol">
109 <tr>
19ec6c8a
SJ
110 <th colspan="2">Effectuer un télépaiement</th>
111 </tr>
112 <tr>
113 <td>Transaction</td>
114 <td>
115 <strong>{$pay->text}</strong><input type="hidden" name="ref" value="{$pay->id}" />
116 {if $pay->url}
117 <br />
118 <a href="{$pay->url}">plus d'informations</a>
119 {/if}
120 </td>
0337d704 121 </tr>
122 <tr>
a7de4ef7 123 <td>Méthode</td>
0337d704 124 <td>
125 <select name="methode">
69fffc4b 126 {select_db_table table="payment_methods" valeur=$smarty.request.methode}
0337d704 127 </select>
128 </td>
129 </tr>
130 <tr>
98a7e9dc 131 <td>Montant</td>
6643b3f0 132 <td><input type="text" name="amount" size="13" class="right" value="{$pay->amount_def}" /> &euro;</td>
0337d704 133 </tr>
6643b3f0
SJ
134 {if t($public)}
135 <tr>
136 <td>Identifiant <small>(prenom.nom.promo)</small></td>
137 <td><input type="text" name="login" size="30" /></td>
138 </tr>
139 {/if}
0337d704 140 <tr>
bff6d838 141 <td>Commentaire</td>
142 <td><textarea name="comment" rows="5" cols="30"></textarea></td>
143 </tr>
19ec6c8a 144 {if t($donation)}
fbb196fa 145 <tr>
75d4576e 146 <td>Afficher ton nom dans la liste des donateurs</td>
fbb196fa
SJ
147 <td>
148 <label>Oui<input type="radio" name="display" value="1" checked="checked" /></label>
149 &nbsp;-&nbsp;
150 <label><input type="radio" name="display" value="0" />Non</label>
151 </td>
152 </tr>
19ec6c8a 153 {/if}
bff6d838 154 <tr>
0337d704 155 <td>&nbsp;</td>
156 <td>
157 <input type="hidden" name="op" value="submit" />
158 <input type="submit" value="Continuer" />
159 </td>
160 </tr>
161 </table>
162</form>
163
73bb5fe7 164{if t($transactions)}
19ec6c8a 165<p class="descr">Tu as déjà effectué des paiements pour cette transaction&nbsp;:</p>
0337d704 166<table class="bicol">
167<tr><th>Date</th><th>Montant</th></tr>
168{iterate from=$transactions item=t}
169 <tr class="{cycle values="pair,impair"}">
a7c0d514
DB
170 <td>{$t.ts_confirmed|date_format}</td>
171 <td>{$t.amount|replace:'.':','} &euro;</td>
0337d704 172 </tr>
173{/iterate}
174</table>
175{/if}
176
19ec6c8a 177{if t($donation)}
75d4576e 178<p class="descr">Les 10 plus gros dons sont les suivants&nbsp;:</p>
069dfa8e
SJ
179<table class="bicol">
180 <tr>
181 <th>Nom</th>
182 <th>Montant</th>
75d4576e 183 <th>Date</th>
069dfa8e 184 </tr>
75d4576e 185 {foreach from=$biggest_donations item=d}
069dfa8e
SJ
186 <tr class="{cycle values="pair,impair"}">
187 <td>{$d.name}</td>
a7c0d514 188 <td class="center">{$d.amount|replace:'.':','} &euro;</td>
75d4576e 189 <td>{$d.ts_confirmed|date_format}</td>
069dfa8e
SJ
190 </tr>
191 {/foreach}
192</table>
069dfa8e 193
75d4576e
SJ
194<p class="descr">Les dons par période&nbsp;:</p>
195<table class="tinybicol">
196 <tr>
197 <th>Période</th>
198 <th>Montant</th>
199 </tr>
200 {foreach from=$donations item=d}
201 <tr class="{cycle values="pair,impair"}">
202 <td>{if $d.month neq 0}{$d.ts_confirmed|date_format:"%B %Y"}{else}{$d.ts_confirmed|date_format:"%Y"}{/if}</td>
203 <td style="text-align: right">{$d.amount|replace:'.':','} &euro;</td>
204 </tr>
205 {/foreach}
206</table>
19ec6c8a 207{/if}
0337d704 208
75d4576e 209{/if}
0337d704 210
448c8cdc 211{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}