From 2bf92b42b98782cb58df3df7fba7cdb255748043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=E2=84=93e=20Hensel?= Date: Wed, 2 Nov 2022 06:56:48 +1300 Subject: [PATCH] fix the phone input field showing the wrong placeholder (#9316) --- data/phone_formats.json | 1 + modules/ui/fields/input.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/data/phone_formats.json b/data/phone_formats.json index 32695dabb..19c2b42fd 100644 --- a/data/phone_formats.json +++ b/data/phone_formats.json @@ -40,6 +40,7 @@ "ms": "+1-664-555-1234", "nl": "+31 42 123 4567", "no": "+47 22 12 34 56", + "nz": "+64 9 123 4567", "pe": "+51 1 1234567", "pl": "+48 42 123 4567", "pr": "+1-787-555-1234", diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index c4fe17d99..2afa74c2b 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -324,6 +324,8 @@ export function uiFieldText(field, context) { .attr('placeholder', isMixed ? t('inspector.multiple_values') : (field.placeholder() || t('inspector.unknown'))) .classed('mixed', isMixed); + if (field.type === 'tel') updatePhonePlaceholder(); + if (field.key.split(':').includes('colour')) updateColourPreview(); if (outlinkButton && !outlinkButton.empty()) {