-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathleuven2023_registration.html
112 lines (94 loc) · 5.17 KB
/
leuven2023_registration.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
layout: default
title: Workshop registration
permalink: /workshop2023/registration
---
<div class="home">
<h1>MRtrix Workshop Registration</h1>
<p>Please fill out the form below to sign up for the MRtrix Workshop 2023 in Leuven, Belgium. After submitting the form, you will be redirected to the payment website. We will confirm your registration by email within one week. If you encounter any issues, please contact us at <a href="mailto:[email protected]">[email protected]</a></p>
<p><b><i>We have reached the maximum number of participants.</i></b> You can fill out the form below to put your name on the <i>waiting list</i>; we will let you know if we have availability.</p>
<form
method="POST"
action="https://script.google.com/macros/s/AKfycbwdpUXXfPFyBYUTJwXMpq3R7uU_XPIsjyIPTY2p97b68R1LiGy2Gy8xF3DosxuERZ3l8w/exec"
id="registration-form"
>
<p><label for="fn">First name:</label> * <input id="fn" name="First Name" type="text" required></p>
<p><label for="ln">Last name:</label> * <input id="ln" name="Last Name" type="text" required></p>
<p><label for="email">Email address:</label> * <input id="email" name="Email" type="email" size=50 required></p>
<p><label for="aff">Affiliation:</label> * <input id="aff" name="Affiliation" type="text" size=50 required></p>
<p><label for="address">Address:</label> * <input id="address" name="Address" type="text" size=50 required></p>
<p><label for="city">City:</label> * <input id="city" name="City" type="text" size=50 required></p>
<p><label for="country">Country:</label> * <input id="country" name="Country" type="text" required></p>
<p>
<label for="rate">Rate:</label> *
<select id="rate" name="Rate" required>
<option value="Student">Student (€ 500)</option>
<option value="Post-doc">Academic (€ 800)</option>
<option value="Industry">Industry (€ 1200)</option>
</select>
</p>
<p>
<label for="pay">Preferred payment method:</label> *
<select id="pay" name="Payment" required>
<option value="Card">Credit/debit card</option>
<option value="Invoice">Invoice</option>
</select><br />
(Please note that we will <i>not</i> be able to send you an invoice later if you pay by card.)
</p>
<p>
<input id="ads" name="ADS" type="checkbox" value="Yes">
<label for="ads">I am a PhD student at the KU Leuven Arenberg Doctoral School (Science & Technology).</label>
</p>
<p>
<input id="visa" name="Visa" type="checkbox" value="Yes">
<label for="visa">I request a letter of support for a travel visa application.</label>
</p>
<p><label for="diet">Dietary preferences:</label> <input id="diet" name="Dietary" type="text"></p>
<p><label for="comm">Do you have any comments or requests?</label><br /> <textarea id="comm" name="Comments" rows=4 cols=50></textarea></p>
<p>* <input id="terms" name="Terms" type="checkbox" value="Accept" required> <label for="terms">I accept the <a href="https://www.kuleuven.be/onderwijs/levenslangleren/permanentevorming/Docs/generalterms">General Terms and Conditions for Continuing Education at KU Leuven</a>.</label></p>
<p><button type="submit">Register now!</button></p>
</form>
<div id="output-node"></div>
<script type = "text/javascript">
window.addEventListener("load", function() {
const form = document.getElementById('registration-form');
var outputDiv = document.getElementById("output-node");
form.addEventListener("submit", function(e) {
e.preventDefault();
const data = new FormData(form);
const action = e.target.action;
fetch(action, {
method: 'POST',
body: data,
})
.then(response => response.json())
.then(function(res) {
if (res.result === 'success') {
var outputmessage = '<p>Your name has been added to the <i>waiting list</i>. We will contact you if a spot opens up.</p>';
/*
var outputmessage = '<p>Your registration has been recorded successfully.</p>';
// data processing
var amount = (data.get("Rate") === "Industry") ? 1200 : 800;
if (data.get("Rate") === "Student") {
amount = 500;
outputmessage += '<p>Please email a student verification letter to <a href="mailto:[email protected]">[email protected]</a></p>';
}
var message = "Registration " + data.get("First Name") + " " + data.get("Last Name");
var link = encodeURI("http://www.kuleuven.be/sapredir/onlinebetaling?taal=en-US&ges_mededeling=400/0023/82805&amount=" + amount + "&omschrijving=" + message);
if (data.get("ADS")) {
outputmessage += '<p>We have limited number of waivers available for ADS students. You do not need to pay the registration fee until we have processed your application.</p>';
} else {
if (data.get("Payment") === "Invoice") {
outputmessage += '<p>We will send you the invoice, including payment instructions, by email.</p>'
} else {
outputmessage += '<p>Please proceed to the following page to pay the registration fee (€' + amount + '): <a href="' + link + '">Payment Link.</a></p>';
}
}
*/
outputDiv.innerHTML = outputmessage;
}
})
});
});
</script>
</div>