CoreFiles by mySites.guru
joomla-field-send-test-mail-es5.min.js1 lines, 2,954 bytes, from Joomla_4.3.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.3.0-beta1
md5
7fb86c35bbe35ff2e50b878cee43c75a
sha1
efd396340f62f1b928029fc02537b1c629b614de
sha256
cca232c7a3304eb54ad611c4f5c1638a88243914c82db460c60c771a6baace73
!function(){"use strict";function e(t){return e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e(t)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function o(e,n,s){return o=r()?Reflect.construct.bind():function(e,r,o){var n=[null];n.push.apply(n,r);var s=new(Function.bind.apply(e,n));return o&&t(s,o.prototype),s},o.apply(null,arguments)}function n(r){var s="function"==typeof Map?new Map:void 0;return n=function(r){if(null===r||(n=r,-1===Function.toString.call(n).indexOf("[native code]")))return r;var n;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==s){if(s.has(r))return s.get(r);s.set(r,u)}function u(){return o(r,arguments,e(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),t(u,r)},n(r)}!function(e,r){var o=function(e){var o,n;function s(){var t;if(t=e.call(this)||this,!r)throw new Error("Joomla API is not properly initiated");if(!t.getAttribute("uri"))throw new Error("No valid url for validation");return t}n=e,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,t(o,n);var u=s.prototype;return u.connectedCallback=function(){var e=this,t=document.getElementById("sendtestmail");t&&t.addEventListener("click",(function(){e.sendTestMail(e)}))},u.sendTestMail=function(){var e={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},t=this.querySelector('[name="jform[smtppass]"]');!1===t.disabled&&(e.smtppass=t.value),r.removeMessages(),r.request({url:this.getAttribute("uri"),method:"POST",data:JSON.stringify(e),perform:!0,headers:{"Content-Type":"application/json"},onSuccess:function(e){var t;try{t=JSON.parse(e)}catch(e){console.error(e)}"object"==typeof t.messages&&null!==t.messages&&r.renderMessages(t.messages),document.body.scrollIntoView({behavior:"smooth"})},onError:function(e){r.renderMessages(r.ajaxErrorsMessages(e)),document.body.scrollIntoView({behavior:"smooth"})}})},s}(n(HTMLElement));e.define("joomla-field-send-test-mail",o)}(customElements,Joomla)}();

The same content is in 6 releases, Joomla 4.3.0-alpha1 to 4.3.0-beta3. See them all, or every version of this file.