-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
175 lines (161 loc) · 7.62 KB
/
index.html
File metadata and controls
175 lines (161 loc) · 7.62 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
<html>
<head>
<meta charset="utf-8">
<!-- USWDS not working -->
<!-- <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://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uswds/2.11.2/css/uswds.min.css"> -->
<!-- <link rel="stylesheet" href="https://cdn.form.io/formiojs/formio.form.min.css"> -->
<!-- <link rel="stylesheet" href="https://cdn.form.io/uswds/uswds.min.css"> -->
<!-- <link rel="stylesheet" href="https://unpkg.com/formiojs@3.0.0-alpha.13/dist/formio.full.min.css"> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/uswds/2.11.2/js/uswds.min.js"></script> -->
<!-- <script src="https://cdn.form.io/formiojs/formio.form.min.js"></script> -->
<!-- <script src="https://cdn.form.io/uswds/uswds.min.js"></script> -->
<!-- <script src="https://cdn.form.io/formiojs/formio.full.js"></script> -->
<!-- <script src="https://cdn.form.io/js/formio.embed.js"></script> -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- Uses bootstrap for now -->
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/styles.css">
<!-- Working Form.io CDN -->
<script src="https://unpkg.com/formiojs@4.21.6/dist/formio.full.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/formiojs@4.21.6/dist/formio.full.min.css" rel="stylesheet">
<!-- Render the form -->
<script src="js/generateFormComponents.js"></script>
<script src="js/formDataToJson.js"></script>
<script src="js/exemptionQuizHandler.js"></script>
<script src="js/autoGenerateFields.js"></script>
<script type="text/javascript">
createFormComponents()
.then((components) => {
Formio.createForm(document.getElementById("formio"), {
display: "form",
theme: "primary",
settings: {
pdf: {
id: "1ec0f8ee-6685-5d98-a847-26f67b67d6f0",
src: "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0",
},
},
components: components,
}).then(function (form) {
window.formIOInstance = form;
form.on("submit", function (submission) {
console.log("form submission here:", submission);
createCodeJson(submission.data);
});
});
})
.catch((error) => {
console.error("Error creating components:", error);
});
</script>
</head>
<body>
<div id="form-header"></div>
<div id="exemptions">
<div id="exemptions-header"></div>
<div class="exemptions-quiz-container">
<h4 id="quiz-subheading"> Answer the series of questions below to determine if your project falls under the
4 exemption categories according to the SHARE IT Act. </h4>
<div id="exemptions-quiz">
<fieldset class="usa-fieldset">
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-national-security-systems" type="checkbox"
name="exemption-condition" value="exemptByNationalSecurity">
<label class="usa-checkbox__label" for="check-national-security-systems">
Is the project primarily for use in national security systems, as defined in Section 11103
of title 40, USC?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-intelligence-community" type="checkbox"
name="exemption-condition" value="exemptByIntelligence">
<label class="usa-checkbox__label" for="check-intelligence-community">Is the project created by
an agency or part of an agency that is an element of the intelligence community, as defined
in section 3(4) of the National Security Act of 1947?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-freedom-information-act" type="checkbox"
name="exemption-condition" value="exemptByFOIA">
<label class="usa-checkbox__label" for="check-freedom-information-act">Is the project exempt
under section 552(b) of title 5, USC (commonly known as the "Freedom of Information
Act")?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-EAR" type="checkbox" name="exemption-condition"
value="exemptByEAR">
<label class="usa-checkbox__label" for="check-EAR">Is the project prohibited under Export
Administration Regulations?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-ITAR" type="checkbox" name="exemption-condition"
value="exemptByITAR">
<label class="usa-checkbox__label" for="check-ITAR">Is the project prohibited under
International Traffic in Arms Regulations (ITAR)?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-TSA" type="checkbox" name="exemption-condition"
value="exemptByTSA">
<label class="usa-checkbox__label" for="check-TSA">Is the project prohibited under Regulations
of the Transportation Security Administration related to the protection of sensitive
information?
</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-classified-information" type="checkbox"
name="exemption-condition" value="exemptByClassifiedInformation">
<label class="usa-checkbox__label" for="check-classified-information">Is the project prohibited
under federal laws and regulations governing the sharing of classified information? </label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-privacy" type="checkbox" name="exemption-condition"
value="exemptByPrivacyRisk">
<label class="usa-checkbox__label" for="check-privacy">
Does the source code create an identifiable risk to the privacy of an individual?</label>
</div>
<div class="usa-checkbox">
<input class="usa-checkbox__input" id="check-none" type="checkbox" name="exemption-condition"
value="none">
<label class="usa-checkbox__label" for="check-none">None of the above </label>
</div>
</fieldset>
<button type="button" onclick="determineExemptions()">Submit</button>
</div>
</div>
<div class="results" style="display: none;">
<div class="results-container">
<p class="exemption-result">Your project </p>
</div>
<button onclick="handleClick(event)">Try Again</button>
</div>
</div>
<div id="notification" style="display: none;">
<p id="notification-message"></p>
</div>
<div id="auto-generation">
<p id="auto-generation-header"></p>
<form id="github-url-form">
<label for="repo-url">GitHub Repository URL</label><br>
<input type="text" id="repo-url" name="repo-url"><br>
<input type="submit" id="repo-url-button" value="Submit">
</form>
</div>
<div id="form-subheader">
<div class="step-header">
<div class="step-number">3</div>
<h3>Complete the entire form to generate the code.json file</h3>
</div>
</div>
<br>
<div id="formio"></div>
<div id="output">
<label for="json-result">Your JSON Metadata </label>
<textarea class="form-control" rows="10" id="json-result" readonly></textarea>
<button type="button" class="btn btn-outline" href="#" onclick="copyToClipboard(event)">Copy</button>
<button type="button" class="btn btn-outline" href="#" onclick="downloadFile(event)">Download</button>
<button type="button" class="btn btn-outline" href="#" onclick="createProjectPR(event)">Create Pull
Request</button>
<button type="button" class="btn btn-outline" href="#" onclick="emailFile(event)">Email</button>
</div>
</body>
</html>