]> git.sesse.net Git - ccbs/blob - html/templates/registration.tmpl
Registration now supports countries and clubs.
[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>Land</th>
51       <td>
52         <select name="country">
53 [% FOR c = countries %]
54 [% IF c.countrycode == "NOR" %]
55           <option value="[% c.country %]" selected="selected">[% c.countrycode %] - [% c.countryname %]</option>
56 [% ELSE %]
57           <option value="[% c.country %]">[% c.countrycode %] - [% c.countryname %]</option>
58 [% END %]         
59 [% END %]         
60         </select>
61       </td>
62     </tr>
63     <tr>
64       <th>Klubb</th>
65       <td>
66         <select name="club">
67           <option value="-1" selected="selected"></option>
68 [% FOR c = clubs %]
69           <option value="[% c.club %]">[% c.clubcode %] - [% c.clubname %]</option>
70 [% END %]         
71         </select>
72       </td>
73     </tr>
74     <tr>
75       <th colspan="2">
76         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
77         <input type="submit" value="Legg til" />
78       </th>
79     </tr>
80   </table>
81 </form>
82 </div>
83
84 <h2>PĆ„meldte</h2>
85
86 <div>
87   <table>
88 [% FOR r = registered %]
89     <tr>
90       <td>[% r.nick %]</td>
91 [% IF r.paid %]
92       <td>betalt</td>
93 [% ELSE %]
94       <td class="notpaid">ikke betalt</td>
95 [% END %]
96       <td>
97         <form method="post" action="do-set-paid.pl">
98           <p class="button">
99             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
100             <input type="hidden" name="player" value="[% r.player %]" />
101 [% IF r.paid %]
102             <input type="hidden" name="paid" value="f" />
103             <input type="submit" value="Sett som ikke betalt" />
104 [% ELSE %]
105             <input type="hidden" name="paid" value="t" />
106             <input type="submit" value="Sett som betalt" />
107 [% END %]
108           </p>
109         </form>
110       </td>
111       <td>
112         <form method="post" action="do-unregister.pl">
113           <p class="button">
114             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
115             <input type="hidden" name="player" value="[% r.player %]" />
116             <input type="submit" value="Fjern" />
117           </p>
118         </form>
119       </td>
120     </tr>
121 [% END %]
122   </table>
123 </div>
124