-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
658 lines (583 loc) · 33.2 KB
/
index.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="contact form example">
<title>Amazon Turk Survey</title>
</head>
<body>
<h2 class="content-head is-center">Amazon Turk Survey</h2>
<center>
<aside class="page">
<p>
Read the instructions carefully. You must answer every question on each page in order to proceed through the survey.
</p>
<p>
Upon successful completion of the survey, you will be directed to a confirmation page with a reward code that you should copy and paste back into Amazon Turk.
</p>
</aside>
</center>
<!-- START HERE -->
<!-- LINKING TO CSS -->
<link href="main.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/dwyl/html-form-send-email-via-google-script-without-server/master/style.css">
<form id="gform"
method="POST"
class="pure-form pure-form-stacked"
action="https://script.google.com/macros/s/AKfycbzOooQ56EMWCjwWr4PlY59iL4E-L2VOoOA0shyHSYGTvlULpTU/exec">
<!-- change the form action to your script url -->
<!--////////// Including Email address so it sends //////////////-->
<fieldset class="pure-group">
<label for="email" style="display: none;">
Email Address:
</label>
<input id="email" name="email" type="email" value="[email protected]" style="display:none;"
required />
</fieldset>
<fieldset class="pure-group">
<label for="id" style="display: none;">
id
</label>
<input id="id" name="id" type="text" value="" style="display:none;"
required />
</fieldset>
<fieldset class="pure-group">
<label for="group" style="display: none;">
group
</label>
<input id="group" name="group" type="text" value="" style="display:none;"
required />
</fieldset>
<script>
if (Math.random() < .5) {
document.getElementById('group').value = 'a'
} else {
document.getElementById('group').value = 'b'
}
console.log(document.getElementById('group').value)
</script>
<!-- ////////////// Select an image //////////////-->
<div id="imagePage">
<fieldset class="pure-group">
<label for="selectedImage" class="prompt"> Select an image which you will proceed to apply an image effect to. <br /><b>You will not be able to change this image after hitting NEXT.</b></label>
<p></p>
<center>
<table>
<tr>
<td>
<label class="hide">
<input id="image1" name="selectedImage" value="https://static.pexels.com/photos/5938/food-salad-healthy-lunch-small.jpg" type="radio" style="display: none;" onchange="displayImage(this.value)">
<img src="https://static.pexels.com/photos/5938/food-salad-healthy-lunch-small.jpg">
</label>
</td>
<td>
<label class="hide">
<input id="image2" name="selectedImage" value="https://static.pexels.com/photos/1358/animal-dog-outside-pet-small.jpg" type="radio" style="display: none;" onchange="displayImage(this.value)">
<img src="https://static.pexels.com/photos/1358/animal-dog-outside-pet-small.jpg">
</label>
</td>
</tr>
<tr>
<td>
<label class="hide">
<input id="image3" name="selectedImage" value="https://static.pexels.com/photos/816/city-sky-skyline-sailboats-small.jpg" type="radio" style="display: none;" onchange="displayImage(this.value)">
<img src="https://static.pexels.com/photos/816/city-sky-skyline-sailboats-small.jpg">
</label>
</td>
<td>
<label class="hide">
<input id="image4" name="selectedImage" value="https://static.pexels.com/photos/26419/pexels-photo-26419-small.jpg" type="radio" style="display: none;" onchange="displayImage(this.value)">
<img src="https://static.pexels.com/photos/26419/pexels-photo-26419-small.jpg">
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<button style="position: absolute; right: 10%; opacity: .7; " id="nextEffects" type="button" class="btn btn-primary" onclick="nextPage('imagePage', 'effectPage')" disabled>
next
</button>
</div>
<!-- ////////////// Select an effect //////////////-->
<div id="effectPage">
<label class="prompt">This is your selected image:</label>
<center>
<img id="activeImg" src="">
</center>
<p></p>
<fieldset class="pure-group">
<label for="selectedEffect" class="prompt"> Select an effect below that you would like to apply to your chosen image:</label>
<center>
<table>
<tr>
<td>
<label class="hide">
<input id="effect1" name="selectedEffect" value="grayscale" type="radio" style="display: none;" onchange="displayEffect(this.value)">
<img src="https://static.pexels.com/photos/108092/pexels-photo-108092-small.jpeg" class="grayscale">
</label>
</td>
<td>
<label class="hide">
<input id="effect2" name="selectedEffect" value="contrast" type="radio" style="display: none;" onchange="displayEffect(this.value)">
<img src="https://static.pexels.com/photos/108092/pexels-photo-108092-small.jpeg" class="contrast">
</label>
</td>
</tr>
<tr>
<td>
<label class="hide">
<input id="effect3" name="selectedEffect" value="blur" type="radio" style="display: none;" onchange="displayEffect(this.value)">
<img src="https://static.pexels.com/photos/108092/pexels-photo-108092-small.jpeg" class="blur">
</label>
</td>
<td>
<label class="hide">
<input id="effect4" name="selectedEffect" value="saturate" type="radio" style="display: none;" onchange="displayEffect(this.value)">
<img src="https://static.pexels.com/photos/108092/pexels-photo-108092-small.jpeg" class="saturate">
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<button style="position: absolute; right: 10%; opacity: .7; " id="nextIntensity" type="button" class="btn btn-primary" onclick="nextPage('effectPage', 'intensityPage')" disabled>
next
</button>
</div>
<!-- ////////////// Select an intensity //////////////-->
<div id="intensityPage">
<label class="prompt">This is your <b>selected image</b> and the <b>effect</b> that you chose to apply to your image, respectively:</label><P></P>
<center>
<img id="targetImg" src="">
<img id="effectImg" src="https://static.pexels.com/photos/108092/pexels-photo-108092-medium.jpeg">
</center>
<p></p>
<fieldset class="pure-group">
<label for="intensity" class="prompt"> How intense do you want the effect to be on your image? </label>
<center>
<table>
<tr>
<td>
<label class="hide">
<input id="low" name="intensity" value="low" type="radio" onchange="displayIntensity(.2)"> <span>Low</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="intensity" value="medium" type="radio" onchange="displayIntensity(.5)"> <span>Medium</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="high" name="intensity" value="high" type="radio" onchange="displayIntensity(.9)"> <span>High</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<button style="position: absolute; right: 10%; opacity: .7; " id="nextFeedback" type="button" class="btn btn-primary" onclick="nextPage('intensityPage', 'feedbackPage')" disabled>
next
</button>
</div>
<!-- ////////////// Feedback Page //////////////-->
<div id="feedbackPage">
<label>This is your <b>selected image</b> and the <b>effect</b> that you chose to apply to your image, respectively:</label><P></P>
<center>
<img id="targetImgfeedback" src="">
<img id="effectImgfeedback" src="https://static.pexels.com/photos/108092/pexels-photo-108092-small.jpeg">
</center>
<p></p>
<label>Here is your image with the applied effect:</label><p>
</p>
<div id="overlay">
<img id="finalImgOverlay" style="position: absolute; z-index: 1;" src="">
<p></p>
<img id="finalImg" style=" z-index: -1;" src="">
</div>
<p> </p>
<aside>
<p></p>
Please mark your agreement with each of the statements below:
<p></p>
</aside>
<p></p>
<!-- Q1 : expectations vs. reality-->
<fieldset class="pure-group">
<label for="expectations1" align="center"> 1) The final edited image looks exactly how I expected it to look. </label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="expectations1" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="expectations1" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations1" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations1" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations1" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q2 : satisfaction with appearance-->
<fieldset class="pure-group">
<label for="satisfaction" align="center"> 2) I am satisfied with how this edited image looks.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="satisfaction" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="satisfaction" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="satisfaction" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="satisfaction" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="satisfaction" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q3 : sense of creative control-->
<fieldset class="pure-group">
<label for="creativecontrol1" align="center"> 3) I had control over the creation of the final edited image.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="creativecontrol1" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="creativecontrol1" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol1" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol1" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol1" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q4 : degree of creative control-->
<fieldset class="pure-group">
<label for="creativecontrolamount" align="center"> 4) I want to be given more control over the image editing process.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="creativecontrolamount" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="creativecontrolamount" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrolamount" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrolamount" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrolamount" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q5 : self identifying as creative-->
<fieldset class="pure-group">
<label for="creativeself" align="center"> 5) I consider myself to be creative.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="creativeself" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="creativeself" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativeself" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativeself" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativeself" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q6 r: expectctions vs. reality-->
<fieldset class="pure-group">
<label for="expectations2" align="center"> 6) The final edited image looks exactly how I expected it to look.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="expectations2" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="expectations2" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations2" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations2" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="expectations2" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q7 r: sense of creative control-->
<fieldset class="pure-group">
<label for="creativecontrol2" align="center"> 7) I had control over the creation of the final edited image.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="creativecontrol2" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="creativecontrol2" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol2" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol2" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="creativecontrol2" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
<!-- Q8 r: sense of ownership-->
<fieldset class="pure-group">
<label for="ownership" align="center"> 8) I feel ownership over the final edited image.</label>
<center>
<table>
<tr>
<td>
<label class="hide agrees">
<input id="low" name="ownership" value="1" type="radio" onchange="validate()"> <span>Strongly Agree</span> <br />
</label>
</td>
<td>
<label class="hide">
<input id="medium" name="ownership" value="2" type="radio" onchange="validate()"> <span>Agree</span> <br />
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="ownership" value="3" type="radio" onchange="validate()"> <span>Neutral</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="ownership" value="4" type="radio" onchange="validate()"> <span>Disagree</span>
</label>
</td>
<td>
<label class="hide agrees">
<input id="high" name="ownership" value="5" type="radio" onchange="validate()"> <span>Strongly Disagree</span>
</label>
</td>
</tr>
</table>
</center>
</fieldset>
</div>
<button id="submit" class="button-success pure-button button-xlarge" onclick="makeid()" disabled>
<i class="fa fa-paper-plane"></i>
Submit
</button>
</form>
<!-- Thankyou Message People See when they submit the form: -->
<div style="display:none;" id="thankyou_message">
<h2><em>You have completed the survey.</em> </h2>
Please fill copy the following UNIQUE code and paste it into Amazon Mechanical Turk:
<p>
<h2 id="code">1234</h2>
</p>
</div>
<!-- Submit the Form to Google Using "AJAX" -->
<script data-cfasync="false" type="text/javascript"
src="https://cdn.rawgit.com/dwyl/html-form-send-email-via-google-script-without-server/master/form-submission-handler.js"></script>
<!-- <script data-cfasync="false" type="text/javascript"
src="/form-submission-handler.js"></script> -->
<!-- END -->
<script>
function displayImage(img) {
var newUrl = img.replace("small", "medium")
document.getElementById('activeImg').src = newUrl
document.getElementById('targetImg').src = newUrl
document.getElementById('finalImg').src = newUrl
document.getElementById('finalImgOverlay').src = newUrl
document.getElementById('targetImgfeedback').src = img
document.getElementById('activeImg').style.display = "block"
document.getElementById('nextEffects').disabled = false
document.getElementById('nextEffects').style.opacity = 1
}
function displayEffect(effect) {
document.getElementById('nextIntensity').disabled = false
document.getElementById('nextIntensity').style.opacity = 1
document.getElementById('effectImg').className = effect
document.getElementById('effectImgfeedback').className = effect
document.getElementById('finalImgOverlay').className = effect
}
function displayIntensity(intensity) {
document.getElementById('nextFeedback').disabled = false
document.getElementById('nextFeedback').style.opacity = 1
document.getElementById('finalImgOverlay').style.opacity = intensity
}
function displayReturned() {
document.getElementbyId('')
}
function nextPage(current, next) {
if (next == 'intensityPage') {
var group = document.getElementById('group').value
if (group == 'a') {
next = 'feedbackPage'
document.getElementById('finalImgOverlay').style.opacity = Math.random();
}
}
if (next == 'feedbackPage') {
document.getElementById('submit').style.display = "block"
}
document.getElementById(current).style.display = "none";
document.getElementById(next).style.display = "block";
}
function validate() {
var toCheck = ['expectations1', 'satisfaction', 'creativecontrol1', 'creativecontrolamount', 'creativeself', 'expectations2', 'creativecontrol2', 'ownership'];
var numQuestions = toCheck.length;
var canSend = false;
// loop through all questions
for (var i = 0; i < numQuestions; i++) {
var answered = false;
var radiobutton = toCheck[i]
var id = document.getElementsByName(radiobutton)
// loop through each question
for (var j = 0; j < 5; j++) {
if (id[j].checked) {
answered = true;
break;
}
}
if (!answered) {
break;
} else if (answered && ((i + 1) == numQuestions)) {
document.getElementById('submit').disabled = false
}
}
}
function makeid() {
document.getElementById('submit').innerHTML = "Loading..."
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( var i=0; i < 7; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
document.getElementById('code').innerHTML = text;
document.getElementById('id').value = text;
}
</script>
</body>
</html>