authpicker.js 580 B

12345678910111213141516171819
  1. /**
  2. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. jQuery(document).ready(function() {
  6. $('#app-token-login').click(function (e) {
  7. e.preventDefault();
  8. $(this).addClass('hidden');
  9. $('#redirect-link').addClass('hidden');
  10. $('#app-token-login-field').removeClass('hidden');
  11. });
  12. document.getElementById('login-form').addEventListener('submit', function (e) {
  13. e.preventDefault();
  14. document.location.href = e.target.attributes.action.value
  15. })
  16. $('#login-form input').removeAttr('disabled');
  17. })