Skip to content

Commit

Permalink
fix(ux, backporting): Merge pull request #20 from shuklina/RGTC-2204
Browse files Browse the repository at this point in the history
Hide direction if the address is empty
  • Loading branch information
podarok authored Jan 25, 2022
2 parents 5aef451 + 641b263 commit a91c64d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,37 @@ field_name: field_location_address
entity_type: node
bundle: branch
label: Address
description: ''
required: true
description: 'Put address here or keep it empty to disable address and Directions url'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
available_countries:
US: US
fields:
administrativeArea: administrativeArea
locality: locality
postalCode: postalCode
addressLine1: addressLine1
dependentLocality: '0'
sortingCode: '0'
addressLine2: '0'
organization: '0'
givenName: '0'
additionalName: '0'
familyName: '0'
langcode_override: ''
field_overrides: { }
field_overrides:
givenName:
override: hidden
additionalName:
override: hidden
familyName:
override: hidden
organization:
override: hidden
addressLine1:
override: optional
addressLine2:
override: hidden
postalCode:
override: optional
sortingCode:
override: hidden
dependentLocality:
override: hidden
locality:
override: optional
administrativeArea:
override: optional
fields: { }
field_type: address
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ field_name: field_location_directions
entity_type: node
bundle: branch
label: Directions
description: ''
description: 'To remove the "Get Directions" link from the location page, just leave URL and Link text fields blank.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
link_type: 17
title: 1
link_type: 17
field_type: link
13 changes: 13 additions & 0 deletions openy_location/modules/openy_loc_branch/openy_loc_branch.install
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,16 @@ function openy_loc_branch_update_8023() {
}
}
}

/**
* Address Field not "Required".
*/
function openy_loc_branch_update_8024() {
$path = \Drupal::service('extension.list.module')->getPath('openy_loc_branch') . '/config/install';
$config_importer = \Drupal::service('config_import.importer');
$config_importer->setDirectory($path);
$config_importer->importConfigs([
'field.field.node.branch.field_location_address',
'field.field.node.branch.field_location_directions',
]);
}

0 comments on commit a91c64d

Please sign in to comment.