accoutn creation works with clearsilver template.
This commit is contained in:
parent
6a461c441e
commit
a70d382c93
4 changed files with 81 additions and 37 deletions
16
templates/createaccount.cs
Normal file
16
templates/createaccount.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?cs include:"templates/header.cs" ?>
|
||||
|
||||
<?cs var:Data.Message ?>
|
||||
<?cs if:#Data.NotCreated ?>
|
||||
<form method="post">
|
||||
<p>Your username:<br>
|
||||
<input name="username" type="text" class="text" size="20"></p>
|
||||
<p>Your Password:<br>
|
||||
<input name="password1" type="text" class="text" size="20"></p>
|
||||
<p>Please retype your Password:<br>
|
||||
<input name="password2" type="text" class="text" size="20"></p>
|
||||
<p><input type="submit" class="submit" value="create account"></p>
|
||||
</form>
|
||||
<?cs /if ?>
|
||||
|
||||
<?cs include:"templates/footer.cs" ?>
|
25
templates/gamecreation.cs
Normal file
25
templates/gamecreation.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?cs include:"templates/header.cs" ?>
|
||||
|
||||
<?cs include:"templates/macros.cs" ?>
|
||||
|
||||
<?cs var:Data.Message ?>
|
||||
|
||||
<form method="post">
|
||||
<p>Player One (Black):
|
||||
<?cs call:select_list(Data.Userlist,'player1',Data.Username) ?>
|
||||
</p>
|
||||
<p>Player Two (White):
|
||||
<?cs call:select_list(Data.Userlist,'player2','') ?>
|
||||
</p>
|
||||
<p>Goban Size:
|
||||
<select name="gobansize">
|
||||
<option> 9 </option>
|
||||
<option> 13 </option>
|
||||
<option> 19 </option>
|
||||
</select>
|
||||
fields </p>
|
||||
<p>Optional name for game: <input type="text" name="description" size="20" class="text"></p>
|
||||
<input type="submit" class="submit" value="create game">
|
||||
</form>
|
||||
|
||||
<?cs include:"templates/footer.cs" ?>
|
15
templates/macros.cs
Normal file
15
templates/macros.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?cs def:select_list(itemlist, listname, selected) ?><?cs
|
||||
#create a drop down list out of the items of itemlist.
|
||||
# use 'listname' as name for the select tag.
|
||||
#use 'selected' as preselected value.
|
||||
?>
|
||||
<select name="<?cs var:listname ?>">
|
||||
<?cs each:item = itemlist ?>
|
||||
<?cs if:item == selected ?>
|
||||
<option selected> <?cs var:item ?> </option>
|
||||
<?cs else ?>
|
||||
<option > <?cs var:item ?> </option>
|
||||
<?cs /if ?>
|
||||
<?cs /each ?>
|
||||
</select>
|
||||
<?cs /def ?>
|
Loading…
Add table
Add a link
Reference in a new issue