Skip to content

Commit ceb64a3

Browse files
committed
adjust payment step
1 parent b90c67b commit ceb64a3

4 files changed

Lines changed: 46 additions & 4 deletions

File tree

app/javascript/submission_form/i18n.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const en = {
1010
date: 'Date',
1111
number: 'Number',
1212
image: 'Image',
13+
pay: 'Pay',
1314
take_photo: 'Take photo',
1415
number_phone_is_invalid: '{number} phone is invalid',
1516
file: 'File',
@@ -79,6 +80,7 @@ const es = {
7980
minimize: 'Minimizar',
8081
text: 'Texto',
8182
signature: 'Firma',
83+
pay: 'Pagar',
8284
initials: 'Iniciales',
8385
date: 'Fecha',
8486
number: 'Número',
@@ -154,6 +156,7 @@ const it = {
154156
date: 'Data',
155157
number: 'Numero',
156158
image: 'Immagine',
159+
pay: 'Pagamento',
157160
file: 'File',
158161
select: 'Seleziona',
159162
checkbox: 'Casella di controllo',
@@ -225,6 +228,7 @@ const de = {
225228
date: 'Datum',
226229
number: 'Nummer',
227230
image: 'Bild',
231+
pay: 'Bezahlen',
228232
file: 'Datei',
229233
select: 'Auswählen',
230234
checkbox: 'Checkbox',
@@ -293,6 +297,7 @@ const fr = {
293297
text: 'Texte',
294298
signature: 'Signature',
295299
initials: 'Initiales',
300+
pay: 'Payer',
296301
date: 'Date',
297302
number: 'Numéro',
298303
image: 'Image',
@@ -368,6 +373,7 @@ const pl = {
368373
number: 'Numer',
369374
image: 'Obraz',
370375
file: 'Plik',
376+
pay: 'Zapłać',
371377
select: 'Wybierz',
372378
checkbox: 'Pole wyboru',
373379
multiple: 'Wielokrotne',
@@ -438,6 +444,7 @@ const uk = {
438444
date: 'Дата',
439445
number: 'Число',
440446
image: 'Зображення',
447+
pay: 'Оплата',
441448
file: 'Файл',
442449
select: 'Вибрати',
443450
checkbox: 'Прапорець',
@@ -509,6 +516,7 @@ const cs = {
509516
date: 'Datum',
510517
number: 'Číslo',
511518
image: 'Obrázek',
519+
pay: 'Zaplatit',
512520
file: 'Soubor',
513521
select: 'Vybrat',
514522
checkbox: 'Zaškrtávací políčko',
@@ -580,6 +588,7 @@ const pt = {
580588
date: 'Data',
581589
number: 'Número',
582590
image: 'Imagem',
591+
pay: 'Pagar',
583592
file: 'Arquivo',
584593
select: 'Selecionar',
585594
checkbox: 'Caixa',
@@ -652,6 +661,7 @@ const he = {
652661
number: 'מספר',
653662
image: 'תמונה',
654663
file: 'קובץ',
664+
pay: 'תשלום',
655665
select: 'בחר',
656666
checkbox: 'תיק בחירה',
657667
multiple: 'רב ערכים',
@@ -728,6 +738,7 @@ const nl = {
728738
select: 'Selecteer',
729739
checkbox: 'Aankruisvakje',
730740
multiple: 'Meerdere',
741+
pay: 'Betaal',
731742
radio: 'Radio',
732743
cells: 'Cellen',
733744
stamp: 'Stempel',
@@ -795,6 +806,7 @@ const ar = {
795806
number: 'رقم',
796807
image: 'صورة',
797808
take_photo: 'التقاط صورة',
809+
pay: 'دفع',
798810
file: 'ملف',
799811
select: 'اختيار',
800812
checkbox: 'خانة اختيار',
@@ -865,6 +877,7 @@ const ko = {
865877
initials: '이니셜',
866878
date: '날짜',
867879
number: '숫자',
880+
pay: '급여',
868881
image: '이미지',
869882
take_photo: '사진 찍기',
870883
file: '파일',

app/javascript/submission_form/payment_step.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@
33
v-if="!modelValue && !sessionId"
44
:for="field.uuid"
55
class="label text-2xl mb-2"
6-
>{{ field.name || defaultName }}
6+
>
7+
<MarkdownContent
8+
v-if="field.title"
9+
:string="field.title"
10+
/>
11+
<template v-else>{{ field.name || defaultName }}</template>
712
</label>
13+
<div
14+
v-if="field.description"
15+
dir="auto"
16+
class="mb-4 px-1"
17+
>
18+
<MarkdownContent :string="field.description" />
19+
</div>
820
<div>
921
<input
1022
type="text"
@@ -60,11 +72,13 @@
6072

6173
<script>
6274
import { IconBrandStripe, IconInnerShadowTop, IconLoader } from '@tabler/icons-vue'
75+
import MarkdownContent from './markdown_content'
6376
6477
export default {
6578
name: 'PaymentStep',
6679
components: {
6780
IconBrandStripe,
81+
MarkdownContent,
6882
IconInnerShadowTop,
6983
IconLoader
7084
},
@@ -105,7 +119,7 @@ export default {
105119
currency
106120
}).format(price)
107121
108-
return `Pay ${formattedPrice}`
122+
return this.t('pay') + ' ' + formattedPrice
109123
}
110124
},
111125
mounted () {

app/javascript/template_builder/field.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
v-if="field.type === 'payment'"
9494
:field="field"
9595
@click-condition="isShowConditionsModal = true"
96+
@click-description="isShowDescriptionModal = true"
9697
/>
9798
<span
9899
v-else

app/javascript/template_builder/payment_settings.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,19 @@
150150
>Learn more</a>
151151
</div>
152152
<hr>
153+
<li class="mt-1">
154+
<label
155+
class="label-text cursor-pointer text-center w-full flex items-center"
156+
@click="$emit('click-description')"
157+
>
158+
<IconInfoCircle
159+
width="18"
160+
/>
161+
<span class="text-sm">
162+
{{ t('description') }}
163+
</span>
164+
</label>
165+
</li>
153166
<li class="mt-1">
154167
<label
155168
class="label-text cursor-pointer text-center w-full flex items-center"
@@ -168,7 +181,7 @@
168181
</template>
169182

170183
<script>
171-
import { IconSettings, IconCircleCheck, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
184+
import { IconSettings, IconCircleCheck, IconInfoCircle, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
172185
import { ref } from 'vue'
173186
174187
const isConnected = ref(false)
@@ -179,6 +192,7 @@ export default {
179192
IconSettings,
180193
IconCircleCheck,
181194
IconRouteAltLeft,
195+
IconInfoCircle,
182196
IconInnerShadowTop,
183197
IconBrandStripe
184198
},
@@ -189,7 +203,7 @@ export default {
189203
required: true
190204
}
191205
},
192-
emits: ['click-condition'],
206+
emits: ['click-condition', 'click-description'],
193207
data () {
194208
return {
195209
isLoading: false

0 commit comments

Comments
 (0)