CoreFiles by mySites.guru
admin-users-groups.js32 lines, 782 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
e18046dc3b40ed74b133e91bc04087b0
sha1
afe15bad76acc98f39f2fb5f0dbf624378d4abff
sha256
d6a571efda7125bbabd4ecb5579554603c7a033b8527ce89cefe7a0363955532
/**
 * @copyright   Copyright (C) 2005 - 2018 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.submitbutton = function(task) {
			if (task === 'groups.delete') {
				var i, cids = document.getElementsByName('cid[]');
				for (i = 0; i < cids.length; i++) {
					if (cids[i].checked && cids[i].parentNode.getAttribute('data-usercount') != 0) {
						if (confirm(Joomla.JText._('COM_USERS_GROUPS_CONFIRM_DELETE'))) {
							Joomla.submitform(task);
						}
						return false;
					}
				}
			}

			Joomla.submitform(task);
			return false;
		};

	});

})(Joomla);

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