CoreFiles by mySites.guru
admin-login.es6.js26 lines, 701 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
743abbd8ad4d9215c12573aa2d8ff226
sha1
0f8caa11616c23c80455183c98dfb7b2c165fcdd
sha256
b3eb9887a7a555f1c4d24726c1e209642065267017b59e147ad178fa926ce5ed
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
((Joomla, document) => {
  'use strict';

  document.addEventListener('DOMContentLoaded', () => {
    const btn = document.getElementById('btn-login-submit');

    if (btn) {
      btn.addEventListener('click', event => {
        event.preventDefault();

        if (document.formvalidator.isValid(btn.form)) {
          Joomla.submitbutton('login');
        }
      });
    }
  });
})(window.Joomla, document);

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