4
0

register.phtml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <div class="prompt">
  2. <h1><?= _t('gen.auth.registration') ?></h1>
  3. <form method="post" action="<?= _url('user', 'create') ?>">
  4. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  5. <div class="form-group">
  6. <label for="new_user_language"><?= _t('admin.user.language') ?></label>
  7. <select name="new_user_language" id="new_user_language">
  8. <?php $languages = Minz_Translate::availableLanguages(); ?>
  9. <?php foreach ($languages as $lang) { ?>
  10. <option value="<?= $lang ?>"<?= $this->preferred_language === $lang ? ' selected="selected"' : '' ?>><?= _t('gen.lang.' . $lang) ?></option>
  11. <?php } ?>
  12. </select>
  13. </div>
  14. <div class="form-group">
  15. <label for="new_user_name"><?= _t('gen.auth.username') ?></label>
  16. <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autocapitalize="off" />
  17. <p class="help"><?= _i('help') ?> <?= _t('gen.auth.username.format') ?></p>
  18. </div>
  19. <?php if ($this->show_email_field) { ?>
  20. <div class="form-group">
  21. <label for="new_user_email">
  22. <?= _t('gen.auth.email') ?>
  23. </label>
  24. <input id="new_user_email" name="new_user_email" type="email" required />
  25. </div>
  26. <?php } ?>
  27. <div class="form-group">
  28. <label for="new_user_passwordPlain"><?= _t('gen.auth.password') ?></label>
  29. <div class="stick">
  30. <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" required="required" autocomplete="new-password" pattern=".{7,}" />
  31. <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?= _i('key') ?></a>
  32. </div>
  33. <noscript><b><?= _t('gen.js.should_be_activated') ?></b></noscript>
  34. <p class="help"><?= _i('help') ?> <?= _t('gen.auth.password.format') ?></p>
  35. </div>
  36. <?php if ($this->show_tos_checkbox) { ?>
  37. <div class="form-group">
  38. <label class="checkbox" for="accept-tos">
  39. <input type="checkbox" name="accept_tos" id="accept-tos" value="1" required />
  40. <?= _t('gen.auth.accept_tos', _url('index', 'tos')) ?>
  41. </label>
  42. </div>
  43. <?php } ?>
  44. <div class="form-group form-group-actions">
  45. <?php
  46. $redirect_url = urlencode(Minz_Url::display(
  47. array('c' => 'index', 'a' => 'index'),
  48. 'php', true
  49. ));
  50. ?>
  51. <input type="hidden" name="r" value="<?= $redirect_url ?>" />
  52. <button type="submit" class="btn btn-important"><?= _t('gen.action.create') ?></button>
  53. <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.cancel') ?></a>
  54. </div>
  55. </form>
  56. <p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p>
  57. </div>