Move timezone check to external JS
This commit is contained in:
parent
0c59074eeb
commit
39da6f8166
2 changed files with 5 additions and 6 deletions
4
core/js/visitortimezone.js
Normal file
4
core/js/visitortimezone.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
$(document).ready(function () {
|
||||
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
|
||||
$('#timezone-offset').val(visitortimezone);
|
||||
});
|
|
@ -41,10 +41,5 @@
|
|||
<input type="submit" id="submit" class="login primary" value="<?php echo $l->t('Log in'); ?>"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var visitortimezone = (-new Date().getTimezoneOffset() / 60);
|
||||
$('#timezone-offset').val(visitortimezone);
|
||||
});
|
||||
<?php OCP\Util::addscript('core', 'visitortimezone'); ?>
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue