CoreFiles by mySites.guru
folderinstaller.js28 lines, 821 bytes, from Joomla_5.2.4-Stable-Full_Package.zip
Raw History Compare with 5.2.3
md5
f32df610d5377bd412e378dea4577bdf
sha1
5be523ff6b2c0dbd49ae96d00f495c46717c8d8c
sha256
df98fd8a8fbe99d2c83bf7eb64b94a06bfa3487ae98249c9c902f02704977fa0
/**
 * @copyright   (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

Joomla = window.Joomla || {};
(Joomla => {

  document.addEventListener('DOMContentLoaded', () => {
    Joomla.submitbuttonfolder = () => {
      const form = document.getElementById('adminForm');

      // do field validation
      if (form.install_directory.value === '') {
        Joomla.renderMessages({
          warning: [Joomla.Text._('PLG_INSTALLER_FOLDERINSTALLER_NO_INSTALL_PATH')]
        });
      } else {
        const loading = document.getElementById('loading');
        if (loading) {
          loading.classList.remove('hidden');
        }
        form.installtype.value = 'folder';
        form.submit();
      }
    };
  });
})(Joomla);

The same content is in 214 releases, Joomla 4.3.0-alpha1 to 6.3.0-alpha1. See them all, or every version of this file.