From f9cb12edb75558ff853157c8859d832c2a0bf00a Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Tue, 11 Aug 2020 17:59:47 +0200 Subject: [PATCH] :sparkles: Add option to set prepend in Carbon.Link:Telephone --- Resources/Private/Fusion/Link/Telphone.fusion | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Resources/Private/Fusion/Link/Telphone.fusion b/Resources/Private/Fusion/Link/Telphone.fusion index fbe3ae9..3720c6b 100644 --- a/Resources/Private/Fusion/Link/Telphone.fusion +++ b/Resources/Private/Fusion/Link/Telphone.fusion @@ -1,5 +1,6 @@ prototype(Carbon.Link:Telephone) < prototype(Neos.Fusion:Value) { defaultCountryCode = ${Configuration.setting('Carbon.Link.defaultPhoneCountryCode')} + prepend = 'tel:' value = ${value} value.@process { @@ -7,6 +8,6 @@ prototype(Carbon.Link:Telephone) < prototype(Neos.Fusion:Value) { removeSpaces = ${String.pregReplace(value, '/\s/', '')} removeZerosInBrackets = ${String.replace(value, '(0)', '')} makeLocalNumberInternational = ${this.defaultCountryCode ? String.pregReplace(value, '/^0([1-9])/', this.defaultCountryCode + '$1') : value} - prependTelProtocol = ${value ? 'tel:' + value : value} + prependTelProtocol = ${value && props.prepend ? props.prepend + value : value} } }