<div>
-[% FOR p = r.parallels %]
+ [% FOR p = r.parallels %]
+ <form method="post" action="do-edit-scores.pl">
<table class="scores">
<tr>
-[% IF p.parallel == 0 %]
- <th></th>
-[% ELSE %]
+ [% IF p.parallel == 0 %]
+ <th>
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="hidden" name="round" value="[% r.round %]" />
+ </th>
+ [% ELSE %]
<th>Gruppe [% p.parallel %]</th>
-[% END %]
-[% FOR s = p.songs %]
-[% IF s == '' %]
+ [% END %]
+ [% FOR s = p.songs %]
+ [% IF s == '' %]
<th colspan="2">Selvvalgt</th>
-[% ELSE %]
+ [% ELSE %]
<th>[% s %]</th>
-[% END %]
-[% END %]
-[% IF p.num_songs > 1 %]
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
<th>Total</th>
-[% END %]
+ [% END %]
<th></th>
</tr>
-[% FOR pl = p.players %]
-[% IF pl.locked %]
+ [% FOR pl = p.players %]
+ [% IF pl.locked %]
<tr>
- <th>[% pl.nick %]</th>
-[% FOR s = pl.songs %]
+ <th>
+ [% pl.nick %]
+ </th>
+ [% FOR s = pl.songs %]
<td>[% s.score %]</td>
-[% IF s.chosen %]
+ [% IF s.chosen %]
<td>[% s.title %]</td>
-[% END %]
-[% END %]
-[% IF p.num_songs > 1 %]
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
<td>[% pl.total %]</td>
-[% END %]
+ [% END %]
</tr>
-[% ELSE %]
+ [% ELSE %]
<tr>
<th>[% pl.nick %]</th>
-[% FOR s = pl.songs %]
- <td><input name="score[% s.songnumber %]" value="[% s.score %]" size="5" /></td>
-[% IF s.chosen %]
+ [% FOR s = pl.songs %]
+ <td class="nowrap">
+ <input name="score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" size="5" />
+ <select name="playmode[% pl.player %]-[% s.songnumber %]">
+ <option value=""> </option>
+ [% IF s.playmode == 'single' %]
+ <option value="single" selected="selected">S</option>
+ [% ELSE %]
+ <option value="single">S</option>
+ [% END %]
+ [% IF s.playmode == 'double' %]
+ <option value="double" selected="selected">D</option>
+ [% ELSE %]
+ <option value="double">D</option>
+ [% END %]
+ </select>
+ <select name="difficulty[% pl.player %]-[% s.songnumber %]">
+ <option value=""> </option>
+ [% IF s.difficulty == 'beginner' %]
+ <option value="beginner" selected="selected">B</option>
+ [% ELSE %]
+ <option value="beginner">B</option>
+ [% END %]
+ [% IF s.difficulty == 'standard' %]
+ <option value="standard" selected="selected">S</option>
+ [% ELSE %]
+ <option value="standard">S</option>
+ [% END %]
+ [% IF s.difficulty == 'difficult' %]
+ <option value="difficult" selected="selected">D</option>
+ [% ELSE %]
+ <option value="difficult">D</option>
+ [% END %]
+ [% IF s.difficulty == 'expert' %]
+ <option value="expert" selected="selected">E</option>
+ [% ELSE %]
+ <option value="expert">E</option>
+ [% END %]
+ [% IF s.difficulty == 'challenge' %]
+ <option value="challenge" selected="selected">C</option>
+ [% ELSE %]
+ <option value="challenge">C</option>
+ [% END %]
+ </select>
+ </td>
+ [% IF s.chosen %]
<td>
- <select name="song[% s.songnumber %]">
+ <select name="song[% pl.player %]-[% s.songnumber %]">
<option value=""> </option>
-[% FOR ss = songs %]
-[% IF s.song == ss.song %]
+ [% FOR ss = songs %]
+ [% IF s.song == ss.song %]
<option value="[% ss.song %]" selected="selected">[% ss.title %]</option>
-[% ELSE %]
+ [% ELSE %]
<option value="[% ss.song %]">[% ss.title %]</option>
-[% END %]
-[% END %]
+ [% END %]
+ [% END %]
</select>
</td>
-[% END %]
-[% END %]
-[% IF p.num_songs > 1 %]
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
<td>[% pl.total %]</td>
-[% END %]
- <td><input type="submit" value="Oppdater" /></td>
+ [% END %]
+ <td><input type="submit" name="update[% pl.player %]" value="Oppdater" /></td>
</tr>
-
-[% END %]
-[% END %]
+ [% END %]
+ [% END %]
</table>
-[% END %]
+ </form>
+ [% END %]
</div>
[% END %]