Automatically zoom to the new player when adding a new one.
[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 [% IF a.player == selected_player %]
13            <option value="[% a.player %]" selected="selected">[% a.nick %]</option>
14 [% ELSE %]
15            <option value="[% a.player %]">[% a.nick %]</option>
16 [% END %]
17 [% END %]
18         </select>
19       </td>
20     </tr>
21     <tr>
22       <th>Betalt</th>
23       <td>
24         <select name="paid">
25           <option value="f">Nei</option>
26           <option value="t">Ja</option>
27         </select>
28       </td>
29     </tr>
30     <tr>
31       <th colspan="2">
32         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
33         <input type="submit" value="Legg til" />
34       </th>
35     </tr>
36   </table>
37 </form>
38 </div>
39
40 <h2>Registrering av ny spiller</h2>
41
42 <div>
43 <form method="post" action="do-add-player.pl">
44   <table>
45     <tr>
46       <th>Nick</th>
47       <td><input name="nick" /></td>
48     </tr>
49     <tr>
50       <th colspan="2">
51         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
52         <input type="submit" value="Legg til" />
53       </th>
54     </tr>
55   </table>
56 </form>
57 </div>
58
59 <h2>PĆ„meldte</h2>
60
61 <div>
62   <table>
63 [% FOR r = registered %]
64     <tr>
65       <td>[% r.nick %]</td>
66 [% IF r.paid %]
67       <td>betalt</td>
68 [% ELSE %]
69       <td class="notpaid">ikke betalt</td>
70 [% END %]
71       <td>
72         <form method="post" action="do-set-paid.pl">
73           <p class="button">
74             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
75             <input type="hidden" name="player" value="[% r.player %]" />
76 [% IF r.paid %]
77             <input type="hidden" name="paid" value="f" />
78             <input type="submit" value="Sett som ikke betalt" />
79 [% ELSE %]
80             <input type="hidden" name="paid" value="t" />
81             <input type="submit" value="Sett som betalt" />
82 [% END %]
83           </p>
84         </form>
85       </td>
86       <td>
87         <form method="post" action="do-unregister.pl">
88           <p class="button">
89             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
90             <input type="hidden" name="player" value="[% r.player %]" />
91             <input type="submit" value="Fjern" />
92           </p>
93         </form>
94       </td>
95     </tr>
96 [% END %]
97   </table>
98 </div>
99