Skip to content

Commit

Permalink
UHF-6665: removed the info text field & added info to other fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ltpk-siili authored and sakkelaaksonen-siili committed Oct 12, 2022
1 parent 62aa3ee commit dda5eda
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.'

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.'
1 change: 0 additions & 1 deletion helfi_features/helfi_events/helfi_events.install
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

Expand Down
6 changes: 3 additions & 3 deletions helfi_features/helfi_events/helfi_events.module
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -54,15 +54,15 @@ 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();
}

/**
* Returns string translations for frontend
*
*
* @return array
* the translated strings
*/
Expand Down

0 comments on commit dda5eda

Please sign in to comment.