SPS' V3 templates. Updated Harri's templates too to update the workato endpoints.
This commit is contained in:
@ -53,7 +53,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<style>
|
||||
.np-account {
|
||||
background: #F7F7FE;
|
||||
@ -106,17 +106,17 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
const form = document.getElementById('name-form');
|
||||
|
||||
|
||||
form.addEventListener('input', () => {
|
||||
const firstName = document.querySelector('#first-name').value;
|
||||
const lastName = document.querySelector('#last-name').value;
|
||||
const button = document.querySelector('button');
|
||||
button.disabled = !(firstName.length > 0 && lastName.length > 0);
|
||||
});
|
||||
|
||||
|
||||
addEventListener('DOMContentLoaded', () => {
|
||||
let defaultLastName = "{{ current_person.last_name }}";
|
||||
let splitName = defaultLastName.split(' ');
|
||||
@ -129,13 +129,13 @@
|
||||
document.querySelector('button').disabled = true;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
form.addEventListener('submit', (event) => {
|
||||
event.preventDefault();
|
||||
const firstName = document.getElementById('first-name').value;
|
||||
const lastName = document.getElementById('last-name').value;
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'https://www.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/pipedrive-sso-setup-first-and-last-name');
|
||||
xhr.open('POST', 'https://webhooks.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/pipedrive-sso-setup-first-and-last-name');
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
"first-name": firstName,
|
||||
|
||||
Reference in New Issue
Block a user