CoreFiles by mySites.guru
joomla-field-send-test-mail.min.js1 lines, 1,526 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
f8992f18e7c4206354b0d109b6c5b879
sha1
f883b3e6f2e8c502165e51be191fb918a2b9b4a2
sha256
5c802f8d3f172366ce5ee7f1c9db335c8f53b2847334bd0e84c822d9fbbbe85f
((a,e)=>{class m extends HTMLElement{constructor(){if(super(),!e)throw new Error("Joomla API is not properly initiated");if(!this.getAttribute("uri"))throw new Error("No valid url for validation")}connectedCallback(){const t=this,s=document.getElementById("sendtestmail");s&&s.addEventListener("click",()=>{t.sendTestMail(t)})}sendTestMail(){const t={smtpauth:document.getElementById("jform_smtpauth1").checked?1:0,smtpuser:this.querySelector('[name="jform[smtpuser]"]').value,smtphost:this.querySelector('[name="jform[smtphost]"]').value,smtpsecure:this.querySelector('[name="jform[smtpsecure]"]').value,smtpport:this.querySelector('[name="jform[smtpport]"]').value,mailfrom:this.querySelector('[name="jform[mailfrom]"]').value,fromname:this.querySelector('[name="jform[fromname]"]').value,mailer:this.querySelector('[name="jform[mailer]"]').value,mailonline:document.getElementById("jform_mailonline1").checked?1:0},s=this.querySelector('[name="jform[smtppass]"]');s.disabled===!1&&(t.smtppass=s.value),e.removeMessages(),e.request({url:this.getAttribute("uri"),method:"POST",data:JSON.stringify(t),perform:!0,headers:{"Content-Type":"application/json"},onSuccess:o=>{let r;try{r=JSON.parse(o)}catch(n){console.error(n)}typeof r.messages=="object"&&r.messages!==null&&e.renderMessages(r.messages),document.body.scrollIntoView({behavior:"smooth"})},onError:o=>{e.renderMessages(e.ajaxErrorsMessages(o)),document.body.scrollIntoView({behavior:"smooth"})}})}}a.define("joomla-field-send-test-mail",m)})(customElements,Joomla);

The same content is in 168 releases, Joomla 4.4.1-rc1 to 6.2.0-beta1. See them all, or every version of this file.