Themes: add support for operator:email, mostly for velopark

This commit is contained in:
Pieter Vander Vennet 2024-04-22 18:30:58 +02:00
parent 5659dd8e8c
commit 1c45f09632
3 changed files with 26 additions and 1 deletions

View file

@ -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": "<a href='mailto:{operator:email}' target='_blank' rel='noopener'>{operator:email}</a>"
},
{
"question": {
"en": "Does this bicycle parking have spots for cargo bikes?",

View file

@ -167,12 +167,18 @@
"#": "ignore-image-in-then",
"if": "contact:email~*",
"then": "<a href='mailto:{contact:email}'><img textmode='✉️' alt='email' src='./assets/layers/questions/send_email.svg'/></a>"
},
{
"#": "ignore-image-in-then",
"if": "operator:email~*",
"then": "<a href='mailto:{operator:email}'><img textmode='✉️' alt='email' src='./assets/layers/questions/send_email.svg'/></a>"
}
],
"condition": {
"or": [
"email~*",
"contact:email~*"
"contact:email~*",
"operator:email~*"
]
}
},

View file

@ -266,6 +266,12 @@
"icon": "./assets/svg/envelope.svg",
"then": "<a href='mailto:{contact:email}' target='_blank' rel='noopener'>{contact:email}</a>",
"hideInAnswer": true
},
{
"if": "operator:email~*",
"icon": "./assets/svg/envelope.svg",
"then": "<a href='mailto:{operator:email}' target='_blank' rel='noopener'>{operator:email}</a>",
"hideInAnswer": true
}
],
"freeform": {