manage.phtml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php $this->partial('aside_configure'); ?>
  2. <div class="post">
  3. <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a>
  4. <form method="post" action="<?php echo _url('user', 'setRegistration'); ?>">
  5. <legend><?php echo _t('admin.user.registration.allow'); ?></legend>
  6. <div class="form-group">
  7. <label class="group-name" for="max-registrations"><?php echo _t('admin.user.registration.number'); ?></label>
  8. <div class="group-controls">
  9. <input type="number" id="max-registrations" name="max-registrations" value="<?php echo FreshRSS_Context::$system_conf->limits['max_registrations']; ?>" min="0" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->limits['max_registrations']; ?>"/>
  10. <?php echo _i('help'); ?> <?php echo _t('admin.user.registration.help'); ?>
  11. </div>
  12. </div>
  13. <div class="form-group">
  14. <div class="group-controls">
  15. <?php
  16. $number = count(listUsers());
  17. echo _t($number > 1 ? 'admin.user.numbers' : 'admin.user.number', $number);
  18. ?>
  19. </div>
  20. </div>
  21. <div class="form-group form-actions">
  22. <div class="group-controls">
  23. <button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
  24. <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
  25. </div>
  26. </div>
  27. </form>
  28. <form method="post" action="<?php echo _url('user', 'create'); ?>">
  29. <legend><?php echo _t('admin.user.create'); ?></legend>
  30. <div class="form-group">
  31. <label class="group-name" for="new_user_language"><?php echo _t('admin.user.language'); ?></label>
  32. <div class="group-controls">
  33. <select name="new_user_language" id="new_user_language">
  34. <?php $languages = Minz_Translate::availableLanguages(); ?>
  35. <?php foreach ($languages as $lang) { ?>
  36. <option value="<?php echo $lang; ?>"<?php echo FreshRSS_Context::$user_conf->language === $lang ? ' selected="selected"' : ''; ?>><?php echo _t('gen.lang.' . $lang); ?></option>
  37. <?php } ?>
  38. </select>
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <label class="group-name" for="new_user_name"><?php echo _t('admin.user.username'); ?></label>
  43. <div class="group-controls">
  44. <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" autocomplete="off" pattern="[0-9a-zA-Z]{1,16}" placeholder="demo" />
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <label class="group-name" for="new_user_passwordPlain"><?php echo _t('admin.user.password_form'); ?></label>
  49. <div class="group-controls">
  50. <div class="stick">
  51. <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" autocomplete="off" pattern=".{7,}" />
  52. <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?php echo _i('key'); ?></a>
  53. </div>
  54. <?php echo _i('help'); ?> <?php echo _t('admin.user.password_format'); ?>
  55. <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label class="group-name" for="new_user_email"><?php echo _t('admin.user.email_persona'); ?></label>
  60. <?php $mail = FreshRSS_Context::$user_conf->mail_login; ?>
  61. <div class="group-controls">
  62. <input type="email" id="new_user_email" name="new_user_email" class="extend" autocomplete="off" placeholder="alice@example.net" />
  63. </div>
  64. </div>
  65. <div class="form-group form-actions">
  66. <div class="group-controls">
  67. <button type="submit" class="btn btn-important"><?php echo _t('gen.action.create'); ?></button>
  68. <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
  69. </div>
  70. </div>
  71. </form>
  72. <form method="post" action="<?php echo _url('user', 'delete'); ?>">
  73. <legend><?php echo _t('admin.user.users'); ?></legend>
  74. <div class="form-group">
  75. <label class="group-name" for="user-list"><?php echo _t('admin.user.user_list'); ?></label>
  76. <div class="group-controls">
  77. <select id="user-list" class="select-change" name="username">
  78. <?php foreach (listUsers() as $username) { ?>
  79. <option data-url="<?php echo _url('user', 'manage', 'u', $username); ?>" <?php echo $this->current_user === $username ? 'selected="selected"' : ''; ?> value="<?php echo $username; ?>"><?php echo $username; ?></option>
  80. <?php } ?>
  81. </select>
  82. <p><?php echo _t('admin.user.articles_and_size',
  83. format_number($this->nb_articles),
  84. format_bytes($this->size_user)); ?></p>
  85. </div>
  86. </div>
  87. <div class="form-group form-actions">
  88. <div class="group-controls">
  89. <button type="submit" class="btn btn-attention confirm"><?php echo _t('gen.action.remove'); ?></button>
  90. </div>
  91. </div>
  92. </form>
  93. </div>