CoreFiles by mySites.guru
admin-login.es6.js35 lines, 896 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
4379141e74b6c940d3cf149f8ac72555
sha1
e2597a0d4208004933ee74b39d5eb4858877fba8
sha256
334ef25b2d2247d37b0d9f4fbce8abe513d3c61bdafffe799432d69080fc4cc2
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  Copyright (C) 2005 - 2019 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 4 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha10. See them all, or every version of this file.