manage.phtml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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', 'delete'); ?>">
  43. <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
  44. <legend><?php echo _t('admin.user.users'); ?></legend>
  45. <div class="form-group">
  46. <label class="group-name" for="user-list"><?php echo _t('admin.user.user_list'); ?></label>
  47. <div class="group-controls">
  48. <select id="user-list" class="select-change" name="username">
  49. <?php foreach (listUsers() as $username) { ?>
  50. <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>
  51. <?php } ?>
  52. </select>
  53. <p><?php echo _t('admin.user.articles_and_size',
  54. format_number($this->nb_articles),
  55. format_bytes($this->size_user)); ?></p>
  56. </div>
  57. </div>
  58. <div class="form-group form-actions">
  59. <div class="group-controls">
  60. <button type="submit" class="btn btn-attention confirm"><?php echo _t('gen.action.remove'); ?></button>
  61. </div>
  62. </div>
  63. </form>
  64. </div>