-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
171 lines (165 loc) · 6.24 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style="background-image:url('img/Feed_bg.jpg')">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-left">
<li><a href="#"><span class="glyphicon glyphicon-italic" style="font-size:20px;"></span></a></li>
</ul>
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a>
</li>
<li><a href="#">People</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="clearfix">
<h3 align="center">We would love to <br> hear from you</h3>
</div>
<div class="clearfix" id="FormDiv">
<div class="col-md-6 col-sm-offset-3">
<div class="clearfix">
<div id="content-alert" class="hidden col-md-12"><i class="fa fa-exclamation-circle" aria-hidden="true" style="border: 1px solid black; background-color: #2F4F4F;color: white; padding: 10px; font-size: large;">Please complete the form and try again</i></div>
</div>
<div class="clearfix">
<div class="loginDiv">
<form id="commentForm">
<div class="form-group col-md-6">
<input type="text" class="form-control" id="Fname" name="Fname" placeholder="First name" >
<span class="hidden form-control-feedback glyphicon glyphicon-ok"></span>
</div>
<div class="form-group col-md-6">
<input type="text" class="form-control" id="Lname" name="Lname" placeholder="Last Name">
<span class="hidden form-control-feedback glyphicon glyphicon-ok"></span>
</div>
<div class="form-group col-md-6">
<input type="email" class="form-control" id="email" name="email" placeholder="your email address">
<span class="hidden form-control-feedback glyphicon glyphicon-ok"></span>
</div>
<div class="form-group col-md-6">
<input type="text" class="form-control" id="Pnum" name="Pnum" placeholder="your phone number (optional)">
<span class="hidden form-control-feedback glyphicon glyphicon-ok"></span>
</div>
<div class="form-group col-md-12">
<input type="text" class="form-control" id="message" name="message" placeholder="your message" style="padding: 12px">
<span class="hidden form-control-feedback glyphicon glyphicon-ok"></span>
</div>
</div>
<br />
<br />
<div class="form-group col-md-12" align="center">
<button type="submit" class="btn btn-default btn-lg round submitButton">Send</button>
</div>
</form>
</div>
</div>
</div>
<div class="clearfix hidden" id="thankYouDiv">
<div class="col-md-6 col-sm-offset-3" style="border: 1px solid #000;padding: 8px; background-color: #708090;padding: 8px; font-size: larger;" >
<p><i class="fa fa-check-circle" aria-hidden="true" ></i>Thank you, We have received your message</p>
</div>
</div>
</div>
<nav class="navbar navbar-inverse navbar-fixed-bottom">
<!-- <div class="container-fluid">
<div class="navbar-header"> -->
<!-- <a class="navbar-brand" href="#"></a> -->
<div class="col-sm-12">
<div class="col-md-4">
</div>
<div class="col-md-4">
<div class="image-center" style="text-align: center;">
<i class="fa fa-facebook" style="font-size:24px;color:white;margin-right:12px"></i>
<i class="fa fa-twitter" style="font-size:24px;color:white;margin:12px"></i>
<i class="fa fa-instagram" style="font-size:24px;color:white;margin-left: 12px"></i>
</div>
</div>
<div class="col-md-4">
</div>
</div>
<!-- </div>
</div> -->
</nav>
</body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#commentForm').validate({ // initialize the plugin
rules: {
Fname: {
required: true,
minlength: 2,
},
Lname: {
required: true,
minlength: 2
},
email: {
required: true,
email: true
},
Pnum: {
required: true,
minlength: 2
},
message: {
required: true,
minlength: 2,
}
},
messages: {
Fname: "We need your firstname",
Lname: "We need your lastname",
email: "Please use a valid email address",
Pnum: "Enter your phone number",
message:"Sorry ,your message can't be empty"
},
highlight: function (element) {
$(element).nextAll('.form-control-feedback').removeClass('hidden');
$(element).nextAll('.form-control-feedback').removeClass('glyphicon-ok');
$(element).nextAll('.form-control-feedback').addClass('glyphicon-remove');
},
unhighlight: function (element) {
$(element).nextAll('.form-control-feedback').removeClass('hidden');
$(element).nextAll('.form-control-feedback').removeClass('glyphicon-remove');
$(element).nextAll('.form-control-feedback').addClass('glyphicon-ok');
},
submitHandler: function (form) {
console.log('success');
return true; // only for demo
}
});
$(document).on('click','.submitButton',function(e){
//console.log('fff');
if($("#commentForm").valid()){
e.preventDefault();
$('#FormDiv').addClass('hidden');
$('#thankYouDiv').removeClass('hidden');
}else{
$('#content-alert').removeClass('hidden');
}
})
})
</script>
</html>