-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Marc P <mperlman@codeforamerica.org>
- Loading branch information
Showing
13 changed files
with
155 additions
and
71 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
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
13 changes: 13 additions & 0 deletions
13
src/main/java/org/ilgcc/app/submission/conditions/HasRegistrationHouseholdMembers.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.ilgcc.app.submission.conditions; | ||
|
||
import formflow.library.data.Submission; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class HasRegistrationHouseholdMembers extends BasicCondition { | ||
|
||
@Override | ||
public Boolean run(Submission submission) { | ||
return run(submission, "providerHouseholdLiveWithOthers", "true"); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/org/ilgcc/app/submission/conditions/ProviderHouseholdRegistrationRequired.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.ilgcc.app.submission.conditions; | ||
|
||
import formflow.library.config.submission.Condition; | ||
import formflow.library.data.Submission; | ||
import java.util.List; | ||
import org.ilgcc.app.utils.enums.ProviderType; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ProviderHouseholdRegistrationRequired implements Condition { | ||
|
||
final static List providerTypesRequired = List.of( | ||
ProviderType.LICENSE_EXEMPT_RELATIVE_IN_PROVIDER_HOME.name(), | ||
ProviderType.LICENSE_EXEMPT_NONRELATIVE_IN_PROVIDER_HOME.name() | ||
); | ||
|
||
@Value("${il-gcc.allow-provider-registration-flow}") | ||
private boolean enableProviderRegistration; | ||
|
||
@Override | ||
public Boolean run(Submission submission) { | ||
return enableProviderRegistration && displayScreen(submission); | ||
} | ||
|
||
private Boolean displayScreen(Submission submission) { | ||
String providerType = (String) submission.getInputData().getOrDefault("providerType", ""); | ||
return providerTypesRequired.contains(providerType); | ||
} | ||
} |
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
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
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
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
47 changes: 19 additions & 28 deletions
47
src/main/resources/templates/providerresponse/registration-convictions-info.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,28 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}" xmlns:th="http://www.thymeleaf.org"> | ||
<head th:replace="~{fragments/head :: head(title=#{registration-convictions-info.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='placeholder', subtext='placeholder')}"/> | ||
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::formContent})}"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
<!-- Put inputs here --> | ||
</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}"/> | ||
</body> | ||
</html> | ||
<th:block | ||
th:replace="~{fragments/screens/screenWithOneInput :: | ||
screenWithOneInput( | ||
title=#{registration-convictions-info.title}, | ||
header=#{registration-convictions-info.header}, | ||
subtext=#{registration-convictions-info.subtext}, | ||
required=true, | ||
buttonLabel=#{general.button.continue}, | ||
iconFragment=~{fragments/gcc-icons :: person}, | ||
formAction=${formAction}, | ||
inputContent=~{::inputContent})}"> | ||
<th:block th:ref="inputContent"> | ||
<th:block th:replace="~{fragments/inputs/textArea :: | ||
textArea(inputName='providerConvictionExplanation', | ||
ariaLabel='header', | ||
rows='2', | ||
maxLength='88')}"/> | ||
</th:block> | ||
</th:block> |
4 changes: 2 additions & 2 deletions
4
src/main/resources/templates/providerresponse/registration-family-response-intro.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
4 changes: 2 additions & 2 deletions
4
src/main/resources/templates/providerresponse/registration-household-add-person.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
41 changes: 13 additions & 28 deletions
41
src/main/resources/templates/providerresponse/registration-household-members.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,28 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}" xmlns:th="http://www.thymeleaf.org"> | ||
<head th:replace="~{fragments/head :: head(title=#{registration-household-members.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='placeholder', subtext='placeholder')}"/> | ||
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::formContent})}"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
<!-- Put inputs here --> | ||
</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}"/> | ||
</body> | ||
</html> | ||
<th:block | ||
th:replace="~{fragments/screens/screenWithYesAndNoButtons :: | ||
screenWithYesAndNoButtons( | ||
title=#{registration-household-members.title}, | ||
header=#{registration-household-members.header}, | ||
subtext=#{registration-household-members.subtext}, | ||
formAction=${formAction}, | ||
iconFragment=~{fragments/gcc-icons :: householdOtherAdults}, | ||
inputName='providerHouseholdLiveWithOthers', | ||
inputContent=~{::inputContent})}"> | ||
<th:block th:ref="inputContent"> | ||
</th:block> | ||
</th:block> |
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