|
1 |
| -<html> |
| 1 | +<html lang="en-US"> |
| 2 | +<meta charset="UTF-8"> |
2 | 3 |
|
3 | 4 | <head>
|
4 |
| - <meta charset="utf-8"> |
5 |
| - <!-- USWDS not working --> |
6 |
| - <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> --> |
7 |
| - <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> --> |
8 |
| - <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uswds/2.11.2/css/uswds.min.css"> --> |
9 |
| - <!-- <link rel="stylesheet" href="https://cdn.form.io/formiojs/formio.form.min.css"> --> |
10 |
| - <!-- <link rel="stylesheet" href="https://cdn.form.io/uswds/uswds.min.css"> --> |
11 |
| - <!-- <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/formio.full.min.css"> --> |
12 |
| - <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/uswds/2.11.2/js/uswds.min.js"></script> --> |
13 |
| - <!-- <script src="https://cdn.form.io/formiojs/formio.form.min.js"></script> --> |
14 |
| - <!-- <script src="https://cdn.form.io/uswds/uswds.min.js"></script> --> |
15 |
| - <!-- <script src="https://cdn.form.io/formiojs/formio.full.js"></script> --> |
16 |
| - <!-- <script src="https://cdn.form.io/js/formio.embed.js"></script> --> |
17 |
| - |
| 5 | + <title>code.json metadata</title> |
18 | 6 | <link rel="icon" type="image/x-icon" href="favicon.ico">
|
19 |
| - |
20 |
| - <!-- Uses bootstrap for now --> |
21 |
| - <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'> |
22 | 7 | <link rel="stylesheet" href="css/styles.css">
|
23 | 8 |
|
24 |
| - <!-- Working Form.io CDN --> |
25 |
| - <script src=" https://unpkg.com/[email protected]/dist/formio.full.min.js" ></script> |
26 |
| - <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/formio.full.min.css" rel=" stylesheet" > |
| 9 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
| 10 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uswds/3.1.0/css/uswds.min.css"> |
| 11 | + <link rel="stylesheet" href="https://cdn.form.io/js/formio.form.min.css"> |
| 12 | + <link rel="stylesheet" href="https://cdn.form.io/uswds/uswds.min.css"> |
| 13 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/uswds/3.1.0/js/uswds.min.js"></script> |
| 14 | + <script src="https://cdn.form.io/js/formio.form.min.js"></script> |
| 15 | + <script src="https://cdn.form.io/uswds/uswds.min.js"></script> |
| 16 | + |
| 17 | + <link rel="icon" type="image/x-icon" href="favicon.ico"> |
27 | 18 |
|
28 | 19 | <!-- Render the form -->
|
29 | 20 | <script src="js/generateFormComponents.js"></script>
|
|
33 | 24 | <script type="text/javascript">
|
34 | 25 | createFormComponents()
|
35 | 26 | .then((components) => {
|
| 27 | + Formio.use(uswds); |
36 | 28 | Formio.createForm(document.getElementById("formio"), {
|
37 | 29 | display: "form",
|
38 |
| - theme: "primary", |
39 |
| - settings: { |
40 |
| - pdf: { |
41 |
| - id: "1ec0f8ee-6685-5d98-a847-26f67b67d6f0", |
42 |
| - src: "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0", |
43 |
| - }, |
44 |
| - }, |
45 | 30 | components: components,
|
46 | 31 | }).then(function (form) {
|
47 | 32 | window.formIOInstance = form;
|
48 | 33 | form.on("submit", function (submission) {
|
49 |
| - console.log("form submission here:", submission); |
| 34 | + console.log("Form Submission here:", submission); |
50 | 35 | createCodeJson(submission.data);
|
51 | 36 | });
|
52 | 37 | });
|
|
59 | 44 |
|
60 | 45 | <body>
|
61 | 46 | <div id="form-header"></div>
|
62 |
| - |
| 47 | + <!-- Exemptions Quiz: Simple Classification --> |
63 | 48 | <div class="exemptions" id="start">
|
64 | 49 | <div class="exemptions-header">
|
65 | 50 | <div class="step-header">
|
66 | 51 | <div class="step-number">1</div>
|
67 |
| - <h3>Identify your project's classification</h3> |
| 52 | + <h2>Identify your project's classification</h2> |
68 | 53 | </div>
|
69 | 54 | </div>
|
70 | 55 | <div id="exemptions-quiz-container" class="exemptions-quiz-container">
|
71 |
| - <h4 id="quiz-subheading"> |
| 56 | + <h4 class="usa-heading margin-top-neg-05 margin-bottom-1" id="quiz-subheading"> |
72 | 57 | My project is considered:
|
73 | 58 | </h4>
|
74 | 59 | <div id="exemptions-quiz">
|
75 | 60 | <fieldset class="usa-fieldset">
|
76 | 61 | <div class="usa-radio">
|
77 | 62 | <input class="usa-radio__input usa-radio__input--tile" id="check-open-source" type="radio"
|
78 | 63 | name="exemption-condition" value="openSource" />
|
79 |
| - <label class="usa-radio__label" for="check-open-source">Open Source</label> |
80 |
| - <span class="usa-checkbox__label-description">This project is publicly available |
81 |
| - and licensed under terms that allow others to use, modify, and distribute it (e.g. |
82 |
| - github.com)</span></label> |
| 64 | + <label class="usa-radio__label" for="check-open-source">Open Source |
| 65 | + <span class="usa-checkbox__label-description">This project is publicly available |
| 66 | + and licensed under terms that allow others to use, modify, and distribute it (e.g. |
| 67 | + github.com)</span></label> |
83 | 68 | </div>
|
84 | 69 | <div class="usa-radio">
|
85 | 70 | <input class="usa-radio__input usa-radio__input--tile" id="check-govt-reuse" type="radio"
|
86 | 71 | name="exemption-condition" value="governmentWideReuse" />
|
87 |
| - <label class="usa-radio__label" for="check-govt-reuse">Government Wide Reuse</label> |
88 |
| - <span class="usa-checkbox__label-description">The project is available internally for government |
89 |
| - wide use (e.g. github.cms.gov)</span></label> |
| 72 | + <label class="usa-radio__label" for="check-govt-reuse">Government Wide Reuse |
| 73 | + <span class="usa-checkbox__label-description">The project is available internally for |
| 74 | + government wide use (e.g. github.cms.gov)</span></label> |
90 | 75 | </div>
|
91 | 76 | <div class="usa-radio">
|
92 | 77 | <input class="usa-radio__input usa-radio__input--tile" id="check-exempt" type="radio"
|
93 | 78 | name="exemption-condition" value="exempt" />
|
94 |
| - <label class="usa-radio__label" for="check-exempt">None of the above</label> |
95 |
| - <span class="usa-checkbox__label-description">The project may be considered exempted from |
96 |
| - sharing and reuse as per the SHARE IT Act and M-16-21. </span></label> |
| 79 | + <label class="usa-radio__label" for="check-exempt">None of the above |
| 80 | + <span class="usa-checkbox__label-description">The project may be considered exempted from |
| 81 | + sharing and reuse as per the SHARE IT Act and M-16-21. </span></label> |
97 | 82 | </div>
|
98 | 83 | </fieldset>
|
99 |
| - <button type="button" id="start" onclick="determineExemptions(event)">Submit</button> |
| 84 | + |
| 85 | + <button class="usa-button margin-top-2" type="button" id="start" |
| 86 | + onclick="determineExemptions(event)">Submit</button> |
100 | 87 | </div>
|
101 | 88 | </div>
|
102 | 89 | <div class="results" style="display: none;">
|
103 | 90 | <div class="results-container">
|
104 |
| - <p class="exemption-result">Your project </p> |
| 91 | + <div class="exemption-result"></div> |
105 | 92 | </div>
|
106 |
| - <button id="start" onclick="handleClick(event)">Try Again</button> |
| 93 | + <button class="usa-button usa-button--unstyled" id="start" onclick="handleClick(event)">Try Again</button> |
107 | 94 | </div>
|
108 | 95 | </div>
|
109 | 96 |
|
| 97 | + <!-- Exemptions Quiz: SHARE IT Act --> |
110 | 98 | <div class="exemptions" id="share-it-act" style="display: none;">
|
111 | 99 | <div class="exemptions-header">
|
112 | 100 | <div class="step-header">
|
113 | 101 | <div class="step-number">1b</div>
|
114 |
| - <h3>Is my project exempted from the SHARE IT Act?</h3> |
| 102 | + <h2>Is my project exempted from the SHARE IT Act?</h2> |
115 | 103 | </div>
|
116 | 104 | </div>
|
117 | 105 | <div id="exemptions-quiz-container" class="exemptions-quiz-container">
|
118 |
| - <h4 id="quiz-subheading"> |
| 106 | + <h4 class="usa-heading margin-top-neg-05 margin-bottom-1" id="quiz-subheading"> |
119 | 107 | Answer the series of questions below to determine if your project falls under the exemption categories
|
120 | 108 | according to the SHARE IT Act.
|
121 | 109 | </h4>
|
@@ -180,26 +168,28 @@ <h4 id="quiz-subheading">
|
180 | 168 | <label class="usa-checkbox__label" for="share-it-act-check-none">None of the above </label>
|
181 | 169 | </div>
|
182 | 170 | </fieldset>
|
183 |
| - <button type="button" id="share-it-act" onclick="determineExemptions(event)">Submit</button> |
| 171 | + <button class="usa-button margin-top-2" type="button" id="share-it-act" |
| 172 | + onclick="determineExemptions(event)">Submit</button> |
184 | 173 | </div>
|
185 | 174 | </div>
|
186 | 175 | <div class="results" style="display: none;">
|
187 | 176 | <div class="results-container">
|
188 |
| - <p class="exemption-result">Your project </p> |
| 177 | + <div class="exemption-result"></div> |
189 | 178 | </div>
|
190 |
| - <button id="share-it-act" onclick="handleClick(event)">Next</button> |
| 179 | + <button class="usa-button" id="share-it-act" onclick="handleClick(event)">Next</button> |
191 | 180 | </div>
|
192 | 181 | </div>
|
193 | 182 |
|
| 183 | + <!-- Exemptions Quiz: M-16-21 --> |
194 | 184 | <div class="exemptions" id="m-16-21" style="display: none;">
|
195 | 185 | <div class="exemptions-header">
|
196 | 186 | <div class="step-header">
|
197 | 187 | <div class="step-number">1c</div>
|
198 |
| - <h3>Is my project exempted from M-16-21?</h3> |
| 188 | + <h2>Is my project exempted from M-16-21?</h2> |
199 | 189 | </div>
|
200 | 190 | </div>
|
201 | 191 | <div class="exemptions-quiz-container">
|
202 |
| - <h4 id="quiz-subheading"> |
| 192 | + <h4 class="usa-heading margin-top-neg-05 margin-bottom-1" id="quiz-subheading"> |
203 | 193 | Answer the series of questions below to determine if your project falls under the exemption categories
|
204 | 194 | according to M-16-21 Act.
|
205 | 195 | </h4>
|
@@ -248,48 +238,72 @@ <h4 id="quiz-subheading">
|
248 | 238 | <label class="usa-checkbox__label" for="m-16-21-check-none">None of the above </label>
|
249 | 239 | </div>
|
250 | 240 | </fieldset>
|
251 |
| - <button type="button" id="m-16-21" onclick="determineExemptions(event)">Submit</button> |
| 241 | + <button class="usa-button margin-top-2" type="button" id="m-16-21" |
| 242 | + onclick="determineExemptions(event)">Submit</button> |
252 | 243 | </div>
|
253 | 244 | </div>
|
254 | 245 | <div class="results" style="display: none;">
|
255 | 246 | <div class="results-container">
|
256 |
| - <p class="exemption-result">Your project </p> |
| 247 | + <div class="exemption-result"></div> |
257 | 248 | </div>
|
258 |
| - <button id="m-16-21" onclick="handleClick(event)">Try Again</button> |
| 249 | + <button class="usa-button usa-button--unstyled" id="m-16-21" onclick="handleClick(event)">Try |
| 250 | + Again</button> |
259 | 251 | </div>
|
260 | 252 | </div>
|
261 | 253 |
|
262 |
| - <div id="notification" style="display: none;"> |
263 |
| - <p id="notification-message"></p> |
| 254 | + <!-- Field Auto-Generation Notification --> |
| 255 | + <div class="usa-alert" id="notification" style="display:none;"> |
| 256 | + <div class="usa-alert__body"> |
| 257 | + <h4 class="usa-alert__heading"></h4> |
| 258 | + <p class="usa-alert__text" id="notification-message"></p> |
| 259 | + </div> |
264 | 260 | </div>
|
265 | 261 |
|
266 |
| - <div id="auto-generation"> |
267 |
| - <p id="auto-generation-header"></p> |
| 262 | + <!-- Field Auto-Generation --> |
| 263 | + <div class="auto-generation"> |
| 264 | + <div class="auto-generation-header"> |
| 265 | + <div class="step-header"> |
| 266 | + <div class="step-number">2</div> |
| 267 | + <h2>Auto Generate Fields</h2> |
| 268 | + </div> |
| 269 | + <h4 class="usa-heading margin-top-neg-05 margin-bottom-1" id="quiz-subheading"> Enter your repository's |
| 270 | + GitHub URL in order to automatically pre-fill some of the |
| 271 | + fields in this form </h4> |
| 272 | + <p><i>This currently only works on <b>public</b> repositories</i></p> |
| 273 | + </div> |
268 | 274 | <form id="github-url-form">
|
269 |
| - <label for="repo-url">GitHub Repository URL</label><br> |
270 |
| - <input type="text" id="repo-url" name="repo-url"><br> |
271 |
| - <input type="submit" id="repo-url-button" value="Submit"> |
| 275 | + <label class="usa-label" for="repo-url">GitHub Repository URL</label> |
| 276 | + <input class="usa-input" id="repo-url" name="repo-url" /> |
| 277 | + <button class="usa-button margin-top-2" id="repo-url-button">Submit</button> |
272 | 278 | </form>
|
273 | 279 | </div>
|
274 | 280 |
|
| 281 | + <!-- Form header --> |
275 | 282 | <div id="form-subheader">
|
276 | 283 | <div class="step-header">
|
277 | 284 | <div class="step-number">3</div>
|
278 |
| - <h3>Complete the entire form to generate the code.json file</h3> |
| 285 | + <h2>Complete the entire form to generate the code.json file</h2> |
279 | 286 | </div>
|
280 | 287 | </div>
|
281 |
| - <br> |
282 | 288 |
|
283 | 289 | <div id="formio"></div>
|
284 | 290 |
|
| 291 | + <!-- code.json Generated Output --> |
285 | 292 | <div id="output">
|
286 |
| - <label for="json-result">Your JSON Metadata </label> |
287 |
| - <textarea class="form-control" rows="10" id="json-result" readonly></textarea> |
288 |
| - <button type="button" class="btn btn-outline" href="#" onclick="copyToClipboard(event)">Copy</button> |
289 |
| - <button type="button" class="btn btn-outline" href="#" onclick="downloadFile(event)">Download</button> |
290 |
| - <button type="button" class="btn btn-outline" href="#" onclick="createProjectPR(event)">Create Pull |
291 |
| - Request</button> |
292 |
| - <button type="button" class="btn btn-outline" href="#" onclick="emailFile(event)">Email</button> |
| 293 | + <label class="usa-label" for="json-result"><strong>Your code.json metadata</strong></label> |
| 294 | + <textarea class="usa-textarea" rows="30" id="json-result" name="json-result" readonly></textarea> |
| 295 | + <div class="button-actions"> |
| 296 | + <button class="usa-button usa-button--outline" type="button" href="#" |
| 297 | + onclick="copyToClipboard(event)">Copy</button> |
| 298 | + <button class="usa-button usa-button--outline" type="button" href="#" |
| 299 | + onclick="downloadFile(event)">Download</button> |
| 300 | + <button class="usa-button usa-button--outline" type="button" href="#" |
| 301 | + onclick="createProjectPR(event)">Create |
| 302 | + Pull |
| 303 | + Request</button> |
| 304 | + <button class="usa-button usa-button--outline" type="button" href="#" |
| 305 | + onclick="emailFile(event)">Email</button> |
| 306 | + </div> |
293 | 307 | </div>
|
294 | 308 |
|
295 | 309 | </body>
|
|
0 commit comments