Skip to content
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

VATEAM-90732: Add OMB info fields to Digital Form #19078

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions config/sync/core.entity_form_display.node.digital_form.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ dependencies:
config:
- field.field.node.digital_form.field_administration
- field.field.node.digital_form.field_chapters
- field.field.node.digital_form.field_expiration_date
- field.field.node.digital_form.field_last_saved_by_an_editor
- field.field.node.digital_form.field_meta_tags
- field.field.node.digital_form.field_omb_number
- field.field.node.digital_form.field_respondent_burden
- field.field.node.digital_form.field_va_form_number
- node.type.digital_form
- workflows.workflow.editorial
module:
- change_labels
- content_moderation
- datetime
- field_group
- limited_field_widgets
- no_table_drag
Expand All @@ -29,7 +32,7 @@ third_party_settings:
label: 'Editorial Workflow'
region: content
parent_name: ''
weight: 6
weight: 7
format_type: fieldset
format_settings:
classes: ''
Expand All @@ -38,14 +41,33 @@ third_party_settings:
description: ''
required_fields: true
description_display: after
group_omb_info:
children:
- field_respondent_burden
- field_omb_number
- field_expiration_date
label: 'OMB info'
region: content
parent_name: ''
weight: 4
format_type: fieldset
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
description: 'Text required by the Office of Management and Budget (OMB) to be present on all forms.'
required_fields: true
open: true
description_display: after
id: node.digital_form.default
targetEntityType: node
bundle: digital_form
mode: default
content:
field_chapters:
type: paragraphs_browser
weight: 5
weight: 6
region: content
settings:
title: Step
Expand Down Expand Up @@ -78,6 +100,12 @@ content:
add_another: ''
no_table_drag:
no_table_drag: false
field_expiration_date:
type: datetime_default
weight: 9
region: content
settings: { }
third_party_settings: { }
field_last_saved_by_an_editor:
type: datetime_timestamp
weight: 2
Expand All @@ -86,12 +114,19 @@ content:
third_party_settings: { }
field_omb_number:
type: string_textfield
weight: 4
weight: 8
region: content
settings:
size: 9
placeholder: XXXX-XXXX
third_party_settings: { }
field_respondent_burden:
type: number
weight: 7
region: content
settings:
placeholder: ''
third_party_settings: { }
field_va_form_number:
type: string_textfield
weight: 1
Expand Down
47 changes: 44 additions & 3 deletions config/sync/core.entity_view_display.node.digital_form.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,37 @@ dependencies:
config:
- field.field.node.digital_form.field_administration
- field.field.node.digital_form.field_chapters
- field.field.node.digital_form.field_expiration_date
- field.field.node.digital_form.field_last_saved_by_an_editor
- field.field.node.digital_form.field_meta_tags
- field.field.node.digital_form.field_omb_number
- field.field.node.digital_form.field_respondent_burden
- field.field.node.digital_form.field_va_form_number
- node.type.digital_form
module:
- datetime
- entity_reference_revisions
- field_group
- user
third_party_settings:
field_group:
group_omb_info:
children:
- field_respondent_burden
- field_omb_number
- field_expiration_date
label: 'OMB info'
parent_name: ''
region: content
weight: 1
format_type: details
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
open: true
description: ''
id: node.digital_form.default
targetEntityType: node
bundle: digital_form
Expand All @@ -25,15 +48,33 @@ content:
view_mode: default
link: ''
third_party_settings: { }
weight: 2
weight: 3
region: content
field_expiration_date:
type: datetime_default
label: inline
settings:
timezone_override: ''
format_type: short_date_no_time
third_party_settings: { }
weight: 7
region: content
field_omb_number:
type: string
label: above
label: inline
settings:
link_to_entity: false
third_party_settings: { }
weight: 1
weight: 6
region: content
field_respondent_burden:
type: number_integer
label: inline
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 5
region: content
field_va_form_number:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ dependencies:
- core.entity_view_mode.node.external_content
- field.field.node.digital_form.field_administration
- field.field.node.digital_form.field_chapters
- field.field.node.digital_form.field_expiration_date
- field.field.node.digital_form.field_last_saved_by_an_editor
- field.field.node.digital_form.field_meta_tags
- field.field.node.digital_form.field_omb_number
- field.field.node.digital_form.field_respondent_burden
- field.field.node.digital_form.field_va_form_number
- node.type.digital_form
module:
Expand Down Expand Up @@ -52,8 +54,10 @@ content:
hidden:
field_administration: true
field_chapters: true
field_expiration_date: true
field_last_saved_by_an_editor: true
field_meta_tags: true
field_omb_number: true
field_respondent_burden: true
langcode: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ dependencies:
- core.entity_view_mode.node.teaser
- field.field.node.digital_form.field_administration
- field.field.node.digital_form.field_chapters
- field.field.node.digital_form.field_expiration_date
- field.field.node.digital_form.field_last_saved_by_an_editor
- field.field.node.digital_form.field_meta_tags
- field.field.node.digital_form.field_omb_number
- field.field.node.digital_form.field_respondent_burden
- field.field.node.digital_form.field_va_form_number
- node.type.digital_form
module:
Expand Down Expand Up @@ -44,9 +46,11 @@ content:
hidden:
field_administration: true
field_chapters: true
field_expiration_date: true
field_last_saved_by_an_editor: true
field_meta_tags: true
field_omb_number: true
field_respondent_burden: true
field_va_form_number: true
langcode: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: fa5b4181-5374-42bc-bcba-6c126c46e4fc
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_expiration_date
- node.type.digital_form
module:
- datetime
- tmgmt_content
third_party_settings:
tmgmt_content:
excluded: false
id: node.digital_form.field_expiration_date
field_name: field_expiration_date
entity_type: node
bundle: digital_form
label: 'Expiration date'
description: 'The form expiration date.'
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: datetime
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ entity_type: node
bundle: digital_form
label: 'OMB Number'
description: 'Format: XXXX-XXXX'
required: false
required: true
translatable: false
default_value: { }
default_value_callback: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
uuid: a8a630a0-e849-49b6-8a8b-799a1e85012f
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_respondent_burden
- node.type.digital_form
module:
- tmgmt_content
third_party_settings:
tmgmt_content:
excluded: false
id: node.digital_form.field_respondent_burden
field_name: field_respondent_burden
entity_type: node
bundle: digital_form
label: 'Respondent burden'
description: 'How many minutes the form is expected to take.'
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: 0
max: null
prefix: ''
suffix: ' minute| minutes'
field_type: integer
20 changes: 20 additions & 0 deletions config/sync/field.storage.node.field_expiration_date.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: aa2a5ea2-6260-4b42-921f-76ccd0f21220
langcode: en
status: true
dependencies:
module:
- datetime
- node
id: node.field_expiration_date
field_name: field_expiration_date
entity_type: node
type: datetime
settings:
datetime_type: date
module: datetime
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
20 changes: 20 additions & 0 deletions config/sync/field.storage.node.field_respondent_burden.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 5412244a-523a-4734-80ed-53f8016430ff
langcode: en
status: true
dependencies:
module:
- node
id: node.field_respondent_burden
field_name: field_respondent_burden
entity_type: node
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class DigitalFormTest extends VaGovExistingSiteBase {
*/
public function testBundleClass() {
$digital_form_attrs = [
'field_expiration_date' => '2025-08-28',
'field_respondent_burden' => 5,
'field_va_form_number' => '12345',
'field_omb_number' => '1234-5678',
'title' => 'Test Digital Form',
Expand All @@ -31,10 +33,18 @@ public function testBundleClass() {
$node->get('field_va_form_number')->getString(),
$digital_form_attrs['field_va_form_number']
);
$this->assertEquals(
$node->get('field_expiration_date')->getString(),
$digital_form_attrs['field_expiration_date']
);
$this->assertEquals(
$node->get('field_omb_number')->getString(),
$digital_form_attrs['field_omb_number']
);
$this->assertEquals(
$node->get('field_respondent_burden')->getString(),
$digital_form_attrs['field_respondent_burden']
);
}

}
Loading