Add form (no backend yet) for registering new players.
[ccbs] / html / templates / registration.tmpl
1 [%# vim:set filetype=html: %]
2 <h2>PĆ„melding</h2>
3
4 <div>
5 <form method="post" action="do-registration.pl">
6   <table>
7     <tr>
8       <th>Spiller</th>
9       <td>
10         <select name="player">
11 [% FOR a = available %]
12           <option value="[% a.player %]">[% a.nick %]</option>
13 [% END %]
14         </select>
15       </td>
16     </tr>
17     <tr>
18       <th>Betalt</th>
19       <td>
20         <select name="paid">
21           <option value="f">Nei</option>
22           <option value="t">Ja</option>
23         </select>
24       </td>
25     </tr>
26     <tr>
27       <th colspan="2">
28         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
29         <input type="submit" value="Legg til" />
30       </th>
31     </tr>
32   </table>
33 </form>
34 </div>
35
36 <h2>Registrering av ny spiller</h2>
37
38 <div>
39 <form method="post" action="do-add-player.pl">
40   <table>
41     <tr>
42       <th>Nick</th>
43       <td><input name="nick" /></td>
44     </tr>
45     <tr>
46       <th colspan="2">
47         <input type="submit" value="Legg til" />
48       </th>
49     </tr>
50   </table>
51 </form>
52 </div>
53
54 <h2>PĆ„meldte</h2>
55
56 <div>
57   <table>
58 [% FOR r = registered %]
59     <tr>
60       <td>[% r.nick %]</td>
61 [% IF r.paid %]
62       <td>betalt</td>
63 [% ELSE %]
64       <td class="notpaid">ikke betalt</td>
65 [% END %]
66       <td>
67         <form method="post" action="do-set-paid.pl">
68           <p class="button">
69             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
70             <input type="hidden" name="player" value="[% r.player %]" />
71 [% IF r.paid %]
72             <input type="hidden" name="paid" value="f" />
73             <input type="submit" value="Sett som ikke betalt" />
74 [% ELSE %]
75             <input type="hidden" name="paid" value="t" />
76             <input type="submit" value="Sett som betalt" />
77 [% END %]
78           </p>
79         </form>
80       </td>
81       <td>
82         <form method="post" action="do-unregister.pl">
83           <p class="button">
84             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
85             <input type="hidden" name="player" value="[% r.player %]" />
86             <input type="submit" value="Fjern" />
87           </p>
88         </form>
89       </td>
90     </tr>
91 [% END %]
92   </table>
93 </div>
94