generated from codeforamerica/form-flow-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
src/main/java/org/ladocuploader/app/submission/conditions/AllUsCitizens.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 32 additions & 6 deletions
38
src/main/resources/templates/laDigitalAssister/householdCitizenshipNumber.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters