CoreFiles by mySites.guru
admin-users-mail-es5.js36 lines, 1,264 bytes, from Joomla_4.3.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.2.0-alpha3
md5
8f7935fd26d0d127a7a1c687be993db8
sha1
758fecf83291135e60755edb7214a080278c5e2a
sha256
e18070f07cc470434d7a692fc6efb84b9c62186bf9e693f9ebbc5cb0fc7d45fd
(function () {
  'use strict';

  /**
   * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   */

  (function () {
    document.addEventListener('DOMContentLoaded', function () {
      Joomla.submitbutton = function (pressbutton) {
        var form = document.adminForm;
        var html = document.createElement('joomla-alert');
        if (pressbutton === 'mail.cancel') {
          Joomla.submitform(pressbutton);
          return;
        }

        // do field validation
        if (form.jform_subject.value === '') {
          html.innerText = Joomla.Text._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT');
          form.insertAdjacentElement('afterbegin', html);
        } else if (form.jform_group.value < 0) {
          html.innerText = Joomla.Text._('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP');
          form.insertAdjacentElement('afterbegin', html);
        } else if (form.jform_message.value === '') {
          html.innerText = Joomla.Text._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE');
          form.insertAdjacentElement('afterbegin', html);
        } else {
          Joomla.submitform(pressbutton);
        }
      };
    });
  })();

})();

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