/**
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */((r,n)=>{const a="data-submit-task",o=(e,t)=>{(e==="modules.cancel"||r.formvalidator.isValid(t))&&n(e,t)},s=()=>{r.querySelectorAll(`[${a}]`).forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const c=t.currentTarget.getAttribute(a);o(c,t.currentTarget.form)})})};r.addEventListener("DOMContentLoaded",()=>{s()})})(document,Joomla.submitform);
