setup.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. namespace App;
  3. use ParagonIE\AntiCSRF\AntiCSRF;
  4. $csrf = new AntiCSRF();
  5. ?>
  6. <div style="max-width: 640px; margin: 0 auto;">
  7. <h3><?=htmlspecialchars(__("Setup"))?></h3>
  8. <form method="post">
  9. <?php
  10. $csrf->insertToken();
  11. ?>
  12. <div class="row">
  13. <div class="col-6 col-sm-3">
  14. <div class="mb-3">
  15. <label for="title"><?=htmlspecialchars(__("Title"))?></label>
  16. <select class="form-select" name="title" id="title">
  17. <?php
  18. foreach(User::getTitleOptions() as $value) {
  19. ?>
  20. <option value="<?=htmlspecialchars($value)?>">
  21. <?=htmlspecialchars($value)?>
  22. </option>
  23. <?php
  24. }
  25. ?>
  26. </select>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="row">
  31. <div class="col-6">
  32. <div class="mb-3">
  33. <label for="first-name"><?=htmlspecialchars(__("First Name"))?></label>
  34. <input class="form-control" type="text" id="first-name" name="first_name" placeholder="<?=htmlspecialchars(__("Type first name"))?>" required />
  35. </div>
  36. </div>
  37. <div class="col-6">
  38. <div class="mb-3">
  39. <label for="last-name"><?=htmlspecialchars(__("Last Name"))?></label>
  40. <input class="form-control" type="text" id="last-name" name="last_name" placeholder="<?=htmlspecialchars(__("Type last name"))?>" required />
  41. </div>
  42. </div>
  43. </div>
  44. <div class="mb-3">
  45. <label for="email"><?=htmlspecialchars(__("Email Address"))?></label>
  46. <input class="form-control" type="email" id="email" name="email" placeholder="<?=htmlspecialchars(__("Type email address"))?>" required />
  47. </div>
  48. <div class="mb-3">
  49. <label for="password"><?=htmlspecialchars(__("Password"))?></label>
  50. <input class="form-control" type="password" id="password" name="password" placeholder="<?=htmlspecialchars(__("Type password"))?>" autocomplete="new-password" required />
  51. </div>
  52. <div class="mb-3">
  53. <label for="confirm-password"><?=htmlspecialchars(__("Confirm Password"))?></label>
  54. <input class="form-control" type="password" id="confirm-password" name="confirm_password" placeholder="<?=htmlspecialchars(__("Confirm password"))?>" autocomplete="new-password" required />
  55. </div>
  56. <button class="btn btn-primary" type="submit">
  57. <?=htmlspecialchars(__("Setup"))?>
  58. </button>
  59. </form>
  60. </div>