Hi Mark, I'm in The Gap, Brisbane, I've had an oven for over 12 years. I've got lots of stories and a few tips. Give me a call if you are interested. Ph 0413 628 747
`;
document.body.appendChild(customContainer);
// Show the container
customContainer.style.display = 'block';
// If the content contains scripts, ensure they execute
var scripts = customContainer.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i++) {
var oldScript = scripts[i];
var newScript = document.createElement('script');
// Copy attributes
for (var j = 0; j < oldScript.attributes.length; j++) {
var attr = oldScript.attributes[j];
newScript.setAttribute(attr.name, attr.value);
}
// Copy content
newScript.innerHTML = oldScript.innerHTML;
// Replace the old script with the new one
oldScript.parentNode.replaceChild(newScript, oldScript);
}
}
var subscribeUrl = "/api/subscribe/"
$('#subscribeModalForm').submit(function(event){
event.preventDefault();
$('#subscribeModalInputFeedback').text("")
$('#subscribeModalInput').removeClass("is-invalid")
var first_name = $('#subscribeNameModalInput').val()
var email = $('#subscribeModalInput').val()
var payload = { 'email': email, 'first_name': first_name, 'podcast': '13221330789327' }
$.post(subscribeUrl, payload).done((res) => {
$('#emailModal').modal('hide')
}).fail((xhr, status, error) => {
var err = xhr.responseJSON
if(!err.errors) {
return
}
if('email' in err.errors) {
$('#subscribeModalInput').addClass("is-invalid")
$('#subscribeModalInputFeedback').text(err.errors.email.join(', '));
}
})
})
});