CoreFiles by mySites.guru
two-factor-switcher.js28 lines, 943 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
037bb4b66eba3291c0114bd787f84fe3
sha1
64533df6ca3f74f7a9ce362f957baaa3231afc4f
sha256
c69ba2450fcca471b48251fb30b87cc565bc206c0bd8d58755dca2e409053120
/**
* 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 || {};

(function (Joomla) {
  'use strict';

  document.addEventListener('DOMContentLoaded', function () {
    Joomla.twoFactorMethodChange = function () {
      var selectedPane = "com_users_twofactor_".concat(document.getElementById('jform_twofactor_method').value);
      [].slice.call(document.querySelectorAll('#com_users_twofactor_forms_container>div')).forEach(function (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 6 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha12. See them all, or every version of this file.