You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

login.php 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php /** @var $l \OCP\IL10N */ ?>
  2. <?php
  3. vendor_script('jsTimezoneDetect/jstz');
  4. script('core', 'merged-login');
  5. ?>
  6. <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
  7. <form method="post" name="login">
  8. <fieldset>
  9. <?php if (!empty($_['redirect_url'])) {
  10. print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">');
  11. } ?>
  12. <?php if (isset($_['apacheauthfailed']) && ($_['apacheauthfailed'])): ?>
  13. <div class="warning">
  14. <?php p($l->t('Server side authentication failed!')); ?><br>
  15. <small><?php p($l->t('Please contact your administrator.')); ?></small>
  16. </div>
  17. <?php endif; ?>
  18. <?php foreach($_['messages'] as $message): ?>
  19. <div class="warning">
  20. <?php p($message); ?><br>
  21. </div>
  22. <?php endforeach; ?>
  23. <?php if (isset($_['internalexception']) && ($_['internalexception'])): ?>
  24. <div class="warning">
  25. <?php p($l->t('An internal error occurred.')); ?><br>
  26. <small><?php p($l->t('Please try again or contact your administrator.')); ?></small>
  27. </div>
  28. <?php endif; ?>
  29. <div id="message" class="hidden">
  30. <img class="float-spinner" alt=""
  31. src="<?php p(image_path('core', 'loading-dark.gif'));?>">
  32. <span id="messageText"></span>
  33. <!-- the following div ensures that the spinner is always inside the #message div -->
  34. <div style="clear: both;"></div>
  35. </div>
  36. <p class="grouptop<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
  37. <input type="text" name="user" id="user"
  38. placeholder="<?php p($l->t('Username or email')); ?>"
  39. value="<?php p($_['loginName']); ?>"
  40. <?php p($_['user_autofocus'] ? 'autofocus' : ''); ?>
  41. autocomplete="on" autocapitalize="none" autocorrect="off" required>
  42. <label for="user" class="infield"><?php p($l->t('Username or email')); ?></label>
  43. </p>
  44. <p class="groupbottom<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
  45. <input type="password" name="password" id="password" value=""
  46. placeholder="<?php p($l->t('Password')); ?>"
  47. <?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
  48. autocomplete="on" autocapitalize="off" autocorrect="none" required>
  49. <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
  50. </p>
  51. <?php if (!empty($_['invalidpassword'])) { ?>
  52. <p class="warning">
  53. <?php p($l->t('Wrong password.')); ?>
  54. </p>
  55. <?php } ?>
  56. <div id="submit-wrapper">
  57. <input type="submit" id="submit" class="login primary" title="" value="<?php p($l->t('Log in')); ?>" disabled="disabled" />
  58. <div class="submit-icon icon-confirm-white"></div>
  59. </div>
  60. <?php if (!empty($_['canResetPassword'])) { ?>
  61. <div id="reset-password-wrapper" style="display: none;">
  62. <input type="submit" id="reset-password-submit" class="login primary" title="" value="<?php p($l->t('Reset password')); ?>" disabled="disabled" />
  63. <div class="submit-icon icon-confirm-white"></div>
  64. </div>
  65. <?php } ?>
  66. <div class="login-additional">
  67. <?php if (!$_['hideRemeberLoginState']) { ?>
  68. <div class="remember-login-container">
  69. <?php if ($_['rememberLoginState'] === 0) { ?>
  70. <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
  71. <?php } else { ?>
  72. <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" checked="checked">
  73. <?php } ?>
  74. <label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
  75. </div>
  76. <?php } ?>
  77. <?php if (!empty($_['canResetPassword'])) { ?>
  78. <div class="lost-password-container">
  79. <a id="lost-password" href="<?php p($_['resetPasswordLink']); ?>">
  80. <?php p($l->t('Forgot password?')); ?>
  81. </a>
  82. <a id="lost-password-back" href="" style="display:none;">
  83. <?php p($l->t('Back to log in')); ?>
  84. </a>
  85. </div>
  86. <?php } ?>
  87. </div>
  88. <input type="hidden" name="timezone_offset" id="timezone_offset"/>
  89. <input type="hidden" name="timezone" id="timezone"/>
  90. <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
  91. </fieldset>
  92. </form>
  93. <?php if (!empty($_['alt_login'])) { ?>
  94. <form id="alternative-logins">
  95. <fieldset>
  96. <legend><?php p($l->t('Alternative Logins')) ?></legend>
  97. <ul>
  98. <?php foreach($_['alt_login'] as $login): ?>
  99. <li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li>
  100. <?php endforeach; ?>
  101. </ul>
  102. </fieldset>
  103. </form>
  104. <?php }