nextcloud/core/templates/login.php

70 lines
3.0 KiB
PHP
Raw Normal View History

<?php /** @var $l OC_L10N */ ?>
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
<form method="post" name="login">
2013-01-14 23:30:28 +04:00
<fieldset>
<?php if (!empty($_['redirect_url'])) {
2013-02-28 01:55:39 +04:00
print_unescaped('<input type="hidden" name="redirect_url" value="' . OC_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; ?>
2013-11-27 20:01:21 +04:00
<p id="message" class="hidden">
2013-11-28 02:07:19 +04:00
<img class="float-spinner" src="<?php p(\OCP\Util::imagePath('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>
</p>
<p class="grouptop">
<input type="text" name="user" id="user"
placeholder="<?php p($l->t('Username')); ?>"
value="<?php p($_['username']); ?>"
<?php p($_['user_autofocus'] ? 'autofocus' : ''); ?>
autocomplete="on" autocapitalize="off" autocorrect="off" required />
2013-02-28 01:55:39 +04:00
<label for="user" class="infield"><?php p($l->t('Username')); ?></label>
<img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
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>
<img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/>
2013-01-14 23:30:28 +04:00
</p>
<?php if (isset($_['invalidpassword']) && ($_['invalidpassword'])): ?>
2014-03-25 02:38:11 +04:00
<a id="lost-password" class="warning" href="">
<?php p($l->t('Forgot your password? Reset it!')); ?>
</a>
<?php endif; ?>
<?php if ($_['rememberLoginAllowed'] === true) : ?>
<input type="checkbox" name="remember_login" value="1" id="remember_login" />
<label for="remember_login"><?php p($l->t('remember')); ?></label>
<?php endif; ?>
2013-01-14 23:30:28 +04:00
<input type="hidden" name="timezone-offset" id="timezone-offset"/>
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
<input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>" disabled="disabled"/>
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 } ?>
<?php
OCP\Util::addscript('core', 'visitortimezone');
2014-03-25 02:38:11 +04:00
OCP\Util::addScript('core', 'lostpassword');