Dragon-Knight/server/templates/install/partials/adminForm.php

37 lines
1.2 KiB
PHP
Raw Normal View History

2024-07-13 23:15:25 -05:00
<form action="/install/finish" method="post" style="max-width: 300px;">
2024-07-02 09:34:38 -05:00
<input type="hidden" name="complete" value="<?= $complete ? "true" : "false" ?>">
<div class="form-group">
<label for="username">Username</label>
2024-07-13 23:15:25 -05:00
<input type="text" name="username" id="username" required>
2024-07-02 09:34:38 -05:00
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password" id="password" required>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" required>
</div>
<?php if ($complete): ?>
<div class="form-group">
<label for="class">Class</label>
<select name="class" id="class">
2024-07-13 23:15:25 -05:00
<?php foreach (Classes::all() as $class): ?>
<option value="<?= $class['id'] ?>"><?= $class['name'] ?></option>
<?php endforeach; ?>
2024-07-02 09:34:38 -05:00
</select>
</div>
<?php endif; ?>
<div class="form-group">
<label for="level">Level</label>
<input type="number" name="level" id="level" min="1" placeholder="1" value="1" required>
</div>
2024-07-02 09:34:38 -05:00
<button type="submit" name="submit">Submit</button>
</form>