CoreFiles by mySites.guru
admin-users-user.es6.js28 lines, 936 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
4dba316eb041b2ef57112ddf28df9877
sha1
7ea1498b0cc2e3dd0fa0f0744cc7a91c9984ed95
sha256
7f3e9b20134ddde0cce6880c8f282182b1b304076030ea93ff46454c12e8cdcf
/**
 * @copyright   Copyright (C) 2005 - 2018 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 method = document.getElementById('jform_twofactor_method');
      if (method) {
        const selectedPane = `com_users_twofactor_${method.value}`;
        const twoFactorForms = [].slice.call(document.querySelectorAll('#com_users_twofactor_forms_container > div'));
        twoFactorForms.forEach((value) => {
          const { id } = value;
          if (id !== selectedPane) {
            document.getElementById(id).style.display = 'none';
          } else {
            document.getElementById(id).style.display = 'block';
          }
        });
      }
    };
  });
})(Joomla);

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.