forked from w3c/smartcities-workshop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
submit.js
34 lines (31 loc) · 1.24 KB
/
submit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*jshint esversion: 6 */
(() => {
const button = document.querySelector('#submit-button');
if (button) addSubmitButtonListener();
function addSubmitButtonListener() {
document.querySelector('#submit-button').onclick = () => {
const name = document.querySelector('#speaker-name').value;
const bio = document.querySelector('#speaker-bio').value;
const title = document.querySelector('#talk-title').value;
const abstract = document.querySelector('#talk-abstract').value;
const subject = `[workshop proposal] ${title}`;
const body = `Hi Program Committee,` +
`\n\n` +
`I would like to submit a talk proposal for the W3C Smart Cities Workshop.` +
`\n\n` +
`Name: ${name}` +
`\n\n` +
`Bio: ${bio}` +
`\n\n` +
`Talk title: ${title}` +
`\n\n` +
`Talk abstract: ${abstract}`+
`\n\n` +
`Best regards,\n${name}`;
window.location.href =
'mailto:[email protected]' +
'?subject=' + encodeURIComponent(subject) +
'&body=' + encodeURIComponent(body);
};
}
})();