manage.phtml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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', 'create'); ?>" autocomplete="off">
  5. <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
  6. <legend><?php echo _t('admin.user.create'); ?></legend>
  7. <div class="form-group">
  8. <label class="group-name" for="new_user_language"><?php echo _t('admin.user.language'); ?></label>
  9. <div class="group-controls">
  10. <select name="new_user_language" id="new_user_language">
  11. <?php $languages = Minz_Translate::availableLanguages(); ?>
  12. <?php foreach ($languages as $lang) { ?>
  13. <option value="<?php echo $lang; ?>"<?php echo FreshRSS_Context::$user_conf->language === $lang ? ' selected="selected"' : ''; ?>><?php echo _t('gen.lang.' . $lang); ?></option>
  14. <?php } ?>
  15. </select>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="group-name" for="new_user_name"><?php echo _t('admin.user.username'); ?></label>
  20. <div class="group-controls">
  21. <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?php echo FreshRSS_user_Controller::USERNAME_PATTERN; ?>" placeholder="demo" />
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="group-name" for="new_user_passwordPlain"><?php echo _t('admin.user.password_form'); ?></label>
  26. <div class="group-controls">
  27. <div class="stick">
  28. <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" autocomplete="new-password" pattern=".{7,}" />
  29. <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?php echo _i('key'); ?></a>
  30. </div>
  31. <?php echo _i('help'); ?> <?php echo _t('admin.user.password_format'); ?>
  32. <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
  33. </div>
  34. </div>
  35. <div class="form-group form-actions">
  36. <div class="group-controls">
  37. <button type="submit" class="btn btn-important"><?php echo _t('gen.action.create'); ?></button>
  38. <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
  39. </div>
  40. </div>
  41. </form>
  42. <form method="post" action="<?php echo _url('user', 'update'); ?>">
  43. <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
  44. <legend><?php echo _t('admin.user.update_users'); ?></legend>
  45. <div class="form-group">
  46. <label class="group-name" for="current_user"><?php echo _t('admin.user.selected'); ?></label>
  47. <div class="group-controls">
  48. <select id="current_user" name="username">
  49. <option selected="selected"> </option>
  50. <?php foreach (listUsers() as $username) { ?>
  51. <option value="<?php echo $username; ?>"><?php echo $username; ?></option>
  52. <?php } ?>
  53. </select>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="group-name" for="newPasswordPlain"><?php echo _t('admin.user.password_form'); ?></label>
  58. <div class="group-controls">
  59. <div class="stick">
  60. <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
  61. <a class="btn toggle-password" data-toggle="newPasswordPlain"><?php echo _i('key'); ?></a>
  62. </div>
  63. <?php echo _i('help'); ?> <?php echo _t('conf.profile.password_format'); ?>
  64. <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
  65. </div>
  66. </div>
  67. <div class="form-group form-actions">
  68. <div class="group-controls">
  69. <button type="submit" class="btn btn-important"><?php echo _t('gen.action.update'); ?></button>
  70. <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
  71. </div>
  72. </div>
  73. </form>
  74. <form method="post" action="<?php echo _url('user', 'delete'); ?>">
  75. <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
  76. <legend><?php echo _t('admin.user.delete_users'); ?></legend>
  77. <div class="form-group">
  78. <label class="group-name" for="user-list"><?php echo _t('admin.user.selected'); ?></label>
  79. <div class="group-controls">
  80. <select id="user-list" class="select-change" name="username">
  81. <option selected="selected"> </option>
  82. <?php foreach (listUsers() as $username) { ?>
  83. <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>
  84. <?php } ?>
  85. </select>
  86. <p><?php echo _t('admin.user.articles_and_size',
  87. format_number($this->nb_articles),
  88. format_bytes($this->size_user)); ?></p>
  89. </div>
  90. </div>
  91. <div class="form-group form-actions">
  92. <div class="group-controls">
  93. <button type="submit" class="btn btn-attention confirm"><?php echo _t('gen.action.remove'); ?></button>
  94. </div>
  95. </div>
  96. </form>
  97. </div>