Repository navigation
Expand file tree
/
Copy pathcontact.html
More file actions
205 lines (195 loc) · 10.8 KB
/
Copy pathcontact.html
File metadata and controls
205 lines (195 loc) · 10.8 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Contact | MetaCIH Collaborative Network</title>
<!-- Favicon-->
<link rel="apple-touch-icon" sizes="57x57" href="/assets/favicon/favicon.ico">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap icons-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&family=Orbitron&family=Signika:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<!-- Cookie alert CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.css" />
<!-- fontawesome icons--> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- navbar footer script -->
<script src="/js/renderNavFooter.min.js" defer></script>
</head>
<body class="d-flex flex-column h-100 bg-boreal">
<main class="flex-shrink-0">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-light bg-boreal shadow"
style="position: relative; border-bottom: 0.5px solid var(--dgps-boreal-dark);">
<div id="navbar-inner" class="row w-100 align-items-center">
</div>
</nav>
<!-- Section 1-->
<section id="contact" class="py-5 bg-white">
<div id="contact-box" class="container px-5">
<!-- Contact form -->
<div class="bg-light rounded-3 py-5 px-4 px-md-5 mb-5">
<div class="text-center mb-5">
<h1 class="fw-normal text-serif">Contact</h1>
<div class="container fluid" style="max-width: 700px;">
<p class="lead fw-normal text-muted mb-0">If you have questions, problems, or requests concerning the MetaCIH evidence collections, send us a message using the form below.</p>
</div>
</div>
<div class="row gx-5 justify-content-center">
<div class="col-lg-8">
<div id="contact-alert" class="alert alert-success d-none" role="alert"></div>
<form id="contactForm" action="#" method="POST" novalidate>
<!-- Disable captcha challenge on FormSubmit -->
<input type="hidden" name="_captcha" value="false">
<!-- Subject line for the email you receive -->
<input type="hidden" name="_subject" value="MetaCIH Contact Form Submission">
<!-- Honeypot anti-spam field (should stay empty; bots often fill it) -->
<input type="text" name="_honey" style="display:none">
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input class="form-control" id="name" name="name" type="text" placeholder="Your name" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input class="form-control" id="email" name="email" type="email" placeholder="name@example.com" required>
</div>
<div class="mb-3">
<label for="subject" class="form-label">Subject</label>
<input class="form-control" id="subject" name="subject" type="text" placeholder="Subject" required>
</div>
<div class="mb-3">
<label for="message" class="form-label">Message</label>
<textarea class="form-control" id="message" name="message" rows="6" placeholder="Type your message here..." required></textarea>
</div>
<div class="d-grid">
<button class="btn btn-primary btn-lg" id="submitButton" type="submit">Send message</button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Disclaimer -->
<section class="bg-white disclaimer disclaimer-db \*slide-in*\" style="border-top: 0.5px solid var(--dgps-boreal);">
<div class="container px-5">
<div class="row gx-5 align-items-left justify-content-left text-muted" style="
font-size: 13px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 28px;
">
This website is intended for healthcare professionals.
</div>
</div>
</section>
<!-- Footer-->
<footer id="footer" class="bg-boreal py-5 mt-auto footer-db">
</footer>
<!-- Bootstrap-Cookie-Alert -->
<div class="alert text-center cookiealert" role="alert">
<i class="fa-solid fa-cookie-bite"></i> We use <b>cookies</b> to ensure you get the best experience on our
website.
<a href="/privacy.html" target="_blank">Learn more</a>
<button type="button" class="btn btn-primary btn-sm acceptcookies">
I agree
</button>
</div>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="/js/scripts.js"></script>
<!-- Render team JS-->
<script src="/js/renderTeam.js"></script>
<!-- Cookie alert-->
<script src="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.js" defer></script>
<script>
/*
* Contact form submission (JSON + fetch)
* - Prevents navigation away from the page (no redirects)
* - Shows success or error status in the on-page alert box
* - Disables the submit button during the request to avoid double submits
*/
(function () {
// Grab references to the form, the submit button, and the alert box
var form = document.getElementById('contactForm');
var submitBtn = document.getElementById('submitButton');
var alertBox = document.getElementById('contact-alert');
if (!form) return;
// Intercept the native submit and send the data with fetch as JSON
form.addEventListener('submit', async function (ev) {
ev.preventDefault();
// Prevent double submissions
if (submitBtn) submitBtn.disabled = true;
if (alertBox) {
// Reset and hide any previous alert
alertBox.classList.add('d-none');
alertBox.classList.remove('alert-danger');
alertBox.classList.add('alert-success');
}
try {
// Build request payload from visible form fields as JSON
const fd = new FormData(form);
const payload = Object.fromEntries(fd.entries());
// Send JSON to FormSubmit AJAX endpoint for your email address
// Note: FormSubmit requires Accept: application/json; we also send
// Content-Type: application/json because we're posting JSON (not FormData)
const res = await fetch('https://formsubmit.co/ajax/nikole_giovannone@brown.edu', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
const data = await res.json();
// If FormSubmit returns an error, surface their message to the user
if (!res.ok) throw new Error(data && (data.message || data.error) || 'Request failed');
if (alertBox) {
alertBox.textContent = 'Thank you! Your message has been sent successfully. We will get back to you shortly.';
alertBox.classList.remove('d-none');
}
form.reset();
} catch (e) {
if (alertBox) {
// Switch to a danger alert and display the error text
alertBox.classList.remove('d-none');
alertBox.classList.remove('alert-success');
alertBox.classList.add('alert-danger');
alertBox.textContent = 'Error: ' + (e && e.message ? e.message : 'There was a problem sending your message. Please try again later.');
}
} finally {
// Re-enable the submit button either way
if (submitBtn) submitBtn.disabled = false;
}
});
})();
</script>
</body>
</html>