forked from CodeiatioOrganization/Freppn-App-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.html
208 lines (190 loc) · 6.49 KB
/
feedback.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Feedback For Freppn-App-Website</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<style>
body {
background-color: #000;
}
html,
body {
height: 100%;
}
.imagebg {
background-image: url("images/mixing-desk-351478_1920.jpg");
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-attachment: fixed;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
-webkit-filter: blur(3px);
filter: blur(3px);
opacity: 0.6;
filter: alpha(opacity=60);
}
.form-container
{
background-color: #fff;
box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 20px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.3);
border-radius: 8px;
font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
</style>
<script>
$(function()
{
function after_form_submitted(data)
{
if(data.result == 'success')
{
$('form#reused_form').hide();
$('#success_message').show();
$('#error_message').hide();
}
else
{
$('#error_message').append('<ul></ul>');
jQuery.each(data.errors,function(key,val)
{
$('#error_message ul').append('<li>'+key+':'+val+'</li>');
});
$('#success_message').hide();
$('#error_message').show();
//reverse the response on the button
$('button[type="button"]', $form).each(function()
{
$btn = $(this);
label = $btn.prop('orig_label');
if(label)
{
$btn.prop('type','submit' );
$btn.text(label);
$btn.prop('orig_label','');
}
});
}//else
}
$('#reused_form').submit(function(e)
{
e.preventDefault();
$form = $(this);
//show some response on the button
$('button[type="submit"]', $form).each(function()
{
$btn = $(this);
$btn.prop('type','button' );
$btn.prop('orig_label',$btn.text());
$btn.text('Sending ...');
});
$.ajax({
type: "POST",
url: 'https://github.com/ananthuc73/Freppn-App-Website/edit/master/feedback.html',
data: $form.serialize(),
success: after_form_submitted,
dataType: 'json'
});
});
});
</script>
<style>
#orig_article_block {
position:fixed;
left:0px;
bottom:0px;
height:60px;
width:100%;
background:#222;
color:#fff;
padding: 10px;
}
#orig_article_block a
{
color:#fff;
text-decoration: underline;
}
/* IE 6 */
* html #orig_article_block {
position:absolute;
top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}
</style>
</head>
<body >
<div class="container">
<div class="imagebg"></div>
<div class="row " style="margin-top: 50px">
<div class="col-md-6 col-md-offset-3 form-container">
<h2>Feedback</h2>
<p>
Please provide your feedback below:
</p>
<form role="form" method="post" id="reused_form">
<div class="row">
<div class="col-sm-12 form-group">
<label>How do you rate your overall experience?</label>
<p>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience" value="bad" >
Bad
</label>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience" value="average" >
Average
</label>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience" value="good" >
Good
</label>
</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<label for="comments">
Comments:</label>
<textarea class="form-control" type="textarea" name="comments" id="comments" placeholder="Your Comments" maxlength="6000" rows="7"></textarea>
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group">
<label for="name">
Your Name:</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="col-sm-6 form-group">
<label for="email">
Email:</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<button type="submit" class="btn btn-lg btn-warning btn-block" >Post </button>
</div>
</div>
</form>
<div id="success_message" style="width:100%; height:100%; display:none; ">
<h3>Successfully posted your feedback!</h3>
</div>
<div id="error_message"
style="width:100%; height:100%; display:none; ">
<h3>Error</h3>
Sorry there was an error sending your form.
</div>
</div>
</div>
</div>
</body>
</html>