diff index-rlg.html @ 39:e8ac0e3d2614

RLG-Web: separate logging in and starting a game. The user now logs in with a username and password, receiving a token which is then used for any actions requiring authentication. Starting a game is one such action. Games use a different set of id keys. This allows users to supply their passwords once and then play any number of successive games. Also, newly registered users do not need to supply their passwords again.
author John "Elwin" Edwards <elwin@sdf.org>
date Thu, 07 Jun 2012 15:43:06 -0700
parents 23a495e81725
children 1bbd0e76ba92
line wrap: on
line diff
--- a/index-rlg.html	Wed Jun 06 10:53:29 2012 -0700
+++ b/index-rlg.html	Thu Jun 07 15:43:06 2012 -0700
@@ -85,6 +85,21 @@
 <span onclick="textsize(true)">Larger</span>
 </div>
 </div>
+<div class="modal" id="startgame">
+<form id="startform" action="/play" method="post">
+<div>
+Choose game: <select name="game" id="input_game">
+  <option label="Rogue V3" value="rogue3">Rogue V3</option>
+  <option label="Rogue V4" value="rogue4">Rogue V4</option>
+  <option label="Rogue V5" value="rogue5">Rogue V5</option>
+  <option label="Super-Rogue" value="srogue">Super-Rogue</option>
+</select>
+</div>
+<div>
+<input type="submit" value="Play" onclick="startgame(event)">
+</div>
+</form>
+</div>
 <div class="modal" id="login">
 <form id="loginform" action="/login" method="post">
 <div>
@@ -94,19 +109,11 @@
 Password: <input type="password" name="pw" id="input_pw">
 </div>
 <div>
-Choose game: <select name="game" id="input_game">
-  <option label="Rogue V3" value="rogue3">Rogue V3</option>
-  <option label="Rogue V4" value="rogue4">Rogue V4</option>
-  <option label="Rogue V5" value="rogue5">Rogue V5</option>
-  <option label="Super-Rogue" value="srogue">Super-Rogue</option>
-</select>
-</div>
-<div>
-<input type="submit" value="Play" onclick="formlogin(event)">
+<input type="submit" value="Log in" onclick="formlogin(event)">
 </div>
 </form>
+<div class="rbutton" onclick="setmode('register')">Register</div>
 </div>
-<div class="rbutton" onclick="setmode('register')">Register</div>
 <div class="modal" id="register">
 <form id="regform" action="/addacct" method="post">
 <div>