CoreFiles by mySites.guru
admin-login.es6.js27 lines, 767 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
bb09e1a88c04de90c8e970c80a0c06e1
sha1
615e5e9ae3346921aafe4540ce86030b1021e395
sha256
d0fd5c3ccee00b6c39c57a75ad3c04ac8b81d563e5063f9626abfb6ff31997f8
/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

(() => {
  'use strict';

  const btn = document.getElementById('btn-login-submit');
  if (btn) {
    btn.addEventListener('click', (event) => {
      event.preventDefault();
      const form = document.getElementById('form-login');
      if (form && document.formvalidator.isValid(form)) {
        Joomla.submitbutton('login');
      }
    });
  }

  const formTmp = document.querySelector('.login-initial');
  if (formTmp) {
    formTmp.style.display = 'block';
    if (!document.querySelector('joomla-alert')) {
      document.getElementById('mod-login-username').focus();
    }
  }
})();

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.