CoreFiles by mySites.guru
two-factor-switcher.es6.js28 lines, 915 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
88fb7086345063d0401bea285e4a9040
sha1
8452e4a748cd62349227f6396754df0a605ccdd5
sha256
cd21d68aa2d9c56873ad0cc892f3cb5f42db575a6ef37e2800a5ea94f87c698b
/**
* 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 - 2020 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).classList.add('hidden');
          return;
        }

        document.getElementById(el.id).classList.remove('hidden');
      });
    };
  });
})(Joomla);

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