-
Notifications
You must be signed in to change notification settings - Fork 3
/
paper.html
92 lines (67 loc) · 3.21 KB
/
paper.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
---
layout: default
---
<h1>Paper Request</h1>
<form id="submission">
<label>Paper Title
<p><input required="required" class="_oab_form PForm" type="text" id="atitle" placeholder="e.g Evolutionary persistence of DNA methylation for millions of years"></p>
</label>
<label>Journal Title
<p><input required="required" class="_oab_form PForm" type="text" id="title" placeholder="e.g Nature"></p>
</label>
<label>DOI
<p><input class="_oab_form PForm" type="text" id="doi" placeholder="e.g 10.1126/scitranslmed.3008973"></p>
</label>
<label>Authors
<p><input class="_oab_form PForm" type="text" id="aulast" placeholder="e.g Charles Darwin"></p>
</label>
<label>Year Published
<p><input required="required"class="_oab_form PForm" type="text" id="year" placeholder="e.g 1992"></p>
</label>
<label>Volume
<p><input class="_oab_form PForm" type="text" id="volume" placeholder="e.g 37"></p>
</label>
<label>Issue
<p><input class="_oab_form PForm" type="text" id="issue" placeholder="e.g 1"></p>
</label>
<label>Page
<p><input class="_oab_form PForm" type="text" id="pages" placeholder="e.g 355-365"></p>
</label>
<h3 class="form-section">About the request</h3>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date suggested required pattern -->
<label for="needed-by">When do you need this by?</label>
<p class="question-description">If we can't deliver your request by this date, it will be cancelled.</p>
<p><input class="_oab_form PForm" type="date" id="needed-by" min='1899-01-01' max='2222-01-01' required pattern="\d{4}-\d{2}-\d{2}" placeholder="yyyy/mm/dd"></p>
<label>Your Reference Number (if any)
<p><input class="_oab_form PForm" type="text" id="reference" placeholder="e.g. 02397133-002"></p>
</label>
<label>Notes
<p><input class="_oab_form PForm" type="text" id="other" placeholder="e.g. Please process quickly!"></p>
</label>
<h3 class="form-section">About you</h3>
<label>Institutional Email Address
<p><input required="required" class="_oab_form PForm" type="email" id="email" placeholder="e.g. [email protected]"></p>
</label>
<label>Full Name
<p><input required="required" class="_oab_form PForm" type="text" id="name" placeholder="e.g. Carla Hayden"></p>
</label>
<label>Library Name
<p><input required="required" class="_oab_form PForm" type="text" id="organization" placeholder="e.g. Harvard University Library"></p>
</label>
<input class="_oab_form PForm" id="where" type="hidden" value="manual">
<input class="_oab_button PSave" href="/thanks" id="submit" aria-label="submit" style="min-width:150px;" type="submit" value="Submit Request">
<p><i>If you have trouble submitting <a href="mailto:[email protected]">let us know</a>.</i></p>
</form>
<script>
P.edit({url: api + '/svc/rscvd/form'});
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
document.getElementById("needed-by").setAttribute("min", yyyy + '-' + (mm < 10 ? 0 : '') + mm + '-' + (dd < 10 ? 0 : '') + dd);
// the old way this worked was setting these settings:
// sid = 'AKfycbwFA_R-0gjzVS9029ByVpduCYJbHLH0ujstNng1aNnRogw1htU';
// url = 'https://api.openaccessbutton.org/ill/collect/' + sid;
// fields = [];
// then doing a template include for the form html include
</script>