Add name= to the submit buttons, and some information fixes.
authorSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 13:58:19 +0000 (13:58 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 13:58:19 +0000 (13:58 +0000)
html/show-tournament.pl
html/templates/show-tournament.tmpl

index 8e7c9e9..fa95fb4 100755 (executable)
@@ -50,7 +50,7 @@ for my $score (@$scores) {
        my $pl = $p->[$#$p]->{'players'};
        if ($score->{'nick'} ne $player) {
                $player = $score->{'nick'};
-               push @$pl, { nick => $player, songs => [], total => 0, locked => 1 };
+               push @$pl, { player => $score->{'player'}, nick => $player, songs => [], total => 0, locked => 1 };
        }
        
        push @{$pl->[$#$pl]->{'songs'}}, $score;
index 49f9b6d..4c02f78 100644 (file)
       </td>
           [% IF s.chosen %]
       <td>
-        <select name="song[% s.player %]-[% s.songnumber %]">
+        <select name="song[% pl.player %]-[% s.songnumber %]">
           <option value=""> </option>
             [% FOR ss = songs %]
               [% IF s.song == ss.song %]
         [% IF p.num_songs > 1 %]
      <td>[% pl.total %]</td>
         [% END %]
-     <td><input type="submit" value="Oppdater" /></td>
+     <td><input type="submit" name="update[% pl.player %]" value="Oppdater" /></td>
     </tr>
       [% END %]
     [% END %]