-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
executable file
·254 lines (224 loc) · 9.6 KB
/
contact.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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!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>Data4Good Center</title>
<!-- font -->
<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- JQuery to get the values from contact us and run through the API Gateway -->
<script>
function submitToAPI(e) {
e.preventDefault();
var URL = "https://d734ofmb1h.execute-api.us-east-1.amazonaws.com/default/emailfwd";
var Namere = /[A-Za-z]{1}[A-Za-z]/;
if (!Namere.test($("#name").val())) {
alert ("Name can not less than 2 char");
return;
}
var mobilere = /[0-9]{10}/;
if (!mobilere.test($("#phone").val())) {
alert ("Please enter valid mobile number");
return;
}
if ($("#email").val()=="") {
alert ("Please enter your email id");
return;
}
var reeamil = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/;
if (!reeamil.test($("#email").val())) {
alert ("Please enter valid email address");
return;
}
var name = $("#name").val();
var phone = $("#phone").val();
var email = $("#email").val();
var desc = $("#message-input").val();
var data = {
name : name,
phone : phone,
email : email,
desc : desc
};
$.ajax({
type: "POST",
url : "https://d734ofmb1h.execute-api.us-east-1.amazonaws.com/default/emailfwd",
dataType: "json",
crossDomain: "true",
contentType: "application/json; charset=utf-8",
data: JSON.stringify(data),
success: function () {
// clear form and show a success message
alert("Successfull");
document.getElementById("contactForm").reset();
location.reload();
},
error: function () {
// show an error message
alert("UnSuccessfull");
}});
};
</script>
<!-- Google Analytics site tag -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-128264329-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-128264329-1');
</script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark">
<div class="container">
<div class="row justify-content-between">
<div class="col-4">
<a class="navbar-brand" href="index.html"><img class="card-img-top" id="d4gLogo" src="img/placeholders/logo-1.png" alt="Data 4 Good"></a>
</div>
<div class="col-4">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="index.html"><span class="listItemBlackText">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html"><span class="listItemBlackText">About</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html"><span class="listItemBlackText">Contact</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="portfolio-item.html"><span class="listItemBlackText">Projects</span></a>
</li>
<li class="nav-item">
<a class="btn btn-lg btn-secondary btn-block" href="data.html" id="dlData">Download Data</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid">
<div class="spacer"></div>
<h1 class="page-title">Contact Us</h1>
<!-- Content Row -->
<div class="row">
<!-- Map Column -->
<div class="col-lg-8 mb-4">
<!-- Embedded Google Map -->
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2951.9048493618893!2d-83.74241488459279!3d42.28055444811157!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x883cae40746ad639%3A0x9777deab36d450cd!2sSchool+of+Information+at+the+University+of+Michigan!5e0!3m2!1sen!2sus!4v1536935960584" class="w-100 h-100" frameborder="0" style="border:0" allowfullscreen></iframe>
<!--<iframe width="100%" height="400px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=42.280730,-83.740070&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe>-->
</div>
<!-- Contact Details Column -->
<div class="col-lg-4 mb-4">
<br>
<h4>
<b>Data4Good Center</b>
<br>School of Information
<br>4322 North Quad
<br>105 S. State Street
<br>Ann Arbor, MI 48109-1285
</h4>
<br>
<h4>
<abbr title="Phone">P</abbr>: Office: +1 734-764-6367
<br><abbr title="Phone">P</abbr>: Mobile: +1 203-979-5364
</h4>
<h4>
<abbr title="Email">E</abbr>:
<a href="mailto:name@example.com">ehapp@umich.edu
</a>
</h4>
<!--<p>-->
<!--<abbr title="Hours">H</abbr>: Monday - Friday: 9:00 AM to 5:00 PM-->
<!--</p>-->
</div>
</div>
<!-- /.row -->
<!-- Contact Form -->
<!-- In order to set the email address and subject line for the contact form go to the bin/contact_me.php file. -->
<div class="row">
<div class="col-lg-8 mb-4">
<h1>Send us a Message</h1>
<form name="sentMessage" id="contactForm" method="post"> <!--novalidate-->
<div class="control-group form-group">
<div class="controls">
<label>Full Name:</label>
<input type="text" class="form-control" id="name" required data-validation-required-message="Please enter your name.">
<p class="help-block"></p>
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Phone Number:</label>
<input type="tel" class="form-control" id="phone" required data-validation-required-message="Please enter your phone number.">
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Email Address:</label>
<input type="email" class="form-control" id="email" required data-validation-required-message="Please enter your email address.">
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Message:</label>
<textarea rows="10" cols="100" class="form-control" id="message-input" required data-validation-required-message="Please enter your message" maxlength="999" style="resize:none"></textarea>
</div>
</div>
<div id="success"></div>
<!-- For success/fail messages -->
<button type="submit" class="btn btn-primary" onClick=submitToAPI(event) id="sendMessageButton">Send Message</button>
</form>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
<!-- Footer -->
<footer class="py-5 bg-dark">
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<h6 class="m-0 text-white">Partners</h6>
</div>
<div class="col-md-9">
</div>
<div class="row">
<div class="col-md-3">
<img class="rounded mx-auto d-block" id="microsoftLogo" src="img/Microsoft-logo_rgb_gray.png">
</div>
<div class="col-md-3">
<img class="rounded mx-auto d-block" id="nethopeLogo" src="img/NetHope_Logo.png">
</div>
</div>
</div>
<div class="row">
<p class="m-0 text-center text-white">Copyright © University of Michigan School of Information || Data4Good Center 2018</p>
</div>
</div>
<!-- /.container-fluid -->
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Contact form JavaScript -->
<!-- Do not edit these files! In order to set the email address and subject line for the contact form go to the bin/contact_me.php file. -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
</body>
</html>