Skip to content

Commit 73f3900

Browse files
Update form instructions
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
1 parent 381f7a1 commit 73f3900

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

js/generateFormComponents.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,20 @@ function createComponent(fieldName, fieldObject, requiredArray, prefix) {
261261
}
262262

263263
// Adds heading containing schema information
264-
function createFormHeading(title, description) {
264+
function createFormHeading(agency) {
265+
const agencyTitle = (agency === "gov") ? agency.charAt(0).toUpperCase() + agency.slice(1) : agency.toUpperCase();
266+
const agencyDescription = (agency !== "gov") ? agencyTitle : agency;
267+
265268
const container = document.getElementById('form-header');
266269
container.innerHTML = `
267-
<h1>${title}</h1>\n
268-
<h2>${description}</h2>\n
270+
<h1>Welcome to ${agencyTitle} Code.json Generator!</h1>\n
271+
<h2>code.json generator is a web form designed to help ${agencyDescription} teams create a code.json file containing project metadata in compliance with the SHARE IT Act.
272+
Visit the <a
273+
class="usa-link usa-link--external"
274+
rel="noreferrer"
275+
target="_blank"
276+
href="https://dsacms.github.io/share-it-act-lp/">
277+
SHARE IT Act Landing Page</a> for more information.</h2>\n
269278
<h3>Complete the form below to create a code.json file for your project:</h3>\n
270279
`;
271280
}
@@ -327,7 +336,7 @@ async function createFormComponents() {
327336
const jsonData = await retrieveFile(filePath);
328337
console.log("JSON Data:", jsonData);
329338

330-
createFormHeading(jsonData["title"], jsonData["description"]);
339+
createFormHeading(page);
331340

332341
components = createAllComponents(jsonData);
333342

0 commit comments

Comments
 (0)