add field description and title

This commit is contained in:
Pete Matsyburka
2024-03-09 18:24:21 +02:00
parent 55616ac321
commit cfe5610ec9
18 changed files with 481 additions and 95 deletions
+23 -3
View File
@@ -2,10 +2,25 @@
<div>
<label
:for="isCodeSent ? 'one_time_code' : field.uuid"
class="label text-2xl mb-2"
>{{ showFieldNames && field.name ? field.name : t('verified_phone_number') }}
<template v-if="!field.required">({{ t('optional') }})</template>
class="label text-2xl"
:class="{ 'mb-2': !field.description }"
>
<MarkdownContent
v-if="field.title"
:string="field.title"
/>
<template v-else>
{{ showFieldNames && field.name ? field.name : t('verified_phone_number') }}
<template v-if="!field.required">({{ t('optional') }})</template>
</template>
</label>
<div
v-if="field.description"
dir="auto"
class="mb-3 px-1"
>
<MarkdownContent :string="field.description" />
</div>
<div>
<input
type="hidden"
@@ -68,6 +83,8 @@
</template>
<script>
import MarkdownContent from './markdown_content'
function throttle (func, delay) {
let lastCallTime = 0
@@ -83,6 +100,9 @@ function throttle (func, delay) {
export default {
name: 'PhoneStep',
components: {
MarkdownContent
},
inject: ['t', 'baseUrl'],
props: {
field: {