users.phtml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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->mail_login; ?>
  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="1"<?php echo Minz_Configuration::allowAnonymous() ? ' checked="checked"' : ''; ?> />
  45. <?php echo Minz_Translate::t('allow_anonymous', Minz_Configuration::defaultUser()); ?>
  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"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>>None (dangerous)</option>
  54. <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : ''; ?>>HTTP Auth</option>
  55. <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : ''; ?>>Mozilla Persona</option>
  56. </select>
  57. </div>
  58. </div>
  59. <div class="form-group">
  60. <label class="group-name" for="users_list"><?php echo Minz_Translate::t('users_list'); ?></label>
  61. <div class="group-controls">
  62. <select id="users_list" name="users_list"><?php
  63. foreach (listUsers() as $user) {
  64. echo '<option>', $user, '</option>';
  65. }
  66. ?></select>
  67. (not implemented yet)
  68. </div>
  69. </div>
  70. <div class="form-group form-actions">
  71. <div class="group-controls">
  72. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
  73. <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
  74. </div>
  75. </div>
  76. <?php } ?>
  77. </form>
  78. </div>