CoreFiles by mySites.guru
admin-users-user.es6.js36 lines, 1,083 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
4ba3d1c191c712efb9d9076a16c23754
sha1
5129fafe52dfa96cd5f84d0a44f81d9a6c380f86
sha256
7c7ee914fe7dafa93c69f994ed163bec5e49c228cccc36b5c4f796f8d8b3de80
/**
* 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 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);

No other release has this exact content. See every version of this file.