CoreFiles by mySites.guru
admin-users-mail.js37 lines, 1,224 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
7ba1e05ca4f92d0d94498a44d0055826
sha1
44dfde0fd013c3fb945e9bd76e022bc45843ab42
sha256
61482a4c0b07941bcc7bf8772b073c55c2e32fde1ccbfeaefc10253e893bbe67
/**
* 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 - 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 === '') {
        // TODO replace with joomla-alert
        alert(Joomla.JText._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT'));
      } else if (Joomla.getSelectedValue('adminForm', 'jform[group]') < 0) {
        // TODO replace with joomla-alert
        alert(Joomla.JText._('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP'));
      } else if (form.jform_message.value === '') {
        // TODO replace with joomla-alert
        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.