From dda5eda02b708f607968db8dd3287d9abd5f7e63 Mon Sep 17 00:00:00 2001 From: Lauri Kolehmainen Date: Tue, 27 Sep 2022 11:29:28 +0300 Subject: [PATCH] UHF-6665: removed the info text field & added info to other fields --- ...m_display.paragraph.event_list.default.yml | 9 ------- ...w_display.paragraph.event_list.default.yml | 8 ------- ...agraph.event_list.field_event_location.yml | 2 +- ...vent_list.field_remote_event_info_text.yml | 24 ------------------- ...ragraph.event_list.field_remote_events.yml | 2 +- ...paragraph.field_remote_event_info_text.yml | 18 -------------- ...agraph.event_list.field_event_location.yml | 2 +- ...vent_list.field_remote_event_info_text.yml | 2 -- ...ragraph.event_list.field_remote_events.yml | 2 +- .../helfi_events/helfi_events.install | 1 - .../helfi_events/helfi_events.module | 6 ++--- 11 files changed, 7 insertions(+), 69 deletions(-) delete mode 100644 helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_event_info_text.yml delete mode 100644 helfi_features/helfi_events/config/install/field.storage.paragraph.field_remote_event_info_text.yml delete mode 100644 helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_event_info_text.yml diff --git a/helfi_features/helfi_events/config/install/core.entity_form_display.paragraph.event_list.default.yml b/helfi_features/helfi_events/config/install/core.entity_form_display.paragraph.event_list.default.yml index b63add8e4..9e3ae65f3 100644 --- a/helfi_features/helfi_events/config/install/core.entity_form_display.paragraph.event_list.default.yml +++ b/helfi_features/helfi_events/config/install/core.entity_form_display.paragraph.event_list.default.yml @@ -9,7 +9,6 @@ dependencies: - field.field.paragraph.event_list.field_event_time - field.field.paragraph.event_list.field_free_events - field.field.paragraph.event_list.field_load_more - - field.field.paragraph.event_list.field_remote_event_info_text - field.field.paragraph.event_list.field_remote_events - paragraphs.paragraphs_type.event_list module: @@ -72,14 +71,6 @@ content: settings: display_label: true third_party_settings: { } - field_remote_event_info_text: - type: string_textarea - weight: 8 - region: content - settings: - rows: 5 - placeholder: '' - third_party_settings: { } field_remote_events: type: boolean_checkbox weight: 6 diff --git a/helfi_features/helfi_events/config/install/core.entity_view_display.paragraph.event_list.default.yml b/helfi_features/helfi_events/config/install/core.entity_view_display.paragraph.event_list.default.yml index 3c0eaf3fa..0091b2c04 100644 --- a/helfi_features/helfi_events/config/install/core.entity_view_display.paragraph.event_list.default.yml +++ b/helfi_features/helfi_events/config/install/core.entity_view_display.paragraph.event_list.default.yml @@ -9,7 +9,6 @@ dependencies: - field.field.paragraph.event_list.field_event_time - field.field.paragraph.event_list.field_free_events - field.field.paragraph.event_list.field_load_more - - field.field.paragraph.event_list.field_remote_event_info_text - field.field.paragraph.event_list.field_remote_events - paragraphs.paragraphs_type.event_list module: @@ -64,13 +63,6 @@ content: third_party_settings: { } weight: 5 region: content - field_remote_event_info_text: - type: basic_string - label: above - settings: { } - third_party_settings: { } - weight: 6 - region: content field_remote_events: type: boolean label: above diff --git a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_event_location.yml b/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_event_location.yml index cf47c63e1..d66128117 100644 --- a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_event_location.yml +++ b/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_event_location.yml @@ -15,7 +15,7 @@ field_name: field_event_location entity_type: paragraph bundle: event_list label: 'Event location' -description: 'Show "event location" filter.' +description: 'Show "event location" filter. Do not use at the same time with the "Remote events" filter.' required: false translatable: false default_value: diff --git a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_event_info_text.yml b/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_event_info_text.yml deleted file mode 100644 index f55ca2f70..000000000 --- a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_event_info_text.yml +++ /dev/null @@ -1,24 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_remote_event_info_text - - paragraphs.paragraphs_type.event_list - module: - - disable_field -third_party_settings: - disable_field: - add_disable: none - edit_disable: none -id: paragraph.event_list.field_remote_event_info_text -field_name: field_remote_event_info_text -entity_type: paragraph -bundle: event_list -label: 'Remote event info text' -description: 'Info text about remote events.' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: { } -field_type: string_long diff --git a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_events.yml b/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_events.yml index 114a7de76..e885dd492 100644 --- a/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_events.yml +++ b/helfi_features/helfi_events/config/install/field.field.paragraph.event_list.field_remote_events.yml @@ -15,7 +15,7 @@ field_name: field_remote_events entity_type: paragraph bundle: event_list label: 'Remote events' -description: 'Show "list only remote events" filter.' +description: 'Show "list only remote events" filter. Do not use at the same time with the "Event location" filter.' required: false translatable: false default_value: diff --git a/helfi_features/helfi_events/config/install/field.storage.paragraph.field_remote_event_info_text.yml b/helfi_features/helfi_events/config/install/field.storage.paragraph.field_remote_event_info_text.yml deleted file mode 100644 index 5af2d1e43..000000000 --- a/helfi_features/helfi_events/config/install/field.storage.paragraph.field_remote_event_info_text.yml +++ /dev/null @@ -1,18 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - paragraphs -id: paragraph.field_remote_event_info_text -field_name: field_remote_event_info_text -entity_type: paragraph -type: string_long -settings: - case_sensitive: false -module: core -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_event_location.yml b/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_event_location.yml index a856b081d..e61dab35f 100644 --- a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_event_location.yml +++ b/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_event_location.yml @@ -1,2 +1,2 @@ label: 'Tapahtumapaikka' -description: 'Näytä "tapahtumapaikka" -suodatin .' +description: 'Näytä "tapahtumapaikka" -suodatin. Älä käytä yhtä aikaa "Etätapahtumat" -suodattimen kanssa.' diff --git a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_event_info_text.yml b/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_event_info_text.yml deleted file mode 100644 index 4088380eb..000000000 --- a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_event_info_text.yml +++ /dev/null @@ -1,2 +0,0 @@ -label: 'Ohjeteksti' -description: 'Etätapahtumia koskeva ohjeteksti.' diff --git a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_events.yml b/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_events.yml index 4d6aabb04..5fc2b399e 100644 --- a/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_events.yml +++ b/helfi_features/helfi_events/config/language/fi/field.field.paragraph.event_list.field_remote_events.yml @@ -1,2 +1,2 @@ label: 'Etätapahtumat' -description: 'Näytä "näytä vain etätapahtumat" -suodatin.' +description: 'Näytä "näytä vain etätapahtumat" -suodatin. Älä käytä yhtä aikaa "Tapahtumapaikka" -suodattimen kanssa.' diff --git a/helfi_features/helfi_events/helfi_events.install b/helfi_features/helfi_events/helfi_events.install index 1545bd54e..5930bc15b 100644 --- a/helfi_features/helfi_events/helfi_events.install +++ b/helfi_features/helfi_events/helfi_events.install @@ -61,7 +61,6 @@ function helfi_events_update_9002() { 'field.storage.paragraph.field_event_location' => 'field.field.paragraph.event_list.field_event_location', 'field.storage.paragraph.field_event_time' => 'field.field.paragraph.event_list.field_event_time', 'field.storage.paragraph.field_free_events' => 'field.field.paragraph.event_list.field_free_events', - 'field.storage.paragraph.field_remote_event_info_text' => 'field.field.paragraph.event_list.field_remote_event_info_text', 'field.storage.paragraph.field_remote_events' => 'field.field.paragraph.event_list.field_remote_events', ]; diff --git a/helfi_features/helfi_events/helfi_events.module b/helfi_features/helfi_events/helfi_events.module index 612e9a6f1..1a185e8bd 100644 --- a/helfi_features/helfi_events/helfi_events.module +++ b/helfi_features/helfi_events/helfi_events.module @@ -10,7 +10,7 @@ function helfi_events_preprocess_paragraph__event_list(&$variables) { if(isset($variables['paragraph'])) { $paragraph = $variables['paragraph']; $linkedEvents = Drupal::service('helfi_events_linked_events'); - + if (!$paragraph->get('field_api_url')->isEmpty()) { $intialUrl = $paragraph->get('field_api_url')->first()->getUrl()->toString(); $params = $linkedEvents->parseParams($intialUrl); @@ -54,7 +54,7 @@ function helfi_events_preprocess_paragraph__event_list(&$variables) { 'theme_hook_original' => '' ] ); - + $variables['#attached']['library'][] = 'helfi_events/events_list'; $variables['#attached']['drupalSettings']['helfi_events']['baseUrl'] = LinkedEvents::BASE_URL; $variables['#attached']['drupalSettings']['helfi_events']['translations'] = _helfi_events_translations(); @@ -62,7 +62,7 @@ function helfi_events_preprocess_paragraph__event_list(&$variables) { /** * Returns string translations for frontend - * + * * @return array * the translated strings */