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

Plain text address #396

Merged
merged 1 commit into from
Apr 12, 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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"composer/installers": "^1.7",
"cure53/dompurify": "^3.0",
"cweagans/composer-patches": "^1.7",
"drupal/advanced_text_formatter": "^3.0",
"drupal/allowed_formats": "^3.0",
"drupal/better_exposed_filters": "^6.0",
"drupal/better_social_sharing_buttons": "^4.0",
Expand Down
50 changes: 49 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ status: true
dependencies:
config:
- block_content.type.aside_contact_info
- field.field.block_content.aside_contact_info.body
- field.field.block_content.aside_contact_info.field_address
- field.field.block_content.aside_contact_info.field_department
- field.field.block_content.aside_contact_info.field_email
- field.field.block_content.aside_contact_info.field_phone_number
- field.field.block_content.aside_contact_info.field_title
module:
- text
id: block_content.aside_contact_info.default
targetEntityType: block_content
bundle: aside_contact_info
mode: default
content:
body:
type: text_textarea_with_summary
field_address:
type: string_textarea
weight: 4
region: content
settings:
rows: 9
summary_rows: 3
rows: 5
placeholder: ''
show_summary: false
third_party_settings: { }
field_department:
type: string_textfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@ status: true
dependencies:
config:
- block_content.type.aside_contact_info
- field.field.block_content.aside_contact_info.body
- field.field.block_content.aside_contact_info.field_address
- field.field.block_content.aside_contact_info.field_department
- field.field.block_content.aside_contact_info.field_email
- field.field.block_content.aside_contact_info.field_phone_number
- field.field.block_content.aside_contact_info.field_title
module:
- text
- advanced_text_formatter
id: block_content.aside_contact_info.default
targetEntityType: block_content
bundle: aside_contact_info
mode: default
content:
body:
type: text_default
label: visually_hidden
settings: { }
field_address:
type: advanced_text
label: above
settings:
trim_length: '0'
filter: limit_html
format: plain_text
allowed_html: { }
autop: '1'
ellipsis: 0
word_boundary: 0
use_summary: 0
token_replace: 0
link_to_entity: 0
third_party_settings: { }
weight: 2
region: content
Expand Down
1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ _core:
langcode: da
module:
aarhus_hero: 0
advanced_text_formatter: 0
advancedqueue: 0
allowed_formats: 0
better_exposed_filters: 0
Expand Down
26 changes: 0 additions & 26 deletions config/sync/field.field.block_content.aside_contact_info.body.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 09ad4697-df95-4ca7-9355-41cde5a55122
langcode: da
status: true
dependencies:
config:
- block_content.type.aside_contact_info
- field.storage.block_content.field_address
id: block_content.aside_contact_info.field_address
field_name: field_address
entity_type: block_content
bundle: aside_contact_info
label: Address
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string_long
19 changes: 19 additions & 0 deletions config/sync/field.storage.block_content.field_address.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 5af9d097-6695-49d0-a8fd-ef3cd7c3ba8a
langcode: da
status: true
dependencies:
module:
- block_content
id: block_content.field_address
field_name: field_address
entity_type: block_content
type: string_long
settings:
case_sensitive: false
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 @@ -39,6 +39,7 @@

<div class="aside-block p-3 p-md-5">
{% for item in items %}
{% set block = item.content['#block_content'] %}
{% if item.content.field_department %}
<div class="text-primary">
{{ item.content.field_department }}
Expand All @@ -49,9 +50,9 @@
{{ item.content.field_title }}
</div>
{% endif %}
{% if item.content.body %}
{% if item.content.field_address %}
<div>
{{ item.content.body }}
{{ item.content.field_address }}
</div>
{% endif %}
{% if item.content.field_phone_number %}
Expand All @@ -64,6 +65,5 @@
{{ 'Email'|trans }}:{{ item.content.field_email }}
</div>
{% endif %}
{{ item.content|without('field_department', 'field_title', 'body', 'field_phone_number', 'field_email') }}
{% endfor %}
</div>
Loading