Skip to content

Commit

Permalink
(#4484) Add Audio-Described Link to Video Content Type
Browse files Browse the repository at this point in the history
Closes #4484
  • Loading branch information
dev-rana-publicis committed Dec 18, 2024
1 parent aa9bd95 commit da86a68
Show file tree
Hide file tree
Showing 27 changed files with 2,050 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- 'drupal:file'
- 'drupal:image'
- 'drupal:language'
- 'drupal:link'
- 'drupal:media'
- 'drupal:options'
- 'drupal:path'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ function cgov_video_media_view(array &$build, EntityInterface $entity, EntityVie
unset($build['field_override_thumbnail_video']);
}
}

/**
* Implements hook_field_widget_single_element_WIDGET_TYPE_form_alter().
*/
function cgov_video_field_widget_single_element_link_default_form_alter(&$element, FormStateInterface $form_state, $context) {
if ($context['items']->getName() === 'field_audio_described_link') {
$element['uri']['#description'] = t('Used to provide a link to the audio-described file. Enter the full URL starting with https://');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- entity_browser.browser.cgov_site_section_browser
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand All @@ -28,6 +29,7 @@ dependencies:
- datetime
- entity_browser
- image
- link
- media
- paragraphs
- path
Expand All @@ -49,10 +51,18 @@ content:
third_party_settings: { }
created:
type: datetime_timestamp
weight: 22
weight: 23
region: content
settings: { }
third_party_settings: { }
field_audio_described_link:
type: link_default
weight: 15
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_browser_title:
type: string_textfield
weight: 5
Expand All @@ -79,25 +89,25 @@ content:
third_party_settings: { }
field_date_display_mode:
type: options_buttons
weight: 18
weight: 19
region: content
settings: { }
third_party_settings: { }
field_date_posted:
type: datetime_default
weight: 15
weight: 16
region: content
settings: { }
third_party_settings: { }
field_date_reviewed:
type: datetime_default
weight: 17
weight: 18
region: content
settings: { }
third_party_settings: { }
field_date_updated:
type: datetime_default
weight: 16
weight: 17
region: content
settings: { }
third_party_settings: { }
Expand Down Expand Up @@ -151,7 +161,7 @@ content:
third_party_settings: { }
field_related_resources:
type: paragraphs
weight: 19
weight: 20
region: content
settings:
title: Paragraph
Expand All @@ -170,7 +180,7 @@ content:
third_party_settings: { }
field_search_engine_restrictions:
type: options_select
weight: 20
weight: 21
region: content
settings: { }
third_party_settings: { }
Expand All @@ -197,7 +207,7 @@ content:
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 23
weight: 24
region: content
settings: { }
third_party_settings: { }
Expand All @@ -211,7 +221,7 @@ content:
third_party_settings: { }
path:
type: path
weight: 25
weight: 26
region: content
settings: { }
third_party_settings: { }
Expand All @@ -222,7 +232,7 @@ content:
third_party_settings: { }
status:
type: boolean_checkbox
weight: 24
weight: 25
region: content
settings:
display_label: true
Expand All @@ -234,7 +244,7 @@ content:
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 21
weight: 22
region: content
settings:
match_operator: CONTAINS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status: true
dependencies:
config:
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand All @@ -24,6 +25,7 @@ dependencies:
module:
- cgov_core
- image
- link
- media
- metatag
- options
Expand Down Expand Up @@ -65,6 +67,18 @@ content:
third_party_settings: { }
weight: 2
region: content
field_audio_described_link:
type: link
label: above
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 20
region: content
field_browser_title:
type: string
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.entity_browser_selected_entity
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -61,6 +62,7 @@ hidden:
body: true
content_moderation_control: true
created: true
field_audio_described_link: true
field_browser_title: true
field_caption: true
field_card_title: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.full
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -134,6 +135,7 @@ content:
region: content
hidden:
created: true
field_audio_described_link: true
field_browser_title: true
field_card_title: true
field_feature_card_description: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.image_reference_field_form
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -185,6 +186,7 @@ content:
weight: 0
region: content
hidden:
field_audio_described_link: true
field_meta_tags: true
field_override_thumbnail_video: true
field_page_description: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.link
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -62,6 +63,7 @@ hidden:
body: true
content_moderation_control: true
created: true
field_audio_described_link: true
field_caption: true
field_card_title: true
field_date_display_mode: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.multimedia_card
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -185,6 +186,7 @@ content:
weight: 0
region: content
hidden:
field_audio_described_link: true
field_meta_tags: true
field_override_thumbnail_video: true
field_page_description: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.thumbnail_card_image
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -31,6 +32,7 @@ hidden:
body: true
content_moderation_control: true
created: true
field_audio_described_link: true
field_browser_title: true
field_caption: true
field_card_title: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.video_display_cthp_multimedia
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand Down Expand Up @@ -79,6 +80,7 @@ content:
hidden:
body: true
created: true
field_audio_described_link: true
field_browser_title: true
field_card_title: true
field_date_display_mode: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.video_display_large_no_title
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand All @@ -24,6 +25,7 @@ dependencies:
- media.type.cgov_video
module:
- image
- link
- media
- text
id: media.cgov_video.video_display_large_no_title
Expand All @@ -36,6 +38,18 @@ content:
third_party_settings: { }
weight: 0
region: content
field_audio_described_link:
type: link
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 5
region: content
field_caption:
type: text_default
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.video_display_large_title
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand All @@ -24,6 +25,7 @@ dependencies:
- media.type.cgov_video
module:
- image
- link
- media
- text
id: media.cgov_video.video_display_large_title
Expand All @@ -36,6 +38,18 @@ content:
third_party_settings: { }
weight: 0
region: content
field_audio_described_link:
type: link
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 6
region: content
field_caption:
type: text_default
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.media.video_display_medium_no_title
- field.field.media.cgov_video.body
- field.field.media.cgov_video.field_audio_described_link
- field.field.media.cgov_video.field_browser_title
- field.field.media.cgov_video.field_caption
- field.field.media.cgov_video.field_card_title
Expand All @@ -24,6 +25,7 @@ dependencies:
- media.type.cgov_video
module:
- image
- link
- media
- text
id: media.cgov_video.video_display_medium_no_title
Expand All @@ -36,6 +38,18 @@ content:
third_party_settings: { }
weight: 0
region: content
field_audio_described_link:
type: link
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 5
region: content
field_caption:
type: text_default
label: hidden
Expand Down
Loading

0 comments on commit da86a68

Please sign in to comment.