-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadd.html
More file actions
828 lines (682 loc) · 35.2 KB
/
add.html
File metadata and controls
828 lines (682 loc) · 35.2 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
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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>Database of federal crowdsourcing and citizen science projects, by Commons Lab - Wilson Center</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/datepicker.css" />
<link rel="stylesheet" href="css/cartodb.css" />
<link rel="stylesheet" href="css/leaflet-0.7.3.css" />
<link rel="stylesheet" href="css/leaflet.draw.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/jquery.tree-multiselect.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="css/style.css" />
</head>
<body class="container-fluid">
<header>
<nav class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
<span><a class="current" href="about.html">About The Catalog</a></span>
<span><a class="current" href="add.html">Add A Project</a></span>
<span><a class="current" href="https://www.citizenscience.gov">CitizenScience.gov</a></span>
</div>
</nav>
<section id="hero-intro" class="row">
<a href="https://ccsinventory.wilsoncenter.org/">
<img src="img/Catalog-Gray.png"
style= "float: left" width="200" height="60" hspace="15" vspace="13"/> </a>
<h2>Add A Project</h2>
</section>
</header>
<main id="submit-form" class="row">
<div id="submit-form-div" class="col-md-8 col-md-offset-2">
<div class="well">Welcome to the Catalogue of Federal Crowdsourcing and Citizen Science. Below is a webform for you to fill out entirely. If at any point you do not understand the field, please refer to <span data-original-title="Hover over this for more instruction" class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title=""></span> for more instructions. The information collected will be displayed on a searchable map for the public to use.</div>
<form class="form-horizontal" method="post" action="">
<fieldset>
<legend class="orange"><i class="fa fa-file-text-o"></i>Project Information</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-name">Project Name <span data-toggle="tooltip" title="Give the commonly accepted name for the project." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="project-name" name="project_name" type="text" placeholder="" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-url">Project URL <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Give the address (URL) for the project website. If there is no website, leave blank."></span></label>
<div class="col-md-6">
<input id="project-url" name="project_url" type="text" placeholder="http://" class="form-control input-md" required="">
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-description">Project Description <span data-toggle="tooltip" title="Define the mission statement for the project in a sentence or two." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<textarea class="form-control" id="project-description" name="project_description"></textarea>
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="field">Project topic <span data-toggle="tooltip" title="Check all that apply" class="glyphicon glyphicon-info-sign" class="glyphicon glyphicon-info-sign"></span></label>
<div id="project_topic" class="col-md-4">
</div>
</div>
<!-- Text input-->
<div id="project_topic_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="project-url">Other Project Topic <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other project topic not listed above"></span></label>
<div class="col-md-6">
<input id="project_topic_other" name="project_topic_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label orange" for="keywords">Keywords <span data-toggle="tooltip" title="In addition to any topics checked above, add keywords (separated by a comma) that will help someone find your project on the Internet." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="keywords" name="keywords" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="status">Project Status <span data-toggle="tooltip" title="Give the current status of your project." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<select id="project_status" name="status" class="form-control">
</select>
</div>
</div>
<!-- Text input-->
<div id="project_status_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="project-url">Other Project Status <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other project status not listed above"></span></label>
<div class="col-md-6">
<input id="project_status_other" name="status_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label orange" for="start-date">Project Start Date <span data-toggle="tooltip" title="Give the approximate date that the first grant was issued or the project was first launched." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="start-date" name="start_date" type="text" placeholder="yyyy-mm-dd" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label orange" for="sponsors">Federal Government Sponsor <span data-toggle="tooltip" title="Check all that give primary or partial support." class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<select id="agency_sponsor" name="agency_sponsor" class="form-control" multiple="multiple">
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-url">Other Federal Government Sponsor <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other agency not listed above"></span></label>
<div class="col-md-6">
<input id="agency-sponsor-other" name="agency_sponsor_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="partners">Type of Nonfederal Government Sponsor <span data-toggle="tooltip" title="Check any that apply to a partner that gives financial or in-kind support. If you check 'Other,' then describe the type of partner." class="glyphicon glyphicon-info-sign"></span></label>
<div id="agency_partner" class="col-md-6">
</div>
</div>
<!-- Text input-->
<div id="agency_partner_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="project-url">Other Type of Nonfederal Government Sponsor <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other type of nonfederal government sponsor not listed above"></span></label>
<div class="col-md-6">
<input id="agency_partner_other" name="agency_partner_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-description">Name of Nonfederal Government Sponsors <span data-toggle="tooltip" title="Name of Nonfederal Government Sponsors" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<textarea class="form-control" id="agency_partner_name" name="agency_partner_name"></textarea>
</div>
</div>
<!-- Text input-->
<div id="geographic_scope" class="form-group">
<label class="col-md-4 control-label orange" for="geographic_scope">Geographic Scope <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Geographic scope"></span></label>
<div class="col-md-6">
<input id="geographic_scope" name="geographic_scope" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="participant-age">Participant Age <span data-toggle="tooltip" title="Check all that apply to your project participants. If you check 'Other,' add the missing category or categories." class="glyphicon glyphicon-info-sign"></span></label>
<div id="participant_age" class="col-md-6">
</div>
</div>
<!-- Text input-->
<div id="participant_age_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="project-url">Other Participant Age Range <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other participant age range not listed above"></span></label>
<div class="col-md-6">
<input id="participant_age_other" name="participant_age_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="outcomes">Project Outcomes <span data-toggle="tooltip" title="Check all that apply. If you check 'Other,' write in any additional project outcomes." class="glyphicon glyphicon-info-sign"></span></label>
<div id="intended_outcomes" class="col-md-6">
</div>
</div>
<!-- Text input-->
<div id="intended_outcomes_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="intended-outcomes-other">Other Project Outcomes <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other participant age range not listed above"></span></label>
<div class="col-md-6">
<input id="intended_outcomes_other" name="intended_outcomes_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="sponsors">Participation Tasks <span data-toggle="tooltip" title="Check all that apply. If you check 'Other,' write in any tasks that apply." class="glyphicon glyphicon-info-sign" class="glyphicon glyphicon-info-sign"></span></label>
<div id="participation_tasks" class="col-md-4">
</div>
</div>
<!-- Text input-->
<div id="participation_tasks_other_box" class="form-group" style="display:none;">
<label class="col-md-4 control-label orange" for="participation-tasks-other">Other Participation Tasks <span class="glyphicon glyphicon-info-sign" data-toggle="tooltip" title="Other participant age range not listed above"></span></label>
<div class="col-md-6">
<input id="participation_tasks_other" name="participation_tasks_other" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label for="recruiting" class="col-md-4 control-label orange">Recruiting Volunteers <span class="glyphicon glyphicon-info-sign" title="" data-toggle="tooltip" data-original-title="Check the box if the project is recruiting volunteers."></span></label>
<div class="col-md-6">
<div class="checkbox">
<label for="recruiting">
<input type="checkbox" value="true" id="recruiting" name="recruiting">
Yes, this project is recruiting
</label>
</div>
</div>
</div>
<div class="form-group">
<label for="scistarter" class="col-md-4 control-label orange">Advertise on SciStarter? <span class="glyphicon glyphicon-info-sign" title="" data-toggle="tooltip" data-original-title="Opt in to data sharing with Scistarter.com, an inventory of active projects looking for volunteers"></span></label>
<div class="col-md-6">
<div class="checkbox">
<label for="scistarter">
<input type="checkbox" value="true" id="scistarter" name="scistarter">
Yes
</label>
</div>
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label orange" for="project-description">Types of volunteers <span data-toggle="tooltip" title="Types of volunteers" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<textarea class="form-control" id="types-volunteers" name="types_volunteers"></textarea>
</div>
</div>
</fieldset>
<fieldset>
<legend class="blue"><i class="fa fa-map-marker"></i>Location Information</legend>
<div class="well">
<p>Please enter the address where the project is administered. For example, if your project crowdsources identification of images, then where is the project and its dataset managed? OR if your project conducts water quality monitoring across a tri-state water feature, then where are those data collected and managed?</p>
<p>After you enter an address and click the "Geocode Address" button, a pin will be placed on the map. To move the pin, click the edit button in the map and drag it to the most appropriate location. If you don't have an address, click the pin button on the left side of the map toolbar and place the pin in the most appropriate location.</p>
<p>If the project you are entering is funded only by your agency and all other aspects of the project are conducted on site, then please enter the address location of the project's field/administration site. </p>
</div>
<div class="row">
<div class="col-md-6" id="input-map">
map
</div>
<div class="col-md-6" id="address">
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="geojson">GeoJSON file</label>
<div class="col-md-8">
<input id="the_geom_geojson" type="file" accept=".geojson, .GEOJSON" />
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="street-address">Street Address <span data-toggle="tooltip" title="Physical contact address" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="street-address" name="street_address" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="street-address-2"></label>
<div class="col-md-6">
<input id="street-address-2" name="street_address_2" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="city">City</label>
<div class="col-md-6">
<input id="city" name="city" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="state">State</label>
<div class="col-md-6">
<select id="state" name="state" class="form-control">
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AZ">AZ</option>
<option value="AR">AR</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="GA">GA</option>
<option value="HI">HI</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="IA">IA</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="ME">ME</option>
<option value="MD">MD</option>
<option value="MA">MA</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MS">MS</option>
<option value="MO">MO</option>
<option value="MT">MT</option>
<option value="NE">NE</option>
<option value="NV">NV</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NY">NY</option>
<option value="NC">NC</option>
<option value="ND">ND</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VT">VT</option>
<option value="VA">VA</option>
<option value="WA">WA</option>
<option value="WV">WV</option>
<option value="WI">WI</option>
<option value="WY">WY</option>
<option value="GU">GU</option>
<option value="PR">PR</option>
<option value="VI">VI</option>
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="zip">Zip Code</label>
<div class="col-md-6">
<input id="zip" name="zip" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<div class="form-group">
<div class="col-md-4 col-md-offset-4">
<button type="button" id="geocode" name="geocode" class="btn btn-primary">Geocode Address</button>
</div>
</div>
</div>
</div>
<input type="hidden" name="the_geom" id="latlng" value="">
</fieldset>
<fieldset>
<legend class="light-blue"><i class="fa fa-phone"></i>Contact Information</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="project-contact">Project Contact <span data-toggle="tooltip" title="Name of project contact" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="project-contact" name="project_contact" type="text" placeholder="" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="affiliation">Contact Affiliation <span data-toggle="tooltip" title="Affiliation of project contact" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="affiliation" name="affiliation" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="email">Contact Email <span data-toggle="tooltip" title="Contact email address" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="email" name="email" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="phone">Contact Phone <span data-toggle="tooltip" title="Contact phone number" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="phone" name="phone" type="text" placeholder="123-456-7890" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="gov_contact">Government Contact <span data-toggle="tooltip" title="Government Contact" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="gov_contact" name="gov_contact" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="gov_contact_affiliation">Government Contact Affiliation <span data-toggle="tooltip" title="Government Contact Affiliation" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<select id="gov_contact_affiliation" name="gov_contact_affiliation" class="form-control" multiple="multiple">
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label light-blue" for="gov_contact_email">Government Contact Email <span data-toggle="tooltip" title="Contact email address" class="glyphicon glyphicon-info-sign"></span></label>
<div class="col-md-6">
<input id="gov_contact_email" name="gov_contact_email" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title text-center">That's everything!</h3>
</div>
</div>
<!-- Button -->
<div class="form-group">
<div class="col-md-4 col-md-offset-4">
<button id="submit" name="submit" class="btn btn-primary">Submit Entire Form</button>
</div>
</div>
</fieldset>
</form>
</div>
</main>
<footer>
<div class="row footer-nav">
<div class="col-md-offset-2 col-md-2">
<ul class="list-unstyled">
<li><a href="index.html">Home</a></li>
<li><a href="add.html">Add project</a></li>
<li><a href="about.html">About</a></li>
<li><a href="data-policy.html">Data policy</a></li>
<li><a href="http://www.wilsoncenter.org/privacy-policy">Privacy policy</a></li>
</ul>
</div>
<div class="initiative-by col-md-offset-1 col-md-7">
<p>An initiative led by the Wilson Center in partnership with the General Services Administration (GSA)</p>
<image xlink:href="img/commons_logo.svg" src="img/commons_logo.png"
width="260" height="40" />
<image xlink:href="img/wilson_logo.svg" src="img/wilson_logo.png"
width="260" height="40" />
</div>
</div>
</footer>
<!-- templates -->
<script type="text/template" id="filter-checkbox-tmpl">
<div class="checkbox inline">
<label for="<%- property_code %>">
<input type="checkbox" id="<%- property_code %>" name="<%- property_category %>" value="<%- property_code %>" />
<%- property_name %>
</label>
</div>
</script>
<!-- templates -->
<script type="text/template" id="filter-select-tmpl">
<option value="<%- property_code %>"><%- property_name %></option>
</script>
<!-- templates -->
<script type="text/template" id="other-checkbox-tmpl">
<div class="checkbox inline">
<label for="<%- identifier %>_other_checkbox">
<input type="checkbox" id="<%- identifier %>_other_checkbox" name="<%- identifier %>" value="Other" />
Other
</label>
</div>
<script>
$('#<%- identifier %>_other_checkbox').change(function() {
if($(this).is(":checked")) {
$('#<%- identifier %>_other_box').css("display", "block");
$('#<%- identifier %>_other').focus();
}else{
$('#<%- identifier %>_other_box').css("display", "none");
}
});
</script>
</script>
<!-- templates -->
<script type="text/template" id="other-select-tmpl">
<option value="Other">Other</option>
</script>
<!-- templates -->
<script type="text/template" id="script-select-tmpl">
<script>
$('#<%- identifier %>').change(function() {
if(this.value == 'Other'){
$('#<%- identifier %>_other_box').css("display", "block");
$('#<%- identifier %>_other').focus();
}else{
$('#<%- identifier %>_other_box').css("display", "none");
}
});
</script>
</script>
<!-- templates -->
<script type="text/template" id="multiple-select-tmpl">
<option value="<%- property_code %>" data-section="<%- property_parent_name %>"><%- property_name %></option>
</script>
<script type="text/template" id="success-tmpl">
<h2 class="light-blue text-center" id="thanks">Thank you for submitting a project!</h2>
</br>
<div class="well col-md-8 col-md-offset-2">
<p>Our project submission process allows the Commons Lab to collect and maintain accurate and up-to-date information, while also respecting the potential sensitivity of the information shared. </p>
<p>To support verification, a Commons Lab employee will contact a project coordinator within 3-5 days of receiving the form. The Commons Lab will collaborate with the project coordinator to finalize the database record, and discuss how potentially sensitive information will be presented. When verification is complete, the project will be published through the Commons Lab inventory and accessible through the mapped interface.</p>
<p>If you have questions about the Commons Lab Inventory or the process of submitting a project, please contact Elizabeth Tyson at: </p>
<p><a href="mailto:Elizabeth.tyson@wilsoncenter.org">Elizabeth.tyson@wilsoncenter.org</a> or 202-691-4319. </p>
</div>
</script>
<script src="js/vendor/jquery-min-1.11.3.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/bootstrap-datepicker.js"></script>
<script src="js/vendor/cartodb.js"></script>
<script src="js/vendor/json2.js"></script>
<script src="js/vendor/underscore-min-1.8.2.js"></script>
<script src="js/vendor/backbone-min-1.2.1.js"></script>
<script src="js/vendor/leaflet-0.7.3.js"></script>
<script src="js/vendor/leaflet.draw.js"></script>
<script src="js/vendor/tile.stamen.1.3.0.js"></script>
<script src="js/vendor/jquery.tree-multiselect.min.js"></script>
<!-- our own -->
<script src="js/config.js"></script>
<script src="js/CCSI.js"></script>
<script src="js/models/Property.js"></script>
<script src="js/models/Project.js"></script>
<script src="js/collections/Properties.js"></script>
<script src="js/views/PropertyComponent.js"></script>
<script src="js/views/OtherComponent.js"></script>
<script src="js/views/ProjectForm.js"></script>
<script src="js/add.js"></script>
<script>
var map;
var drawnItems;
$( document ).ready(function() {
$('#date-updated').datepicker({
format: 'yyyy-mm-dd'
});
$('#start-date').datepicker({
format: 'yyyy-mm-dd'
});
initMap();
$("[data-toggle='tooltip']").tooltip();
});
function initMap() {
map = L.map('input-map', { scrollWheelZoom: false }).setView([36, -91], 3);
var baseMap = new L.StamenTileLayer("toner-lite");
map.addLayer(baseMap);
// Initialise the FeatureGroup to store editable layers
drawnItems = new L.geoJson();
map.addLayer(drawnItems);
// Initialise the draw control and pass it the FeatureGroup of editable layers
var drawControl = new L.Control.Draw({
draw: {
position: 'topleft',
polygon: false,
polyline: false,
circle: false,
rectangle: false
},
edit: {
featureGroup: drawnItems
}
});
map.addControl(drawControl);
map.on('draw:created', function (e) {
drawnItems.clearLayers();
var type = e.layerType,
layer = e.layer;
if (type === 'marker') {
layer.bindPopup('Project home location');
}
drawnItems.addLayer(layer);
$("#latlng").val('ST_SetSRID(ST_Point(' + layer.getLatLng().lng + ',' + layer.getLatLng().lat + '),4326)');
});
}
$('#the_geom_geojson').on('change', function(e){
var files = e.target.files;
if(files.length === 0) return;
// read file
var reader = new FileReader();
reader.onloadend = (function(e){
drawnItems.clearLayers();
var geofile = JSON.parse(e.target.result);
var point;
if(geofile.type === 'FeatureCollection'){
geofile.features.forEach(function(feature){
if(feature.type === 'Feature' && feature.geometry.type === 'Point'){
// if it is a collection, would take the last valid point
point = feature;
}
});
} else if ((geofile.type === 'Feature') && (geofile.geometry.type === 'Point')){
point = geofile;
}
if((point !== null) && (point !== undefined)){
// set latlng value
var coords = point.geometry.coordinates;
var latlng = new L.latLng(coords[1], coords[0]);
$("#latlng").val('ST_SetSRID(ST_Point(' + latlng.lng + ',' + latlng.lat + '),4326)');
// load it on map
drawnItems.clearLayers();
drawnItems.addData(point);
map.setView(latlng, 3);
} else{
alert('Sorry, no point found. Try with other file.');
}
});
reader.readAsText(files[0]);
});
// add location button event
$("#geocode").click(function(e){
e.preventDefault();
// the name form field value
var street = $("#street-address").val();
var city = $("#city").val();
var state = $("#state").val();
var zip = $("#zip").val();
if(!street || !city) {
alert('Street address and city are required');
return;
}
$.ajax({
type: "GET",
dataType: "jsonp",
contentType: "application/json",
url: 'https://geocoding.geo.census.gov/geocoder/locations/address?street=' + street + '&city=' + city + '&state=' + state+ '&zip=' + zip + '&benchmark=9&format=jsonp',
success: function(data) {
if(data.result.addressMatches[0]) {
var gcLat = data.result.addressMatches[0].coordinates.y;
var gcLon = data.result.addressMatches[0].coordinates.x;
var gcLoc = new L.latLng(gcLat, gcLon);
map.setView(gcLoc, 12);
drawnItems.clearLayers();
L.marker(gcLoc).addTo(drawnItems);
$("#latlng").val('ST_SetSRID(ST_Point(' + gcLoc.lng + ',' + gcLoc.lat + '),4326)');
}
else alert('There was a problem geocoding that address. Please check that the address is valid.');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(xhr.status, thrownError);
}
});
return false;
});
$(function () {
$('.button-checkbox').each(function () {
// Settings
var $widget = $(this),
$button = $widget.find('button'),
$checkbox = $widget.find('input:checkbox'),
color = $button.data('color'),
settings = {
on: {
icon: 'glyphicon glyphicon-check'
},
off: {
icon: 'glyphicon glyphicon-unchecked'
}
};
// Event Handlers
$button.on('click', function () {
$checkbox.prop('checked', !$checkbox.is(':checked'));
$checkbox.triggerHandler('change');
updateDisplay();
});
$checkbox.on('change', function () {
updateDisplay();
});
// Actions
function updateDisplay() {
var isChecked = $checkbox.is(':checked');
// Set the button's state
$button.data('state', (isChecked) ? "on" : "off");
// Set the button's icon
$button.find('.state-icon')
.removeClass()
.addClass('state-icon ' + settings[$button.data('state')].icon);
// Update the button's color
if (isChecked) {
$button
.removeClass('btn-default')
.addClass('btn-' + color + ' active');
}
else {
$button
.removeClass('btn-' + color + ' active')
.addClass('btn-default');
}
}
// Initialization
function init() {
updateDisplay();
// Inject the icon if applicable
if ($button.find('.state-icon').length == 0) {
$button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i> ');
}
}
init();
});
});
</script>
</body>
</html>