CoreFiles by mySites.guru
two-factor-switcher.es6.js28 lines, 911 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
71ff30309575b621a998e22b5fd0ebd1
sha1
460d807fa326e7318252396b25bc6a93aa0db4b3
sha256
158b5a4d8e3a0e64d075a8b093549e737aa862cb9cf77dd32db2db4840e6af2a
/**
* 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_${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);

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