CoreFiles by mySites.guru
admin-users-mail.js36 lines, 915 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
e50ff94f3736bb80a8838fbd8af7d180
sha1
09fc78709c28c49f260548f6e37e6db462cfc57b
sha256
7855e52299a30d8ef9a508a9f1cb3b2b7ab9c7bd4ea6f576ed2424b8cb0ecf00
/**
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

(function() {
	'use strict';

	document.addEventListener('DOMContentLoaded', function() {

		Joomla.submitbutton = function(pressbutton) {
			var form = document.adminForm;

			if (pressbutton == 'mail.cancel') {
				Joomla.submitform(pressbutton);
				return
			}

			// do field validation
			if (form.jform_subject.value == '') {
				alert(Joomla.JText._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT'));
			}
			else if (getSelectedValue('adminForm', 'jform[group]') < 0) {
				alert(Joomla.JText._('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP'));
			}
			else if (form.jform_message.value == '') {
				alert(Joomla.JText._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE'));
			}
			else {
				Joomla.submitform(pressbutton);
			}
		}

	});

})();

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