Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
5e1513f6 | 3 | {* Copyright (C) 2003-2011 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} €</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} | |
0337d704 | 51 | <tr> |
52 | <td> </td> | |
53 | <td> | |
54 | <form method="post" action="{$pay->api->urlform}"> | |
55 | <div> | |
56 | <!-- infos commercant --> | |
57 | {foreach from=$pay->api->infos.commercant key="name" item="value"} | |
8a7fab54 | 58 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 59 | {/foreach} |
8a7fab54 | 60 | <!-- infos client --> |
0337d704 | 61 | {foreach from=$pay->api->infos.client key="name" item="value"} |
8a7fab54 | 62 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 63 | {/foreach} |
8a7fab54 | 64 | <!-- infos commande --> |
0337d704 | 65 | {foreach from=$pay->api->infos.commande key="name" item="value"} |
8a7fab54 | 66 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 67 | {/foreach} |
8a7fab54 | 68 | |
69 | <!-- infos divers --> | |
0337d704 | 70 | {foreach from=$pay->api->infos.divers key="name" item="value"} |
8a7fab54 | 71 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 72 | {/foreach} |
8a7fab54 | 73 | <input type="submit" value="Valider" /> |
0337d704 | 74 | </div> |
75 | </form> | |
76 | </td> | |
77 | </tr> | |
78 | </table> | |
79 | <p> | |
d6c91d50 | 80 | En cliquant sur "Valider", tu seras redirigé{if $sex}e{/if} vers le site de {$pay->api->nomsite}, où il te |
75d4576e | 81 | sera demandé de saisir ton numéro de carte bancaire. Lorsque le paiement aura été effectué, tu |
0337d704 | 82 | recevras une confirmation par email. |
83 | </p> | |
84 | {if $pay->api->text} | |
85 | <p> | |
86 | {$pay->api->text} | |
87 | </p> | |
88 | {/if} | |
19ec6c8a SJ |
89 | {if $evtlink} |
90 | <p class="erreur"> | |
91 | Si 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>. | |
92 | </p> | |
93 | {/if} | |
0337d704 | 94 | |
95 | {else} | |
96 | ||
19ec6c8a | 97 | {if t($donation)} |
75d4576e | 98 | {include wiki=Docs.Dons} |
19ec6c8a | 99 | {/if} |
a2558f2b | 100 | |
6d85e513 | 101 | <form method="post" action="{$platal->pl_self()}"> |
0337d704 | 102 | <table class="bicol"> |
103 | <tr> | |
19ec6c8a SJ |
104 | <th colspan="2">Effectuer un télépaiement</th> |
105 | </tr> | |
106 | <tr> | |
107 | <td>Transaction</td> | |
108 | <td> | |
109 | <strong>{$pay->text}</strong><input type="hidden" name="ref" value="{$pay->id}" /> | |
110 | {if $pay->url} | |
111 | <br /> | |
112 | <a href="{$pay->url}">plus d'informations</a> | |
113 | {/if} | |
114 | </td> | |
0337d704 | 115 | </tr> |
116 | <tr> | |
a7de4ef7 | 117 | <td>Méthode</td> |
0337d704 | 118 | <td> |
119 | <select name="methode"> | |
69fffc4b | 120 | {select_db_table table="payment_methods" valeur=$smarty.request.methode} |
0337d704 | 121 | </select> |
122 | </td> | |
123 | </tr> | |
124 | <tr> | |
98a7e9dc | 125 | <td>Montant</td> |
6643b3f0 | 126 | <td><input type="text" name="amount" size="13" class="right" value="{$pay->amount_def}" /> €</td> |
0337d704 | 127 | </tr> |
6643b3f0 SJ |
128 | {if t($public)} |
129 | <tr> | |
130 | <td>Identifiant <small>(prenom.nom.promo)</small></td> | |
131 | <td><input type="text" name="login" size="30" /></td> | |
132 | </tr> | |
133 | {/if} | |
0337d704 | 134 | <tr> |
bff6d838 | 135 | <td>Commentaire</td> |
136 | <td><textarea name="comment" rows="5" cols="30"></textarea></td> | |
137 | </tr> | |
19ec6c8a | 138 | {if t($donation)} |
fbb196fa | 139 | <tr> |
75d4576e | 140 | <td>Afficher ton nom dans la liste des donateurs</td> |
fbb196fa SJ |
141 | <td> |
142 | <label>Oui<input type="radio" name="display" value="1" checked="checked" /></label> | |
143 | - | |
144 | <label><input type="radio" name="display" value="0" />Non</label> | |
145 | </td> | |
146 | </tr> | |
19ec6c8a | 147 | {/if} |
bff6d838 | 148 | <tr> |
0337d704 | 149 | <td> </td> |
150 | <td> | |
151 | <input type="hidden" name="op" value="submit" /> | |
152 | <input type="submit" value="Continuer" /> | |
153 | </td> | |
154 | </tr> | |
155 | </table> | |
156 | </form> | |
157 | ||
73bb5fe7 | 158 | {if t($transactions)} |
19ec6c8a | 159 | <p class="descr">Tu as déjà effectué des paiements pour cette transaction :</p> |
0337d704 | 160 | <table class="bicol"> |
161 | <tr><th>Date</th><th>Montant</th></tr> | |
162 | {iterate from=$transactions item=t} | |
163 | <tr class="{cycle values="pair,impair"}"> | |
a7c0d514 DB |
164 | <td>{$t.ts_confirmed|date_format}</td> |
165 | <td>{$t.amount|replace:'.':','} €</td> | |
0337d704 | 166 | </tr> |
167 | {/iterate} | |
168 | </table> | |
169 | {/if} | |
170 | ||
19ec6c8a | 171 | {if t($donation)} |
75d4576e | 172 | <p class="descr">Les 10 plus gros dons sont les suivants :</p> |
069dfa8e SJ |
173 | <table class="bicol"> |
174 | <tr> | |
175 | <th>Nom</th> | |
176 | <th>Montant</th> | |
75d4576e | 177 | <th>Date</th> |
069dfa8e | 178 | </tr> |
75d4576e | 179 | {foreach from=$biggest_donations item=d} |
069dfa8e SJ |
180 | <tr class="{cycle values="pair,impair"}"> |
181 | <td>{$d.name}</td> | |
a7c0d514 | 182 | <td class="center">{$d.amount|replace:'.':','} €</td> |
75d4576e | 183 | <td>{$d.ts_confirmed|date_format}</td> |
069dfa8e SJ |
184 | </tr> |
185 | {/foreach} | |
186 | </table> | |
069dfa8e | 187 | |
75d4576e SJ |
188 | <p class="descr">Les dons par période :</p> |
189 | <table class="tinybicol"> | |
190 | <tr> | |
191 | <th>Période</th> | |
192 | <th>Montant</th> | |
193 | </tr> | |
194 | {foreach from=$donations item=d} | |
195 | <tr class="{cycle values="pair,impair"}"> | |
196 | <td>{if $d.month neq 0}{$d.ts_confirmed|date_format:"%B %Y"}{else}{$d.ts_confirmed|date_format:"%Y"}{/if}</td> | |
197 | <td style="text-align: right">{$d.amount|replace:'.':','} €</td> | |
198 | </tr> | |
199 | {/foreach} | |
200 | </table> | |
19ec6c8a | 201 | {/if} |
0337d704 | 202 | |
75d4576e | 203 | {/if} |
0337d704 | 204 | |
a7de4ef7 | 205 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |