]> git.sesse.net Git - ccbs/blobdiff - html/templates/registration.tmpl
Fixed so the form shows the current active tournament.
[ccbs] / html / templates / registration.tmpl
index bd0b4b53361474e220b799832d8d6afc1e4daaed..a51778fd15c81c8caaf9685038f29d58fce71975 100644 (file)
@@ -3,14 +3,17 @@
 
 <div>
 <form method="post" action="do-registration.pl">
-  <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
   <table>
     <tr>
       <th>Spiller</th>
       <td>
         <select name="player">
 [% FOR a = available %]
-          <option value="[% a.player %]">[% a.nick %]</option>
+[% IF a.player == selected_player %]
+           <option value="[% a.player %]" selected="selected">[% a.nick %]</option>
+[% ELSE %]
+           <option value="[% a.player %]">[% a.nick %]</option>
+[% END %]
 [% END %]
         </select>
       </td>
     </tr>
     <tr>
       <th colspan="2">
+        <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+        <input type="submit" value="Legg til" />
+      </th>
+    </tr>
+  </table>
+</form>
+</div>
+
+<h2>Registrering av ny spiller</h2>
+
+<div>
+<form method="post" action="do-add-player.pl">
+  <table>
+    <tr>
+      <th>Nick</th>
+      <td><input name="nick" /></td>
+    </tr>
+    <tr>
+      <th colspan="2">
+        <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
         <input type="submit" value="Legg til" />
       </th>
     </tr>
 <h2>PĆ„meldte</h2>
 
 <div>
-  <ul>
+  <table>
 [% FOR r = registered %]
-    <li>
-      [% r.nick %] - 
+    <tr>
+      <td>[% r.nick %]</td>
 [% IF r.paid %]
-      betalt
+      <td>betalt</td>
 [% ELSE %]
-      <span class="notpaid">ikke betalt</span>
+      <td class="notpaid">ikke betalt</td>
 [% END %]
-      <form method="post" action="do-set-paid.pl">
-        <input type="hidden" name="player" value="[% r.player %]" />
+      <td>
+        <form method="post" action="do-set-paid.pl">
+          <p class="button">
+            <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+            <input type="hidden" name="player" value="[% r.player %]" />
 [% IF r.paid %]
-        <input type="hidden" name="paid" value="f" />
-       <input type="submit" value="Sett som ikke betalt" />
+            <input type="hidden" name="paid" value="f" />
+           <input type="submit" value="Sett som ikke betalt" />
 [% ELSE %]
-        <input type="hidden" name="paid" value="t" />
-       <input type="submit" value="Sett som betalt" />
+            <input type="hidden" name="paid" value="t" />
+           <input type="submit" value="Sett som betalt" />
 [% END %]
-      </form>
-    </li>
+          </p>
+        </form>
+      </td>
+      <td>
+        <form method="post" action="do-unregister.pl">
+          <p class="button">
+            <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+            <input type="hidden" name="player" value="[% r.player %]" />
+           <input type="submit" value="Fjern" />
+          </p>
+        </form>
+      </td>
+    </tr>
 [% END %]
-  </ul>
+  </table>
 </div>