users.phtml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php $this->partial('aside_configure'); ?>
  2. <div class="post">
  3. <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t('back_to_rss_feeds'); ?></a>
  4. <form method="post" action="<?php echo _url('configure', 'users'); ?>">
  5. <legend><?php echo Minz_Translate::t('login_configuration'); ?></legend>
  6. <div class="form-group">
  7. <label class="group-name" for="current_user"><?php echo Minz_Translate::t('current_user'); ?></label>
  8. <div class="group-controls">
  9. <input id="current_user" type="text" disabled="disabled" value="<?php echo Minz_Configuration::currentUser(); ?>" />
  10. <code>$_SERVER['REMOTE_USER'] = <?php echo httpAuthUser(); ?></code>
  11. <label class="checkbox" for="is_admin">
  12. <input type="checkbox" id="is_admin" disabled="disabled"<?php echo Minz_Configuration::isAdmin() ? ' checked="checked"' : ''; ?> />
  13. <?php echo Minz_Translate::t('is_admin'); ?>
  14. </label>
  15. </div>
  16. </div>
  17. <div class="form-group">
  18. <label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
  19. <?php $mail = $this->conf->mailLogin(); ?>
  20. <div class="group-controls">
  21. <input type="email" id="mail_login" name="mail_login" value="<?php echo $mail ? $mail : ''; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>" />
  22. <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. <label class="group-name" for="token"><?php echo Minz_Translate::t('auth_token'); ?></label>
  27. <?php $token = $this->conf->token(); ?>
  28. <div class="group-controls">
  29. <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"/>
  30. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?>
  31. </div>
  32. </div>
  33. <div class="form-group form-actions">
  34. <div class="group-controls">
  35. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
  36. <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
  37. </div>
  38. </div>
  39. <?php if (Minz_Configuration::isAdmin()) { ?>
  40. <legend><?php echo Minz_Translate::t('users'); ?></legend>
  41. <div class="form-group">
  42. <div class="group-controls">
  43. <label class="checkbox" for="anon_access">
  44. <input type="checkbox" name="anon_access" id="anon_access" value="yes"<?php echo $this->conf->anonAccess() == 'yes' ? ' checked="checked"' : ''; ?> />
  45. <?php echo Minz_Translate::t('allow_anonymous'); ?>
  46. </label>
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="group-name" for="auth_type"><?php echo Minz_Translate::t('auth_type'); ?></label>
  51. <div class="group-controls">
  52. <select id="auth_type" name="auth_type">
  53. <option value="none">None (dangerous)</option>
  54. <option value="http_auth">HTTP Auth</option>
  55. <option value="persona">Mozilla Persona</option>
  56. </select>
  57. (selector not implemented yet)
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="group-name" for="users_list"><?php echo Minz_Translate::t('users_list'); ?></label>
  62. <div class="group-controls">
  63. <select id="users_list" name="users_list"><?php
  64. foreach (listUsers() as $user) {
  65. echo '<option>', $user, '</option>';
  66. }
  67. ?></select>
  68. (not implemented yet)
  69. </div>
  70. </div>
  71. <div class="form-group form-actions">
  72. <div class="group-controls">
  73. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
  74. <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
  75. </div>
  76. </div>
  77. <?php } ?>
  78. </form>
  79. </div>