Merge pull request #38947 from nextcloud/fix/contacts/3404/put-location-in-proper-place-stable27

[stable27] Manuel backport: fix(sab): put location in proper address field
pull/39261/head
Johannes 2 years ago committed by GitHub
commit 05de066ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      apps/dav/lib/CardDAV/Converter.php
  2. 2
      apps/settings/src/components/PersonalInfo/LocationSection.vue
  3. 4
      dist/settings-vue-settings-personal-info.js
  4. 2
      dist/settings-vue-settings-personal-info.js.map

@ -92,7 +92,19 @@ class Converter {
$vCard->add(new Text($vCard, 'TEL', $property->getValue(), ['TYPE' => 'OTHER', 'X-NC-SCOPE' => $scope]));
break;
case IAccountManager::PROPERTY_ADDRESS:
$vCard->add(new Text($vCard, 'ADR', $property->getValue(), ['TYPE' => 'OTHER', 'X-NC-SCOPE' => $scope]));
// structured prop: https://www.rfc-editor.org/rfc/rfc6350.html#section-6.3.1
// post office box;extended address;street address;locality;region;postal code;country
$vCard->add(
new Text(
$vCard,
'ADR',
[ '', '', '', $property->getValue(), '', '', '' ],
[
'TYPE' => 'OTHER',
'X-NC-SCOPE' => $scope,
]
)
);
break;
case IAccountManager::PROPERTY_TWITTER:
$vCard->add(new Text($vCard, 'X-SOCIALPROFILE', $property->getValue(), ['TYPE' => 'TWITTER', 'X-NC-SCOPE' => $scope]));

@ -23,7 +23,7 @@
<template>
<AccountPropertySection v-bind.sync="location"
autocomplete="address-level1"
:placeholder="t('settings', 'Your location')" />
:placeholder="t('settings', 'Your city')" />
</template>
<script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save