Skip to content

Commit

Permalink
Adding citizenship number screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sree-cfa committed Oct 12, 2023
1 parent 8eb1370 commit 53b40b7
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public class LaDigitalAssister extends FlowInputs {

private String nonCitizens;

private String citizenshipNumber;

private String homelessInd;

private String homeless;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package org.ladocuploader.app.submission.conditions;

import formflow.library.config.submission.Condition;
import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class AllUsCitizens implements Condition {
public class AllUsCitizens extends BasicCondition {
@Override
public Boolean run(Submission submission) {
var inputData = submission.getInputData();
if (inputData.containsKey("citizenshipInd")) {
return submission.getInputData().get("citizenshipInd").equals("true");
}
return false;
return run(submission, "citizenshipInd", "true");
}
}
29 changes: 21 additions & 8 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,13 @@ contact-info.phone-number.help=Optional. A caseworker may use this number to con
contact-info.email-address=What is your email address?
contact-info.email-address.help=Optional.

# Phone number nudge
phone-number-nudge.title=Phone number nudge
phone-number-nudge.header=Are you sure you don't want to provide your phone number?
phone-number-nudge.p1=A caseworker may need to contact you by phone about your application. If you don't have a phone number, you can enter a friend or family member's phone number instead.
phone-number-nudge.add-phone-number=Add a phone number
phone-number-nudge.skip-phone-number=Continue without it

# Shared Household Messages

#Sensitive Questions
Expand Down Expand Up @@ -510,20 +517,26 @@ citizenship.l3=Applying for or getting SNAP won't affect the immigration status
non-citizen.title=Non-citizen
non-citizen.header=Who is not a U.S. Citizen?

# Citizenship number
citizenship-number.title=Citizenship number
citizenship-number.header=How many people in your household are one of the following?
citizenship-number.subheader=Count everyone on your application who has one of the following statuses. They are all eligible for SNAP benefits.
citizenship-number.status1=<b>U.S. citizen</b>
citizenship-number.status2=<b>Lawful Permanent Resident/Green Card holder</b> for any length of time
citizenship-number.status3=<b>T-Visa or U-Visa</b> holder or applicant
citizenship-number.status4=<b>Asylee or refugee</b>
citizenship-number.status5=<b>Violence Against Women Act (VAWA)</b> relief applicant
citizenship-number.status6=<b>Parolee</b> for at least 1 year or <b>Ukrainian</b> parolee for any length of time
citizenship-number.status7=<b>Afghan</b> entering with Special Immigrant Visa (SIV), Special Immigrant (SQ/SI) Parole, or other forms of humanitarian parole
citizenship-number.status8=<b>Cuban or Haitian</b> entrant
citizenship-number.status9=<b>Hmong/Laotian or American Indian</b> born in Canada
citizenship-number.people={0} people
# Homelessness
homeless.title=Homeless
homeless.header=Is anyone in your household currently experiencing homelessness?
homeless-who.title=Homelessness who
homeless-who.header=Who in your household is currently experiencing homelessness?

# Phone number nudge
phone-number-nudge.title=Phone number nudge
phone-number-nudge.header=Are you sure you don't want to provide your phone number?
phone-number-nudge.p1=A caseworker may need to contact you by phone about your application. If you don't have a phone number, you can enter a friend or family member's phone number instead.
phone-number-nudge.add-phone-number=Add a phone number
phone-number-nudge.skip-phone-number=Continue without it


# Review contact info
review-contact-info.title=Review contact information
review-contact-info.header=Let's review your info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{citizenship-number.title})}"></head>
<body>
<div class="page-wrapper">
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
<section class="slab">
<div class="grid">
<div th:replace="~{fragments/goBack :: goBackLink}"></div>
<main id="content" role="main" class="form-card spacing-above-35">
<!-- <th:block-->
<!-- th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})}"/>-->
<th:block th:replace="~{fragments/icons :: passport}"></th:block>
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{citizenship-number.header}, subtext=#{citizenship-number.subheader})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

<th:block th:ref="formContent">
<ul class="list--bulleted spacing-above-0 spacing-below-60">
<li th:utext="#{citizenship-number.status1}"></li>
<li th:utext="#{citizenship-number.status2}"></li>
<li th:utext="#{citizenship-number.status3}"></li>
<li th:utext="#{citizenship-number.status4}"></li>
<li th:utext="#{citizenship-number.status5}"></li>
<li th:utext="#{citizenship-number.status6}"></li>
<li th:utext="#{citizenship-number.status7}"></li>
<li th:utext="#{citizenship-number.status8}"></li>
<li th:utext="#{citizenship-number.status9}"></li>
</ul>
<th:block th:replace="~{'fragments/inputs/select' ::
select(
inputName='citizenshipNumber',
ariaLabel='header',
content=~{::selectContent})}">
<th:block th:ref="selectContent">
<th:block th:each="i : ${#numbers.sequence(0, inputData.household.size()+1)}"
class="spacing-below-15">
<th:block
th:replace="~{fragments/inputs/selectOption :: selectOption(value=${i}, optionText=#{citizenship-number.people(${i})})}"/>
</th:block>
</th:block>
</th:block>
</th:block>
</div>
<div class="form-card__footer">

<th:block th:replace="'fragments/continueButton' :: continue"/>
</div>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}" />
<th:block th:replace="~{fragments/footer :: footer}"/>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
</div>

<div class="form-card__footer">
<th:block th:replace="'fragments/continueButton' :: continue"/>
<th:block th:replace="fragments/inputs/submitButton :: submitButton(
text=#{general.inputs.continue})" />
</div>
</th:block>
</th:block>
Expand Down

0 comments on commit 53b40b7

Please sign in to comment.