Sitemap

Stay Connected

Contact Us

Gentle Venture's Training Center

[email protected]

602-412-8497

 
×

GET $100 OFF OF ANY COURSE BY USING THE PROMO CODE 'stayhealthy'

Once enrolled all students get a -50% discount for all other courses and classes!

All students receive FREE LIFETIME MENTORSHIP
; } } class NewsletterModal extends React.Component{ constructor(props){ super(props) this.state = {name: '', email: '', newsletterSent: false, errorNewsletterSent: false}; this.onNameChange = this.onNameChange.bind(this) this.onEmailChange = this.onEmailChange.bind(this) this.clickedSubmit = this.clickedSubmit.bind(this) } onNameChange(e){ this.setState({name: e.target.value}) } onEmailChange(e){ this.setState({email: e.target.value}) } validateEmail(email){ //^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-][email protected][a-zA-Z0-9-]+\.[a-zA-Z0-9-]+ //if (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-][email protected][a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email)){ //if (/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-][email protected][a-zA-Z0-9-]+\.[a-zA-Z0-9-]+$/.test(email)){ //[^@ \t\r\n][email protected][^@ \t\r\n]+\.[^@ \t\r\n]+ if (/[^@ \t\r\n][email protected][^@ \t\r\n]+\.[^@ \t\r\n]{2,}?/.test(email)){ return true; } return false } validateName(name){ if(name && name.length > 2){ return true } return false } clickedSubmit(e){ e.preventDefault(); var newPromise = postNewsletterForm(this.state.name, this.state.email); newPromise.then( (result) => { this.setState({newsletterSent: true, errorNewsletterSent:false }) }).catch(()=>{ this.setState({errorNewsletterSent:true }) }) } render(){ var isEmailValid = this.validateEmail(this.state.email) var isNameValid = this.validateName(this.state.name) var showNameLabel = this.state.name.length > 0 var showEmailLabel = this.state.email.length > 0 var showNameLabel = isNameValid || !showNameLabel var showEmailLabel = isEmailValid || !showEmailLabel var emailBorderColor = showEmailLabel? "#65cfa8" : "#e75654" var nameBorderColor = showNameLabel? "#65cfa8" : "#e75654" var disableSubmitButton = (!isNameValid || !isEmailValid) || this.state.newsletterSent return
×

STAY IN TOUCH

Sign up to receive useful tips and the most recent information in the newborn care industry

#spamsucks - We only send relevant content to our subscribers

Thank you!

; } } class DiscountsHoverButton extends React.Component{ constructor(props){ super(props); } render (){ return

} } class NewsletterHoverButton extends React.Component{ constructor(props){ super(props); } render (){ return

} } function postNewsletterForm(name, email) { var prefix = get_link_prefix() var url = prefix+"//gentleventures.com/" var params = new URLSearchParams() params.append('form[Name]', name) params.append('form[Email]', email) params.append('form[Submit]', 'Submit') params.append('form[formId]', '7') params.append('my_name', '') /*var st = Math.round(O_timestamp * 10) / 10 */ var st = O_timestamp //params.append('2d4fdb6e0ddb2c8dde7b6261a6f2b5f9', '1613259311.0') //console.log('1613259311.0'+ " " +st.toFixed(1)) var nesto = document.querySelectorAll('[name="2d4fdb6e0ddb2c8dde7b6261a6f2b5f9"]'); console.log(nesto) var prc if(nesto.length==0){ prc = '1613911722.0' console.log("nismo nasli tag") } else { prc = nesto[0].getAttribute("value") console.log("tag prc je "+prc) } //prc = '1613911742.0' prc = Math.round(st).toFixed(0)+ ".0" console.log("PRC IS "+prc + " "+'1613911742.0') params.append('2d4fdb6e0ddb2c8dde7b6261a6f2b5f9', prc) var config = { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } var promise = new Promise((resolve, reject) => { axios.post(url, params, config) .then((result) => { // Do somthing resolve(result) }) .catch((err) => { reject(err) // Do somthing }) }) return promise } function get_link_prefix(){ var url = window.location.href var arr = url.split("/"); return arr[0] } function urlToGuruCart(courseId, promocode = "stayhealthy") { var prefix = get_link_prefix() var url = prefix+"//gentleventures.com/index.php?option=com_guru&controller=guruPrograms&task=buy_action&course_id="+courseId+"&promocode="+promocode location.href = url } class App extends React.Component{ constructor(props){ super(props); this.state = {showNewsletterModal : false, showDiscountModal : false} } newsletterClicked(){ this.setState({showNewsletterModal: true}) } newsletterClosed(){ this.setState({showNewsletterModal: false}) } discountsClicked(){ this.setState({showDiscountModal:true}) } discountsClosed(){ this.setState({showDiscountModal:false}) } render(){ return
} } ReactDOM.render( , document.getElementById("ReactComponent")) console.log("after react dom")