CoreFiles by mySites.guru
two-factor-switcher.es6.js28 lines, 917 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
25a86b997c7ca733f979864f0571d5a5
sha1
046089643c40eb395587553b6cd2ae5aedb6ecf1
sha256
a1bcfbe06980eda67181e708c44d5045d2301c3f1a3968e2203965430bae4720
/**
* 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
 */
Joomla = window.Joomla || {};

(Joomla => {
  'use strict';

  document.addEventListener('DOMContentLoaded', () => {
    Joomla.twoFactorMethodChange = () => {
      const selectedPane = "com_users_twofactor_".concat(document.getElementById('jform_twofactor_method').value);
      [].slice.call(document.querySelectorAll('#com_users_twofactor_forms_container>div')).forEach(el => {
        if (el.id !== selectedPane) {
          document.getElementById(el.id).style.display = 'none';
          return;
        }

        document.getElementById(el.id).style.display = 'block';
      });
    };
  });
})(Joomla);

The same content is in 5 releases, Joomla 4.0.0-alpha8 to 4.0.0-alpha12. See them all, or every version of this file.