CoreFiles by mySites.guru
admin-users-user.js34 lines, 1,086 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
18b0e02c1f4f550afff49f59783aaf81
sha1
f1315c6445302354f3beaa37e8158ebc30422739
sha256
2a6983091ae7d06e16b8431f34de23c60af1449be3f3cda592058e414568617d
/**
* 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 method = document.getElementById('jform_twofactor_method');

      if (method) {
        var selectedPane = "com_users_twofactor_".concat(method.value);
        var twoFactorForms = [].slice.call(document.querySelectorAll('#com_users_twofactor_forms_container > div'));
        twoFactorForms.forEach(function (value) {
          var id = value.id;

          if (id !== selectedPane) {
            document.getElementById(id).style.display = 'none';
          } else {
            document.getElementById(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.