-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
119 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: "Ready to get a JobRunr Pro Business Subscription?" | ||
translationKey: "get-jobrunr-pro-business" | ||
summary: "Fill in the form below and all the necessary information to get started will be sent to you!" | ||
skip_meta: true | ||
date: 2022-03-15T11:12:23+02:00 | ||
menu: | ||
main: | ||
identifier: pro-subscription | ||
weight: 18 | ||
--- | ||
|
||
<style> | ||
#subscription-form { | ||
font-size: 90%; | ||
} | ||
#subscription-form dl { | ||
margin: 0 0 1em; | ||
} | ||
#subscription-form dl input[type="text"] { | ||
width: 50%; | ||
} | ||
</style> | ||
|
||
<script type="text/javascript"> | ||
document.addEventListener("DOMContentLoaded", function(event) { | ||
document.getElementById('firstName').focus(); | ||
}); | ||
|
||
function submitForm() { | ||
const firstNameField = document.getElementById('firstName'); | ||
const lastNameField = document.getElementById('lastName'); | ||
const emailField = document.getElementById('email'); | ||
const linkedInField = document.getElementById('linkedIn'); | ||
const companyField = document.getElementById('company'); | ||
|
||
const firstName = firstNameField.value; | ||
const lastName = lastNameField.value; | ||
const email = emailField.value; | ||
const linkedIn = linkedInField.value; | ||
const company = companyField.value; | ||
|
||
if(!firstName || !lastName || !email || !company || !email.includes('@') || !(linkedIn.startsWith('https://linkedin') || linkedIn.startsWith('https://www.linkedin') || linkedIn.startsWith('linkedin.com') || linkedIn.startsWith('www.linkedin.com'))) { | ||
document.getElementById('subscription-form-error').style.display = 'block'; | ||
} else if(linkedIn.includes('sabahat-alikhan')) { | ||
alert("Hey, you prick! Stop spamming this form."); | ||
} else { | ||
document.getElementById('subscription-form-error').style.display = 'none'; | ||
|
||
firstNameField.disabled = true; | ||
lastNameField.disabled = true; | ||
emailField.disabled = true; | ||
linkedInField.disabled = true; | ||
companyField.disabled = true; | ||
document.getElementById('submit-btn').disabled = true; | ||
const subscriptionData = { | ||
firstName: firstName, | ||
lastName: lastName, | ||
email: email, | ||
linkedIn: linkedIn, | ||
company: company | ||
}; | ||
fetch('https://api.jobrunr.io/api/sales/request-subscription', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(subscriptionData)}) | ||
.then(resp => { | ||
if(resp.status === 200) { | ||
document.getElementById('subscription-form').style.display = 'none'; | ||
document.getElementById('subscription-success-response').style.display = 'block'; | ||
} else { | ||
document.getElementById('subscription-form').style.display = 'none'; | ||
document.getElementById('subscription-error-response').style.display = 'block'; | ||
} | ||
}) | ||
.catch(error => { | ||
document.getElementById('subscription-form').style.display = 'none'; | ||
document.getElementById('subscription-error-response').style.display = 'block'; | ||
}); | ||
} | ||
return false; | ||
} | ||
|
||
</script> | ||
|
||
|
||
|
||
<div style="align-self: flex-start; height: 500px; width:600px; max-width: 100%;"> | ||
<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"></script> | ||
<script> | ||
hbspt.forms.create({ | ||
portalId: "145458105", | ||
formId: "ac362edc-723e-4e77-a79e-2ef1af0638c9" | ||
}); | ||
</script> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters