generated from codeforamerica/form-flow-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add docUploadOwner and docUploadReviewOwner screens #704
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7bc081b
Add skeleton for whose documents screen
spokenbird fb6f527
Create docUploadOwner and docUploadReviewOwner screens
spokenbird 38486c5
Fix failing tests
spokenbird 38041d8
Merge branch 'main' into add-whose-documents-screen
spokenbird 16eece2
Merge branch 'main' into add-whose-documents-screen
spokenbird 54033dc
Minor fixes from PR review
spokenbird 8b06170
Add vietnamese translations
spokenbird File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 13 additions & 0 deletions
13
src/main/java/org/ladocuploader/app/submission/conditions/ContinueDocOwner.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.ladocuploader.app.submission.conditions; | ||
|
||
import formflow.library.data.Submission; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ContinueDocOwner extends BasicCondition { | ||
|
||
@Override | ||
public Boolean run(Submission submission) { | ||
return run(submission, "continueDocOwner", "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
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
64 changes: 64 additions & 0 deletions
64
src/main/resources/templates/laDigitalAssister/docUploadOwner.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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="~{fragments/head :: head(title=#{document-who.title}, useDropzone=false)}"></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=#{document-who.header})}"/> | ||
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::clientInfoFormContents})}"> | ||
<th:block th:ref="clientInfoFormContents" | ||
th:with=" | ||
fileIds = ${T(org.ladocuploader.app.utils.UserFileUtilities).getUserFileIdsInOrder(userFiles)}, | ||
userFileInfo = ${T(org.ladocuploader.app.utils.UserFileUtilities).getUserFileInfo(session.userFiles, userFiles, flow, 'uploadDocuments')}, | ||
numberOfFiles = ${userFileInfo.keySet().size()}, | ||
maxFiles=${@environment.getProperty('form-flow.uploads.max-files')}"> | ||
<div th:id="upload-doc-div-details" class="spacing-below-25"> | ||
<p th:if="${numberOfFiles == 1}" th:id="upload-doc-text-details" class="upload-doc-text" th:text="#{general.files.file-added.one(${maxFiles})}"></p> | ||
<p th:if="${numberOfFiles > 1}" th:id="upload-doc-text-details" class="upload-doc-text" th:text="#{general.files.file-added.other(${numberOfFiles}, ${maxFiles})}"></p> | ||
</div> | ||
<div class="form-card__content"> | ||
<div class="dropzone file-preview-template preview-container"> | ||
<th:block th:each="fileId, iter: ${fileIds}"> | ||
<th:block th:with=" | ||
userFile=${userFileInfo.get(fileId)}, | ||
docWhoInputName=${'documentOwner' + T(formflow.library.inputs.FieldNameMarkers).DYNAMIC_FIELD_MARKER + fileId}"> | ||
<th:block th:replace="~{fragments/fileDetails :: fileDetails(userFile=${userFile}, person=${''}, showDocType=false)}"></th:block> | ||
<th:block th:replace="~{fragments/inputs/selectCustom :: select( | ||
inputName=${docWhoInputName}, | ||
content=~{::docWho}, | ||
ariaDescribedBy=${fileId}, | ||
ariaLabel='header')}"> | ||
<th:block th:ref="docWho"> | ||
<th:block | ||
th:replace="~{fragments/inputs/selectOptionPlaceholder :: selectOptionPlaceholder(optionText=#{document-who.placeholder})}"/> | ||
<th:block th:each="docPerson : ${T(org.ladocuploader.app.utils.SubmissionUtilities).getHouseholdMemberNames(submission)}"> | ||
<th:block | ||
th:replace="~{fragments/inputs/selectOption :: selectOption(value=${docPerson}, optionText=${docPerson})}"/> | ||
</th:block> | ||
</th:block> | ||
</th:block> | ||
</th:block> | ||
</th:block> | ||
</div> | ||
</div> | ||
<div class="form-card__footer"> | ||
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo( | ||
inputName='continueDocOwner', | ||
ariaDescribe='header', | ||
overrideNoText=#{general.add-or-delete-files}, | ||
overrideYesText=#{general.inputs.continue})}"/> | ||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="~{fragments/footer :: footer}" /> | ||
</body> | ||
</html> |
48 changes: 48 additions & 0 deletions
48
src/main/resources/templates/laDigitalAssister/docUploadReviewOwner.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="~{fragments/head :: head(title=#{review-documents.title}, useDropzone=false)}"></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=#{review-documents-owner.header})}"/> | ||
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::clientInfoFormContents})}"> | ||
<th:block th:ref="clientInfoFormContents" | ||
th:with=" | ||
fileIds = ${T(org.ladocuploader.app.utils.UserFileUtilities).getUserFileIdsInOrder(userFiles)}, | ||
userFileInfo = ${T(org.ladocuploader.app.utils.UserFileUtilities).getUserFileInfo(session.userFiles, userFiles, flow, 'uploadDocuments')}, | ||
numberOfFiles = ${fileIds.size()}, | ||
maxFiles=${@environment.getProperty('form-flow.uploads.max-files')}"> | ||
<div th:id="upload-doc-div-details" class="spacing-below-25"> | ||
<p th:if="${numberOfFiles == 1}" th:id="upload-doc-text-details" class="upload-doc-text" th:text="#{general.files.file-added.one(${maxFiles})}"></p> | ||
<p th:if="${numberOfFiles > 1}" th:id="upload-doc-text-details" class="upload-doc-text" th:text="#{general.files.file-added.other(${numberOfFiles}, ${maxFiles})}"></p> | ||
</div> | ||
<div class="form-card__content"> | ||
<div class="dropzone file-preview-template preview-container"> | ||
<th:block th:each="fileId, iter: ${fileIds}"> | ||
<th:block th:with="userFile=${userFileInfo.get(fileId)}, | ||
personName=${T(org.ladocuploader.app.utils.SubmissionUtilities).getHouseholdMemberNameByFileId(fileId, submission)}"> | ||
<th:block th:replace="~{fragments/fileDetails :: fileDetails(userFile=${userFile}, person=${personName})}"></th:block> | ||
</th:block> | ||
|
||
</th:block> | ||
</div> | ||
</div> | ||
<div class="form-card__footer"> | ||
<th:block th:replace="~{fragments/inputs/submitButton :: submitButton( | ||
text=#{review-documents.continue})}"/> | ||
<a class="button button--secondary" th:href="'/flow/' + ${flow} + '/docUpload'" th:text="#{review-documents.edit-document-types}"></a> | ||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny, non blocking. This reads easier when the sections are in order. I'd expect docUploadReviewTypes to be in line 542 and then docUploadOwner to be listed afterward.