aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/login/authpicker.js
blob: 10b5d716d6ad40eb70dec330d282336b004d5a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
jQuery(document).ready(function() {
	$('#app-token-login').click(function (e) {
		e.preventDefault();
		$(this).addClass('hidden');
		$('#redirect-link').addClass('hidden');
		$('#app-token-login-field').removeClass('hidden');
	});

	document.getElementById('login-form').addEventListener('submit', function (e) {
		e.preventDefault();
		document.location.href = e.target.attributes.action.value
	})

	$('#login-form input').removeAttr('disabled');
})