Merge pull request #8592 from owncloud/login-timezone
Disable login button until the timezone is set
This commit is contained in:
commit
db9cfaa56d
|
@ -1,4 +1,10 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
|
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
|
||||||
$('#timezone-offset').val(visitortimezone);
|
$('#timezone-offset').val(visitortimezone);
|
||||||
|
|
||||||
|
// only enable the submit button once we are sure that the timezone is set
|
||||||
|
var $loginForm = $('form[name="login"]');
|
||||||
|
if ($loginForm.length) {
|
||||||
|
$loginForm.find('input#submit').prop('disabled', false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<label for="remember_login"><?php p($l->t('remember')); ?></label>
|
<label for="remember_login"><?php p($l->t('remember')); ?></label>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="timezone-offset" id="timezone-offset"/>
|
<input type="hidden" name="timezone-offset" id="timezone-offset"/>
|
||||||
<input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>"/>
|
<input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>" disabled="disabled"/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
<?php if (!empty($_['alt_login'])) { ?>
|
<?php if (!empty($_['alt_login'])) { ?>
|
||||||
|
|
Loading…
Reference in New Issue