From 1c45f0963219f3aa743b2ddf9840e2d152b0fae5 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 22 Apr 2024 18:30:58 +0200 Subject: [PATCH] Themes: add support for operator:email, mostly for velopark --- assets/layers/bike_parking/bike_parking.json | 13 +++++++++++++ assets/layers/icons/icons.json | 8 +++++++- assets/layers/questions/questions.json | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/assets/layers/bike_parking/bike_parking.json b/assets/layers/bike_parking/bike_parking.json index 27fdfa98c..fbcc6d6de 100644 --- a/assets/layers/bike_parking/bike_parking.json +++ b/assets/layers/bike_parking/bike_parking.json @@ -795,6 +795,19 @@ } ] }, + { + "id": "operator_email", + "question": { + "en": "What is the email address of the operator of this bicycle parking?", + "nl": "Wat is het emailadres van de beheerder van deze parking?" + }, + "icon": "./assets/svg/envelope.svg", + "freeform": { + "key": "operator:email", + "type": "email" + }, + "render": "{operator:email}" + }, { "question": { "en": "Does this bicycle parking have spots for cargo bikes?", diff --git a/assets/layers/icons/icons.json b/assets/layers/icons/icons.json index 70b9666ae..8b290c036 100644 --- a/assets/layers/icons/icons.json +++ b/assets/layers/icons/icons.json @@ -167,12 +167,18 @@ "#": "ignore-image-in-then", "if": "contact:email~*", "then": "email" + }, + { + "#": "ignore-image-in-then", + "if": "operator:email~*", + "then": "email" } ], "condition": { "or": [ "email~*", - "contact:email~*" + "contact:email~*", + "operator:email~*" ] } }, diff --git a/assets/layers/questions/questions.json b/assets/layers/questions/questions.json index 4f905b131..d9b364b52 100644 --- a/assets/layers/questions/questions.json +++ b/assets/layers/questions/questions.json @@ -266,6 +266,12 @@ "icon": "./assets/svg/envelope.svg", "then": "{contact:email}", "hideInAnswer": true + }, + { + "if": "operator:email~*", + "icon": "./assets/svg/envelope.svg", + "then": "{operator:email}", + "hideInAnswer": true } ], "freeform": {