]> git.sesse.net Git - ccbs/blobdiff - html/templates/player.tmpl
Pull in player editing code from --baby.
[ccbs] / html / templates / player.tmpl
index 91a4d7970cd9499b9f584c82ca03f45a9eb31d4f..b41aeb7a146fb3431d79efa5464cd28fe69b55bc 100644 (file)
     </ul>
   </div>
 
+[% IF !public %]
+  <h2>Rediger spiller</h2>
+
+  <div>
+    <form method="post" action="do-edit-player.pl">
+      <input type="hidden" name="player" value="[% player.player %]" />
+      <table>
+        <tr>
+          <th>Nick</th>
+          <td><input name="nick" value="[% player.nick %]" /></td>
+       </tr>
+        <tr>
+          <th>Land</th>
+          <td>
+            <select name="country">
+[% FOR c = countries %]
+  [% IF c.country == player.country %]
+    <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>Klubb</th>
+          <td>
+            <select name="club">
+              <option value="-1"></option>
+[% FOR c = clubs %]
+  [% IF c.club == player.club %]
+              <option value="[% c.club %]" selected="selected">[% c.clubname %]</option>
+  [% ELSE %]
+              <option value="[% c.club %]">[% c.clubname %]</option>
+  [% END %]
+[% END %]
+           </select>
+         </td>
+        </tr>
+        <tr>
+          <th colspan="2">
+           <input type="submit" value="Rediger" />
+         </th>
+       </tr>
+      </table>
+    </form>
+  </div>
+[% END %]
+
   <h2>Beste sanger</h2>
 
   <div>