nextcloud/core/templates/login.php

95 lines
3.7 KiB
PHP
Raw Normal View History

<?php /** @var $l OC_L10N */ ?>
<?php
vendor_script('jsTimezoneDetect/jstz');
script('core', [
'visitortimezone',
'lostpassword',
'login'
]);
?>
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
<form method="post" name="login" action="<?php p(OC::$WEBROOT) ?>/">
2013-01-14 23:30:28 +04:00
<fieldset>
<?php if (!empty($_['redirect_url'])) {
print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">');
2013-01-14 23:30:28 +04:00
} ?>
<?php if (isset($_['apacheauthfailed']) && ($_['apacheauthfailed'])): ?>
<div class="warning">
<?php p($l->t('Server side authentication failed!')); ?><br>
<small><?php p($l->t('Please contact your administrator.')); ?></small>
</div>
<?php endif; ?>
<?php foreach($_['messages'] as $message): ?>
<div class="warning">
<?php p($message); ?><br>
</div>
<?php endforeach; ?>
<?php if (isset($_['internalexception']) && ($_['internalexception'])): ?>
<div class="warning">
<?php p($l->t('An internal error occurred.')); ?><br>
<small><?php p($l->t('Please try again or contact your administrator.')); ?></small>
</div>
<?php endif; ?>
<div id="message" class="hidden">
2014-11-06 14:09:48 +03:00
<img class="float-spinner" alt=""
src="<?php p(image_path('core', 'loading-dark.gif'));?>">
<span id="messageText"></span>
<!-- the following div ensures that the spinner is always inside the #message div -->
<div style="clear: both;"></div>
</div>
<p class="grouptop">
<input type="text" name="user" id="user"
2016-05-02 15:51:01 +03:00
placeholder="<?php p($l->t('Username or email')); ?>"
value="<?php p($_['loginName']); ?>"
<?php p($_['user_autofocus'] ? 'autofocus' : ''); ?>
autocomplete="on" autocapitalize="off" autocorrect="off" required>
2016-05-02 15:51:01 +03:00
<label for="user" class="infield"><?php p($l->t('Username or email')); ?></label>
2013-01-14 23:30:28 +04:00
</p>
<p class="groupbottom">
<input type="password" name="password" id="password" value=""
placeholder="<?php p($l->t('Password')); ?>"
<?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
autocomplete="on" autocapitalize="off" autocorrect="off" required>
2013-02-28 01:55:39 +04:00
<label for="password" class="infield"><?php p($l->t('Password')); ?></label>
2015-09-29 18:13:10 +03:00
<input type="submit" id="submit" class="login primary icon-confirm svg" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/>
2013-01-14 23:30:28 +04:00
</p>
<?php if (!empty($_['invalidpassword']) && !empty($_['canResetPassword'])) { ?>
2014-03-25 02:38:11 +04:00
<a id="lost-password" class="warning" href="">
<?php p($l->t('Wrong password. Reset it?')); ?>
</a>
<?php } else if (!empty($_['invalidpassword'])) { ?>
<p class="warning">
<?php p($l->t('Wrong password.')); ?>
</p>
<?php } ?>
<?php if ($_['rememberLoginAllowed'] === true) : ?>
<div class="remember-login-container">
2016-02-10 17:28:14 +03:00
<?php if ($_['rememberLoginState'] === 0) { ?>
2015-09-25 00:54:07 +03:00
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
<?php } else { ?>
2016-02-10 17:28:14 +03:00
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" checked="checked">
<?php } ?>
2016-02-10 17:28:14 +03:00
<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
</div>
<?php endif; ?>
2013-01-14 23:30:28 +04:00
<input type="hidden" name="timezone-offset" id="timezone-offset"/>
<input type="hidden" name="timezone" id="timezone"/>
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
2013-01-14 23:30:28 +04:00
</fieldset>
2011-08-08 19:57:45 +04:00
</form>
<?php if (!empty($_['alt_login'])) { ?>
<form id="alternative-logins">
<fieldset>
2013-02-28 01:55:39 +04:00
<legend><?php p($l->t('Alternative Logins')) ?></legend>
<ul>
2013-02-06 21:19:26 +04:00
<?php foreach($_['alt_login'] as $login): ?>
2013-02-28 01:55:39 +04:00
<li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li>
2013-02-06 21:19:26 +04:00
<?php endforeach; ?>
</ul>
</fieldset>
</form>
<?php }