Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1150] Part 2: User Profile Enhancements for Former Names #857

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions i18n/en.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 26 additions & 6 deletions i18n/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions js/components/form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { allStates, allCountries, getMyData, hasUserData, translateHTML, translateText } from "../shared.js";
import { addEventMonthSelection, addEventMonthConfirmationSelection, addEventUPSubmit, addEventCancerFollowUp, addEventChangeFocus, addEventAddressAutoComplete, addEventAdditionalEmail, addEventCheckCanText, addEventDisableCopyPaste } from "../event.js";
import { addEventMonthSelection, addEventMonthConfirmationSelection, addEventUPSubmit, addEventCancerFollowUp, addEventChangeFocus, addEventAddressAutoComplete, addEventAdditionalEmail, addEventCheckCanText, addEventDisableCopyPaste, addEventFormerName, addMoreFormerName } from "../event.js";
import cId from '../fieldToConceptIdMapping.js';
import { suffixList, suffixToTextMapDropdown, suffixToTextMap } from "../settingsHelpers.js";
import { suffixList, suffixToTextMapDropdown, suffixToTextMap, numberOfDefaultFormerNames } from "../settingsHelpers.js";

export const renderUserProfile = async () => {
JoeArmani marked this conversation as resolved.
Show resolved Hide resolved
const myData = await getMyData();
Expand Down Expand Up @@ -64,6 +64,26 @@ export const renderUserProfile = async () => {
</div>
<br>
<hr style="color:#A9AEB1;">

<p class="userProfileSubHeaders" data-i18n="form.formerNameSubHeader">Former Names</p>
<span data-i18n="form.formerNameIntroduction">Former names are other name(s) you have used in the past for paperwork and administrative purposes (for example, legal name changes, unmarried or “maiden name”, married name). We collect this information so that we can match information we collect from other sources, like state health registries, to you.</span>
<div class="form-group row">
<div class="col-md-3">
<label class="col-form-label" data-i18n="form.formerNameCategoryTitle">Name Category</label>
</div>
<div class="col-md-4">
<label class="col-form-label" data-i18n="form.formerNameValueTitle">Former Name</label>
</div>
</div>
<div id="former-name-group">
<!-- Use function addMoreFormerName to generate default content -->
</div>
<div class="form-group row" style="margin-bottom:20px !important;">
<div class="col">
<button data-i18n="form.addMoreFormerName" type="button" class="btn btn-light" id="addMoreFormerName">Add more <i class="fas fa-plus"></i></button>
</div>
</div>
<hr style="color:#A9AEB1;">

<p class="userProfileSubHeaders" data-i18n="form.birthDateSubHeader">Date of Birth</p>
<div class="form-group row">
Expand Down Expand Up @@ -341,11 +361,16 @@ export const renderUserProfile = async () => {
addEventCancerFollowUp();
addEventMonthSelection();
addEventMonthConfirmationSelection();
addEventFormerName();
addEventAdditionalEmail();
addEventAddressAutoComplete(1);
addEventCheckCanText();
addEventDisableCopyPaste();
addEventUPSubmit();

for (let i = 0; i < numberOfDefaultFormerNames; i++) {
addMoreFormerName();
}
};

const addEventNameConsistency = (cfn, cln) => {
Expand Down
Loading