Merge pull request #22271 from owncloud/remember-login-state
Remember previous state of remember login checkbox
This commit is contained in:
commit
39e6a1897b
|
@ -67,7 +67,11 @@ script('core', [
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($_['rememberLoginAllowed'] === true) : ?>
|
<?php if ($_['rememberLoginAllowed'] === true) : ?>
|
||||||
<div class="remember-login-container">
|
<div class="remember-login-container">
|
||||||
|
<?php if ($_['rememberLoginState'] === 0) { ?>
|
||||||
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
|
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
|
||||||
|
<?php } else { ?>
|
||||||
|
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" checked="checked">
|
||||||
|
<?php } ?>
|
||||||
<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
|
<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -969,6 +969,7 @@ class OC_Util {
|
||||||
|
|
||||||
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
|
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
|
||||||
$parameters['rememberLoginAllowed'] = self::rememberLoginAllowed();
|
$parameters['rememberLoginAllowed'] = self::rememberLoginAllowed();
|
||||||
|
$parameters['rememberLoginState'] = isset($_POST['remember_login']) ? $_POST['remember_login'] : 0;
|
||||||
\OC_Hook::emit('OC_Util', 'pre_displayLoginPage', array('parameters' => $parameters));
|
\OC_Hook::emit('OC_Util', 'pre_displayLoginPage', array('parameters' => $parameters));
|
||||||
OC_Template::printGuestPage("", "login", $parameters);
|
OC_Template::printGuestPage("", "login", $parameters);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue