From 99009ec25ff4fe08e2d105864c096ab502c0937e Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Tue, 3 Jun 2025 12:50:02 -0700 Subject: [PATCH 01/13] Updated repositoryURL field and value if private Signed-off-by: Natalia Luzuriaga --- js/autoGenerateFields.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/js/autoGenerateFields.js b/js/autoGenerateFields.js index d018559..86bf652 100644 --- a/js/autoGenerateFields.js +++ b/js/autoGenerateFields.js @@ -208,7 +208,13 @@ async function preFillFields(repoData, languages) { // Updating URL if (repoData.html_url) { - form.getComponent('repositoryURL').setValue(repoData.html_url) + if (repoData.private) { + // Private repositories must have "private" as their repositoryURL value + form.getComponent('repositoryURL').setValue("private") + } + else { + form.getComponent('repositoryURL').setValue(repoData.html_url) + } } // Updating forks @@ -306,11 +312,11 @@ async function preFillFields(repoData, languages) { } // fields to potentially automate - // clones, but this is only tracked for every 14 days - // status, by checking if its public, we can assume its production and check if its archival - // laborHours, by running a script? this might be harder since we need SCC - // maturityModel, we could check to see if certain files / sections live within a repo and make a guess like that - // usageType, by assuming that if its public = openSource and if private = governmnetWideReuse + // clones, but this is only tracked for every 14 days + // status, by checking if its public, we can assume its production and check if its archival + // laborHours, by running a script? this might be harder since we need SCC + // maturityModel, we could check to see if certain files / sections live within a repo and make a guess like that + // usageType, by assuming that if its public = openSource and if private = governmnetWideReuse notificationSystem.success("Repository data loaded successfully!") From 8efc8ef4ab489671c3d9d5be4c5b6039b71508cb Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Mon, 28 Jul 2025 11:40:02 -0700 Subject: [PATCH 02/13] Update step color to match button Signed-off-by: Natalia Luzuriaga --- css/styles.css | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/css/styles.css b/css/styles.css index ce97cee..70a4bdb 100644 --- a/css/styles.css +++ b/css/styles.css @@ -6,27 +6,33 @@ textarea { margin-bottom: 10px; } -#auto-generation { +#auto-generation, +#exemptions { border-radius: 15px; padding: 20px; padding-bottom: 25px; margin-top: 20px; margin-bottom: 20px; background: lightgray; - width: 100%; - max-width: 800px; - box-sizing: border-box; + width: 100%; + max-width: 800px; + box-sizing: border-box; } -#github-url-form { +#exemptions { + max-width: 1300px; +} + +#github-url-form, +#exemptions-checklist { margin-top: 25px; width: 100%; } #repo-url { - width: 100%; - max-width: 750px; - box-sizing: border-box; + width: 100%; + max-width: 750px; + box-sizing: border-box; } #repo-url-button { @@ -50,12 +56,33 @@ textarea { padding-right: 20px; } +.step-header { + display: flex; + align-items: center; + gap: 0.5em; +} + +.step-number { + margin-top: 10px; + background-color: #005ea2; + color: white; + font-weight: bold; + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; +} + @keyframes slideDown { - from { + from { opacity: 0; transform: translateY(-10px); } - to { + + to { opacity: 1; transform: translateY(0); } From ee8d771ae8501cbf88b5f30b163bf0e877fa2c6c Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Mon, 28 Jul 2025 11:40:50 -0700 Subject: [PATCH 03/13] Add exemption checklist functionality to form Signed-off-by: Natalia Luzuriaga --- css/styles.css | 2 +- index.html | 252 +++++++++++++++++++++++++---------- js/generateFormComponents.js | 14 +- 3 files changed, 192 insertions(+), 76 deletions(-) diff --git a/css/styles.css b/css/styles.css index 70a4bdb..a6ec0a1 100644 --- a/css/styles.css +++ b/css/styles.css @@ -64,7 +64,7 @@ textarea { .step-number { margin-top: 10px; - background-color: #005ea2; + background-color: #337AB7; color: white; font-weight: bold; width: 30px; diff --git a/index.html b/index.html index 80ca1d2..3e8ca10 100644 --- a/index.html +++ b/index.html @@ -1,85 +1,191 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + - - - - - + + + + + + + - - -
+ }) + .catch((error) => { + console.error("Error creating components:", error); + }); + + - - -
-

-
-
-
- -
-
+ +
+ +
+

+
+
+ +
Security & Privacy
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
National Security and Intelligence
+
+ + +
+
+ + +
+
+ + +
+
Export and Regulatory Compliance
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
-
+ -
- - - - - - +
+

+
+
+
+ +
+
+ +
+
+
3
+

Complete the entire form to generate the code.json file

+
+
+ +
+ +
+ + + + + + +
+ + - - + \ No newline at end of file diff --git a/js/generateFormComponents.js b/js/generateFormComponents.js index 1f8628d..2b08519 100644 --- a/js/generateFormComponents.js +++ b/js/generateFormComponents.js @@ -247,12 +247,21 @@ function createComponent(fieldName, fieldObject, requiredArray) { // Adds heading containing schema information function createFormHeading(title, description) { const container = document.getElementById('form-header'); - container.innerHTML = `

${title}

\n

${description}

`; + container.innerHTML = ` +

${title}

\n +

${description}

\n +

Complete the form below to create a code.json file for your project:

\n + `; +} + +function createExemptionsBox() { + const container = document.getElementById("exemptions-header") + container.innerHTML = `
1

Is my project exempted from the SHARE IT Act?

\n

Answer the series of questions below to determine if your project falls under the 4 exemption categories according to the SHARE IT Act.

` } function createAutoGenerationBox() { const container = document.getElementById("auto-generation-header") - container.innerHTML = `

Auto Generate Fields

\n

Please enter your repositories GitHub URL in order to automatically pre-fill some of the fields in this form!

\n
This currently only works on public repositories
` + container.innerHTML = `
2

Auto Generate Fields

\n

Please enter your repositories GitHub URL in order to automatically pre-fill some of the fields in this form!

\n
This currently only works on public repositories
` } // Iterates through each json field and creates component array for Form.io @@ -301,6 +310,7 @@ async function createFormComponents() { console.log("JSON Data:", jsonData); createFormHeading(jsonData["title"], jsonData["description"]); + createExemptionsBox() createAutoGenerationBox() components = createAllComponents(jsonData); From b41e75838a01ad96b159dabc0848a41917d5f656 Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Mon, 28 Jul 2025 12:33:01 -0700 Subject: [PATCH 04/13] Update background color for step 1 and 2 Signed-off-by: Natalia Luzuriaga --- css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/styles.css b/css/styles.css index a6ec0a1..6bf0565 100644 --- a/css/styles.css +++ b/css/styles.css @@ -13,7 +13,7 @@ textarea { padding-bottom: 25px; margin-top: 20px; margin-bottom: 20px; - background: lightgray; + background: #e6e6e6; width: 100%; max-width: 800px; box-sizing: border-box; From b92b436bca59b4a01d8bbf080ef266f8dc78b591 Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Wed, 30 Jul 2025 14:04:18 -0700 Subject: [PATCH 05/13] Updated exemption checklist with SHARE IT Act exemptions Signed-off-by: Natalia Luzuriaga --- index.html | 130 +++++++++++++++++++++++------------------------------ 1 file changed, 57 insertions(+), 73 deletions(-) diff --git a/index.html b/index.html index 3e8ca10..edd9c52 100644 --- a/index.html +++ b/index.html @@ -63,96 +63,80 @@

- -
Security & Privacy
-
- - -
-
- - -
-
- - +
+ +
-
- - -
-
- - +
+ +
-
National Security and Intelligence
-
- - +
+ +
-
- - +
+ +
-
- - +
+ +
-
Export and Regulatory Compliance
-
- -
+
+ + From c097c24bd494839851183a6e9cd0d02c76435035 Mon Sep 17 00:00:00 2001 From: Natalia Luzuriaga Date: Wed, 30 Jul 2025 14:36:53 -0700 Subject: [PATCH 06/13] Updated exemption quiz to include results html and js Signed-off-by: Natalia Luzuriaga --- index.html | 146 ++++++++++++++++++------------------- js/exemptionQuizHandler.js | 36 +++++++++ 2 files changed, 109 insertions(+), 73 deletions(-) create mode 100644 js/exemptionQuizHandler.js diff --git a/index.html b/index.html index edd9c52..44f5134 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,7 @@ +