Unstyled browser-based activation process
[gamestick-pjgsapi.git] / templates / activate-profile.phtml
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <meta charset="utf-8"/>
4     <title>GameStick activation: Profile</title>
5     <style>
6       .error {
7         color: red;
8       }
9     </style>
10   </head>
11   <body>
12     <h1>PlayJam GameStick activation: Profile</h1>
13     <form method="post" action="activate.php">
14       <input type="hidden" name="code" value="<?= htmlspecialchars($code) ?>"/>
15
16       <?php if ($input['submit'] && count($errors)): ?>
17       <div style="color: red">
18         Errors:
19         <ul>
20           <?php foreach ($errors as $msg): ?>
21           <li><?= htmlspecialchars($msg) ?></li>
22           <?php endforeach ?>
23         </ul>
24       </div>
25       <?php endif ?>
26
27       <div>
28         <label for="gamerTag">Gamer tag:</label>
29         <input id="gamerTag" name="gamerTag" type="text"
30           value="<?= htmlspecialchars($input['gamerTag']) ?>"
31           pattern="[a-zA-Z0-9 ]+"
32           required=""
33           title="Allowed: A-Z, a-z, 0-9, space"
34         />
35       </div>
36
37       <div>
38         <label>
39           <input id="founderFlag" name="founderFlag" type="checkbox"
40             value="1"
41             <?php if ($input['founderFlag']) { echo 'checked=""';} ?>
42           />
43           I am a founder
44         </label>
45       </div>
46
47       <div>
48         <label for="founderName">Founder name:</label>
49         <input id="founderName" name="founderName" type="text"
50           value="<?= htmlspecialchars($input['founderName']) ?>"
51           pattern="[a-zA-Z0-9 ]*"
52           title="Allowed: A-Z, a-z, 0-9, space"
53           />
54       </div>
55
56       <div>
57         <label>Show games suitable for ages:</label>
58         <label>
59           <input type="radio" name="minAge" value="3"
60             <?php if ($input['minAge'] == 3) { echo 'checked=""';} ?>
61           />
62           3+
63         </label><br/>
64
65         <label>
66           <input type="radio" name="minAge" value="7"
67             <?php if ($input['minAge'] == 7) { echo 'checked=""';} ?>
68           />
69           7+
70         </label><br/>
71
72         <label>
73           <input type="radio" name="minAge" value="12"
74             <?php if ($input['minAge'] == 12) { echo 'checked=""';} ?>
75           />
76           12+
77         </label><br/>
78
79         <label>
80           <input type="radio" name="minAge" value="17"
81             <?php if ($input['minAge'] == 17) { echo 'checked=""';} ?>
82           />
83           17+
84         </label><br/>
85       </div>
86
87       <div>
88         <label>Avatar image:</label>
89         <?php foreach ($avatars as $key => $smallImagePath): ?>
90         <label>
91           <input type="radio" name="avatar" value="<?= htmlspecialchars($key) ?>"
92             <?php if ($input['avatar'] == $key) { echo 'checked=""';} ?>
93           />
94           <img src="<?= htmlspecialchars($smallImagePath) ?>"
95             alt="Avatar <?= htmlspecialchars($key) ?>"
96             width="118" height="118"
97           />
98         </label><br/>
99         <?php endforeach ?>
100
101       </div>
102
103       <button name="submit" value="1" type="submit">Submit</button>
104     </form>
105   </body>
106 </html>