]> git.sesse.net Git - ccbs/blobdiff - html/templates/registration.tmpl
Switch to English as a default language, and make a matching nb_NO.po instead.
[ccbs] / html / templates / registration.tmpl
index 44d7ab7523c8f18d4293fd51bd0d7e2e0fd8d01c..e457f268c48a5c500ee342c6ab8c8224f63392ce 100644 (file)
 [%# vim:set filetype=html: %]
-<h2>PĆ„melding</h2>
+<h2>Registration</h2>
 
 <div>
 <form method="post" action="do-registration.pl">
   <table>
     <tr>
-      <th>Spiller</th>
+      <th>Player</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>Betalt</th>
+      <th>Paid</th>
       <td>
         <select name="paid">
-         <option value="f">Nei</option>
-         <option value="t">Ja</option>
+         <option value="f">No</option>
+         <option value="t">Yes</option>
        </select>
       </td>
     </tr>
     <tr>
       <th colspan="2">
         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
-        <input type="submit" value="Legg til" />
+        <input type="submit" value="Add" />
       </th>
     </tr>
   </table>
 </form>
 </div>
 
-<h2>PĆ„meldte</h2>
+<h2>Register a new player</h2>
+
+<div>
+<form method="post" action="do-add-player.pl">
+  <table>
+    <tr>
+      <th>Nick</th>
+      <td><input name="nick" /></td>
+    </tr>
+    <tr>
+      <th>Country</th>
+      <td>
+        <select name="country">
+[% FOR c = countries %]
+[% IF c.countrycode == "NOR" %]
+          <option value="[% c.country %]" selected="selected">[% c.countrycode %] - [% c.countryname %]</option>
+[% ELSE %]
+          <option value="[% c.country %]">[% c.countrycode %] - [% c.countryname %]</option>
+[% END %]        
+[% END %]        
+       </select>
+      </td>
+    </tr>
+    <tr>
+      <th>Club</th>
+      <td>
+        <select name="club">
+         <option value="-1" selected="selected"></option>
+[% FOR c = clubs %]
+          <option value="[% c.club %]">[% c.clubcode %] - [% c.clubname %]</option>
+[% END %]        
+       </select>
+      </td>
+    </tr>
+    <tr>
+      <th colspan="2">
+        <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+        <input type="submit" value="Add" />
+      </th>
+    </tr>
+  </table>
+</form>
+</div>
+
+<h2>Registered</h2>
 
 <div>
   <table>
 [% FOR r = registered %]
     <tr>
-      <td>[% r.nick %]</td>
+      <td><a href="player.pl?id=[% r.player %]">[% r.nick %]</a></td>
 [% IF r.paid %]
-      <td>betalt</td>
+      <td>paid</td>
 [% ELSE %]
-      <td class="notpaid">ikke betalt</td>
+      <td class="notpaid">not paid</td>
 [% END %]
       <td>
         <form method="post" action="do-set-paid.pl">
-          <input type="hidden" name="player" value="[% r.player %]" />
+          <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="<_>Set as not paid</_>" />
 [% 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="<_>Set as paid</_>" />
 [% END %]
+          </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="<_>Remove</_>" />
+          </p>
+        </form>
+      </td>
+      <td>
+        <form method="post" action="edit-player.pl">
+          <p class="button">
+            <input type="hidden" name="player" value="[% r.player %]" />
+           <input type="submit" value="<_>Edit player</_>" />
+          </p>
         </form>
       </td>
     </tr>