Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/gradle/org.projectlombok-lombok-1…
Browse files Browse the repository at this point in the history
….18.36
  • Loading branch information
spokenbird authored Nov 20, 2024
2 parents 6ac23cb + 4a69354 commit 9ea4330
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 11 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,10 @@ names, addresses, and emails, etc.
Text inputs have an optional placeholder parameter which can be used to display a placeholder within
the rendered input field.

Additionally, text inputs have an optional autoComplete parameter which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)


Example of using a text input:

```html
Expand All @@ -1196,6 +1200,9 @@ if no value is passed and maxlength will default to 500 if no value is passed.

A convenience live template for text area inputs is provided through `cfa:inputTextArea`.

Additionally, text area inputs have an optional autoComplete parameter which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)

#### Number

Number inputs are used to gather numbers from users. The number input makes use
Expand Down Expand Up @@ -1225,6 +1232,9 @@ the end of the number input, like so:
In this `postfix` example, the string passed in was "hrs". The string will not get submitted with
the input data and is only shown in the user interface.

Additionally, number inputs have an optional autoComplete parameter which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)

A live template for numbers is provided through `cfa:inputNumber`.

#### Social Security Number
Expand All @@ -1250,6 +1260,9 @@ state code to state name, like so:

The value saved from this input is the selected state's code. Example `MA`.

Additionally, state inputs have an optional autoComplete parameter which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)

#### Submit Button

Submit button will submit form data to the server and will move you along to the next screen,
Expand Down Expand Up @@ -1298,6 +1311,9 @@ values will be stored in the database. Phone inputs also have an optional `place

A convenience live template for phone inputs is provided through `cfa:inputPhone`.

Additionally, phone inputs have an optional autoComplete parameter which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)

#### YesOrNo

Yes or no inputs are used to gather a `yes` or `no` answer from a user. They are visually displayed
Expand Down Expand Up @@ -1522,6 +1538,11 @@ They are visually displayed as three separate inputs for Month, Day and Year in

A convenience live template for dates is provided through `cfa:inputDate`.

Additionally, date inputs have a optional autoComplete parameters for each input, Month, Day and year.
These are `autoCompleteMonth`, `autoCompleteDay` and `autoCompleteYear` which can be used to pass auto
complete tokens. [For more information, see the MDN article on autocomplete.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)


#### Address

For convenience, we have provided a `cfa:address` live template to quickly create an address
Expand Down Expand Up @@ -1575,6 +1596,12 @@ The address fragment has these optional parameters
the `address.state` key in the message source file.
- `zipCodeLabel` - text used for label as this field; if not passed in this will default to
the `address.zip` key in the message source file.
- `autoCompleteStreetAddress1` - auto complete token for street address 1
- `autoCompleteStreetAddress2` - auto complete token for street address 2
- `autoCompleteCity` - auto complete token for city
- `autoCompleteState` - auto complete token for state
- `autoCompleteZipCode` - auto complete token for zip code


#### Reveal

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
api 'org.springframework.boot:spring-boot-starter-thymeleaf'

implementation 'org.springframework.integration:spring-integration-ws:6.3.5'
implementation 'org.springframework.integration:spring-integration-ws:6.4.0'
implementation 'com.google.guava:guava:33.3.1-jre'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/templates/fragments/inputs/address.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,39 @@
cityInputName=${inputName + T(formflow.library.inputs.AddressParts).CITY.toString()},
stateInputName=${inputName + T(formflow.library.inputs.AddressParts).STATE.toString()},
zipCodeInputName=${inputName + T(formflow.library.inputs.AddressParts).ZIPCODE.toString()},
hasAutoCompleteStreetAddress1=${!#strings.isEmpty(autoCompleteStreetAddress1)},
hasAutoCompleteStreetAddress2=${!#strings.isEmpty(autoCompleteStreetAddress2)},
hasAutoCompleteCity=${!#strings.isEmpty(autoCompleteCity)},
hasAutoCompleteState=${!#strings.isEmpty(autoCompleteState)},
hasAutoCompleteZipCode=${!#strings.isEmpty(autoCompleteZipCode)},
validateAddressInputName=${T(formflow.library.inputs.FieldNameMarkers).UNVALIDATED_FIELD_MARKER_VALIDATE_ADDRESS + inputName}"
>
<th:block th:replace="~{fragments/inputs/text ::
text(inputName=${streetAddressInputName},
autoComplete=${hasAutoCompleteStreetAddress1 ? autoCompleteStreetAddress1 : null},
required=${requireAddressFields},
label=${streetAddressLabel},
helpText=${streetAddressHelpText})}"/>
<th:block th:replace="~{fragments/inputs/text ::
text(inputName=${streetAddress2InputName},
autoComplete=${hasAutoCompleteStreetAddress2 ? autoCompleteStreetAddress2 : null},
label=${streetAddress2Label},
helpText=${streetAddress2HelpText})}"/>
<th:block th:replace="~{fragments/inputs/text ::
text(inputName=${cityInputName},
autoComplete=${hasAutoCompleteCity ? autoCompleteCity : null},
required=${requireAddressFields},
label=${cityLabel},
helpText=${cityHelpText})}"/>
<th:block th:replace="~{fragments/inputs/state ::
state(inputName=${stateInputName},
autoComplete=${hasAutoCompleteState ? autoCompleteState : null},
required=${requireAddressFields},
label=${stateLabel},
helpText=${stateHelpText})}"/>
<th:block th:replace="~{fragments/inputs/text ::
text(inputName=${zipCodeInputName},
autoComplete=${hasAutoCompleteZipCode ? autoCompleteZipCode : null},
required=${requireAddressFields},
label=${zipCodeLabel},
helpText=${zipCodeHelpText})}"/>
Expand Down
24 changes: 15 additions & 9 deletions src/main/resources/templates/fragments/inputs/date.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName + 'Day', false)) ||
(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName + 'Year', false)) ||
(required != null && required)},
hasAutoCompleteMonth=${!#strings.isEmpty(autoCompleteMonth)},
hasAutoCompleteDay=${!#strings.isEmpty(autoCompleteDay)},
hasAutoCompleteYear=${!#strings.isEmpty(autoCompleteYear)},
hasErrorMonth=${errorMessages != null && !#arrays.isEmpty(errorMessages.get(inputName + 'Month'))},
hasErrorDay=${errorMessages != null && !#arrays.isEmpty(errorMessages.get(inputName + 'Day'))},
hasErrorYear=${errorMessages != null && !#arrays.isEmpty(errorMessages.get(inputName + 'Year'))},
Expand Down Expand Up @@ -47,9 +50,10 @@
th:name="${inputName}+'Month'"
th:placeholder="#{general.month-format}"
th:attr="
aria-describedby=${inputName + '-month-label'},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorMonth}"
autocomplete=${hasAutoCompleteMonth ? autoCompleteMonth : null},
aria-describedby=${inputName + '-month-label'},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorMonth}"
th:value="${fieldData.getOrDefault(inputName + 'Month', '')}"/>
/
<input type="text" inputmode="numeric" maxlength="2"
Expand All @@ -58,9 +62,10 @@
th:name="${inputName}+'Day'"
th:placeholder="#{general.day-format}"
th:attr="
aria-describedby=${inputName}+'-day-label',
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorDay}"
autocomplete=${hasAutoCompleteDay ? autoCompleteDay : null},
aria-describedby=${inputName}+'-day-label',
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorDay}"
th:value="${fieldData.getOrDefault(inputName + 'Day', '')}"/>
/
<input type="text" inputmode="numeric" maxlength="4"
Expand All @@ -69,9 +74,10 @@
th:name="${inputName}+ 'Year'"
th:placeholder="#{general.year-format}"
th:attr="
aria-describedby=${inputName}+'-year-label',
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorYear}"
autocomplete=${hasAutoCompleteYear ? autoCompleteYear : null},
aria-describedby=${inputName}+'-year-label',
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasErrorYear}"
th:value="${fieldData.getOrDefault(inputName + 'Year', '')}"/>
</fieldset>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/fragments/inputs/number.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
hasPattern=${!#strings.isEmpty(pattern)},
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
hasAutoComplete=${!#strings.isEmpty(autoComplete)},
requiredInputsForFlow=${requiredInputs.get(flow)},
isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)},
hasError=${
Expand All @@ -32,6 +33,7 @@
th:name="${inputName}"
th:placeholder="${placeholder}"
th:attr="
autocomplete=${hasAutoComplete ? autoComplete : null},
title=${hasTitle ? title : #messages.msg('general.inputs.number')},
pattern=${hasPattern ? pattern : '^\d*(\.\d{0,2})?$'},
aria-describedby=${hasHelpText ? inputName + '-help-text' : ''},
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/fragments/inputs/phone.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
hasHelpText=${!#strings.isEmpty(helpText)},
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
hasAutoComplete=${!#strings.isEmpty(autoComplete)},
requiredInputsForFlow=${requiredInputs.get(flow)},
isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)},
hasError=${
Expand All @@ -28,6 +29,7 @@
th:name="${inputName}"
th:placeholder="${placeholder}"
th:attr="
autocomplete=${hasAutoComplete ? autoComplete : null},
aria-describedby=${hasHelpText ? inputName + '-help-text' : ''},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasError}"
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/fragments/inputs/select.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
hasHelpText=${!#strings.isEmpty(helpText)},
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
hasAutoComplete=${!#strings.isEmpty(autoComplete)},
requiredInputsForFlow=${requiredInputs.get(flow)},
isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)},
hasError=${
Expand Down Expand Up @@ -31,6 +32,7 @@
th:id="${inputName}"
th:name="${inputName}"
th:attr="
autocomplete=${hasAutoComplete ? autoComplete : null},
aria-describedby=${hasHelpText ? inputName + '-help-text' : ''},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasError}">
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/fragments/inputs/text.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
hasHelpText=${!#strings.isEmpty(helpText)},
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
hasAutoComplete=${!#strings.isEmpty(autoComplete)},
requiredInputsForFlow=${requiredInputs.get(flow)},
isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)},
hasError=${
Expand All @@ -28,6 +29,7 @@
th:name="${inputName}"
th:placeholder="${placeholder}"
th:attr="
autocomplete=${hasAutoComplete ? autoComplete : null},
aria-describedby=${hasHelpText ? inputName + '-help-text' : ''},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
aria-invalid=${hasError}"
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/fragments/inputs/textArea.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
hasHelpText=${!#strings.isEmpty(helpText)},
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
hasAutoComplete=${!#strings.isEmpty(autoComplete)},
rows=${!#strings.isEmpty(rows)} ? ${rows} : '6',
maxLength=${!#strings.isEmpty(maxLength)} ? ${maxLength} : '500',
requiredInputsForFlow=${requiredInputs.get(flow)},
Expand All @@ -29,6 +30,7 @@
type="textarea"
class="textarea spacing-below-0"
th:attr="
autocomplete=${hasAutoComplete ? autoComplete : null},
aria-describedby=${hasHelpText ? inputName + '-help-text' : ''},
aria-labelledby=${hasAriaLabel ? ariaLabel : ''},
rows=${rows},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void documentUploadFlow() {
//Race condition caused by uploadPasswordProtectedPdf waits until upload file has file details added instead
//of waiting until file upload is complete.
try {
Thread.sleep(500);
Thread.sleep(2000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 9ea4330

Please sign in to comment.