Skip to content

Commit

Permalink
Adding special situations section
Browse files Browse the repository at this point in the history
Co-authored-by: Lauren Kemperman <lkemperman@codeforamerica.org>
  • Loading branch information
sree-cfa and lkemperman-cfa committed Oct 16, 2023
1 parent 96b9202 commit 1b5edbf
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 59 deletions.
12 changes: 10 additions & 2 deletions src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,17 @@ public class LaDigitalAssister extends FlowInputs {

private String mailingAddressStreetAddress1;

private String goingToSchool;
private String schoolInd;

private String isPregnant;
private String students;

private String pregnancyInd;

private String pregnancies;

private String outOfStateBenefitsInd;

private String outOfStateBenefitsRecipients;

private String receivedOutOfStateBenefits;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.ladocuploader.app.submission.conditions;

import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class GoingToSchool extends BasicCondition {

@Override
public Boolean run(Submission submission) {
return run(submission, "schoolInd", "true");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.ladocuploader.app.submission.conditions;

import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class IsPregnant extends BasicCondition {

@Override
public Boolean run(Submission submission) {
return run(submission, "pregnancyInd", "true");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.ladocuploader.app.submission.conditions;

import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class OutOfStateBenefits extends BasicCondition {

@Override
public Boolean run(Submission submission) {
return run(submission, "outOfStateBenefitsInd", "true");
}
}
30 changes: 19 additions & 11 deletions src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ flow:
- name: householdSignPost
condition: IsMultiplePersonHousehold
- name: ssnForm
ssnForm:
nextScreens:
- name: householdSpecialSituations
ssnFaq:
nextScreens:
- name: householdSpecialSituations
householdSpecialSituations:
nextScreens:
- name: householdSchool
condition: IsMultiplePersonHousehold
- name: school
householdSignPost:
nextScreens:
- name: householdInfo
Expand All @@ -98,24 +87,43 @@ flow:
householdList:
nextScreens:
- name: ssnForm
ssnForm:
nextScreens:
- name: householdSpecialSituations
ssnFaq:
nextScreens:
- name: householdSpecialSituations
householdSpecialSituations:
nextScreens:
- name: householdSchool
householdSchool:
nextScreens:
- name: householdSchoolWho
condition: GoingToSchool
- name: householdPregnancy
householdSchoolWho:
nextScreens:
- name: householdPregnancy
householdPregnancy:
nextScreens:
- name: householdPregnancyWho
condition: IsPregnant
- name: householdBenefits
householdPregnancyWho:
nextScreens:
- name: householdBenefits
householdBenefits:
nextScreens:
- name: householdBenefitsWho
condition: OutOfStateBenefits
- name: householdPrepareFood
condition: ProgramsIncludeSnap
- name: sensitiveQuestions
householdBenefitsWho:
nextScreens:
- name: householdPrepareFood
condition: ProgramsIncludeSnap
- name: sensitiveQuestions
householdPrepareFood:
nextScreens:
- name: householdSeasonalFarmWorker
Expand Down
12 changes: 9 additions & 3 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -474,19 +474,25 @@ special-situations-household.p1=We'll see if there are special situations for an

# School
school.title=School
school.header=Are you going to school right now, either full or part time?
school.header=Is anyone in your household going to school right now, either full or part time?
school.content.p1=Includes anyone who is enrolled at least half of their time in "an institution of higher education".
school.content.p2=That would include:
school.content.li1=A regular curriculum at a college or university that offers degrees
school.content.li2=A business, technical, trade, or vocational school that normally requires a high school diploma or equivalent (GED)
school-who.title=School who
school-who.header=Who is going to school?

# Pregnancy
pregnancy.title=Pregnancy
pregnancy.header=Are you pregnant?
pregnancy.header=Is anyone in your household pregnant?
pregnancy-who.title=Pregnancy who
pregnancy-who.header=Who is pregnant?

# Out of state benefits
out-of-state-benefits.title=Out of state benefits
out-of-state-benefits.header=Have you received cash assistance or SNAP benefits from another state?
out-of-state-benefits.header=Has anyone in your household received cash assistance or SNAP benefits from another state?
out-of-state-benefits-who.title=Out of state benefits who
out-of-state-benefits-who.header=Who has received cash assistance or SNAP benefits from another state?

# Household prepare food
household-prepare-food.title=Prepare food
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{out-of-state-benefits.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 :: medicalInOtherState}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{out-of-state-benefits.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

</div>
<div class="form-card__footer">

</div>
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='outOfStateBenefitsInd',
ariaDescribe='header')}"/>
</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
@@ -1,29 +1,31 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{out-of-state-benefits-who.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 :: medicalInOtherState}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{out-of-state-benefits-who.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

<th:block th:replace="~{'fragments/inputs/householdCheckboxFieldset' ::
householdCheckboxFieldset(inputName='outOfStateBenefitsRecipients')}">
</th:block>
</div>
<div class="form-card__footer">

<th:block th:replace="~{fragments/inputs/submitButton :: submitButton(text=#{general.inputs.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
@@ -1,29 +1,26 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{pregnancy.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 :: pregnant}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{pregnancy.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

</div>
<div class="form-card__footer">

</div>
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='pregnancyInd',
ariaDescribe='header')}"/>
</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
@@ -1,29 +1,31 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{pregnancy-who.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 :: pregnant}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{pregnancy-who.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

<th:block th:replace="~{'fragments/inputs/householdCheckboxFieldset' ::
householdCheckboxFieldset(inputName='pregnancies')}">
</th:block>
</div>
<div class="form-card__footer">

<th:block th:replace="~{fragments/inputs/submitButton :: submitButton(text=#{general.inputs.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
@@ -1,22 +1,30 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{school.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' :: school}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{school.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">
<p th:text="#{school.content.p1}"></p>
<p th:text="#{school.content.p2}"></p>
<ul class="list--bulleted">
<li th:text="#{school.content.li1}"></li>
<li th:text="#{school.content.li2}"></li>
</ul>

</div>
<div class="form-card__footer">

<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='schoolInd',
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{school-who.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 :: school}"></th:block>
<th:block th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{school-who.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

<th:block th:replace="~{'fragments/inputs/householdCheckboxFieldset' ::
householdCheckboxFieldset(inputName='students')}">
</th:block>
</div>
<div class="form-card__footer">

<th:block th:replace="~{fragments/inputs/submitButton :: submitButton(text=#{general.inputs.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 @@ -10,7 +10,7 @@
<main id="content" role="main" class="form-card spacing-above-35">
<th:block th:unless="${fieldData.containsKey('household')}">
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{special-situations.header}, subtext=#{special-situations.p1})}"/>
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{special-situations.header}, subtext=#{special-situations-household.p1})}"/>
</th:block>
<th:block th:if="${fieldData.containsKey('household')}">
<th:block
Expand Down
Loading

0 comments on commit 1b5edbf

Please sign in to comment.