CoreFiles by mySites.guru
admin-users-mail-es5.js36 lines, 1,260 bytes, from Joomla_4.0.0-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 3.10.12-rc1
md5
7e2341cf1526246c5f0303be0455159e
sha1
b291892f54932b6b2bc86ab4c96af8b70b40e28b
sha256
cb45e83fa78c84c98dd2a8e380e6fb89ea01a5a07af20c9555afa0df52ade3be
(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.JText._('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT');
          form.insertAdjacentElement('afterbegin', html);
        } else if (form.jform_group.value < 0) {
          html.innerText = Joomla.JText._('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP');
          form.insertAdjacentElement('afterbegin', html);
        } else if (form.jform_message.value === '') {
          html.innerText = Joomla.JText._('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.