formLogin.phtml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <style>
  2. h1, div > p {
  3. text-align:center;
  4. }
  5. p {
  6. margin:1em auto;
  7. }
  8. form {
  9. display:block;
  10. margin:1em auto 3em auto;
  11. padding:0;
  12. width:10em;
  13. }
  14. input, button.btn {
  15. display:block;
  16. margin:.5em auto;
  17. }
  18. input {
  19. width:99%;
  20. }
  21. </style>
  22. <?php
  23. if (Minz_Configuration::canLogIn()) {
  24. ?><h1><?php echo Minz_Translate::t('login'); ?></h1><?php
  25. switch (Minz_Configuration::authType()) {
  26. case 'form':
  27. ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
  28. <p>
  29. <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
  30. <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
  31. </p><p>
  32. <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
  33. <input type="password" id="passwordPlain" required="required" />
  34. <input type="hidden" id="challenge" name="challenge" /><br />
  35. <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
  36. </p><p>
  37. <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
  38. </p>
  39. </form><?php
  40. break;
  41. case 'persona':
  42. ?><p><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t('login'); ?></a></p><?php
  43. break;
  44. }
  45. } else {
  46. ?><h1>FreshRSS</h1>
  47. <p><?php echo Minz_Translate::t('forbidden_access', Minz_Configuration::authType()); ?></p><?php
  48. }
  49. ?>
  50. <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>