Skip to content

Commit 00af69c

Browse files
authored
Merge from docusealco/wip
2 parents fa99b4e + c6819a1 commit 00af69c

33 files changed

+846
-58
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN apk --no-cache add fontforge wget && \
99
wget https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansSymbols2/hinted/ttf/NotoSansSymbols2-Regular.ttf && \
1010
wget https://github.com/Maxattax97/gnu-freefont/raw/master/ttf/FreeSans.ttf && \
1111
wget https://github.com/impallari/DancingScript/raw/master/OFL.txt && \
12-
wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/1.1.0/model_704_int8.onnx" && \
12+
wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.0.0/model_704_int8.onnx" && \
1313
wget -O pdfium-linux.tgz "https://github.com/docusealco/pdfium-binaries/releases/latest/download/pdfium-linux-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/').tgz" && \
1414
mkdir -p /pdfium-linux && \
1515
tar -xzf pdfium-linux.tgz -C /pdfium-linux

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ GEM
587587
unicode-emoji (~> 4.1)
588588
unicode-emoji (4.1.0)
589589
uniform_notifier (1.16.0)
590-
uri (1.0.3)
590+
uri (1.1.1)
591591
useragent (0.16.11)
592592
warden (1.2.9)
593593
rack (>= 2.0.9)

app/controllers/submissions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SubmissionsController < ApplicationController
1717
'number' => 'square_number_1', 'image' => 'photo', 'initials' => 'letter_case_upper',
1818
'file' => 'paperclip', 'select' => 'select', 'checkbox' => 'checkbox', 'radio' => 'circle_dot',
1919
'stamp' => 'rubber_stamp', 'cells' => 'columns_3', 'multiple' => 'checks', 'phone' => 'phone_check',
20-
'payment' => 'credit_card', 'verification' => 'id'
20+
'payment' => 'credit_card', 'verification' => 'id', 'kba' => 'user_scan'
2121
}.freeze
2222

2323
def show

app/javascript/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ safeRegisterElement('template-builder', class extends HTMLElement {
159159
locale: this.dataset.locale,
160160
withPhone: this.dataset.withPhone === 'true',
161161
withVerification: ['true', 'false'].includes(this.dataset.withVerification) ? this.dataset.withVerification === 'true' : null,
162+
withKba: ['true', 'false'].includes(this.dataset.withKba) ? this.dataset.withKba === 'true' : null,
162163
withLogo: this.dataset.withLogo !== 'false',
163164
withFieldsDetection: this.dataset.withFieldsDetection === 'true',
164165
editable: this.dataset.editable !== 'false',

app/javascript/submission_form/area.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
class="object-contain mx-auto"
6161
:src="stamp.url"
6262
>
63+
<img
64+
v-else-if="field.type === 'kba' && kba"
65+
class="object-contain mx-auto"
66+
:src="kba.url"
67+
>
6368
<div
6469
v-else-if="field.type === 'signature' && signature"
6570
class="flex justify-between h-full gap-1 overflow-hidden w-full"
@@ -272,7 +277,7 @@
272277

273278
<script>
274279
import MarkdownContent from './markdown_content'
275-
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconId } from '@tabler/icons-vue'
280+
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconId, IconUserScan } from '@tabler/icons-vue'
276281
277282
export default {
278283
name: 'FieldArea',
@@ -391,7 +396,8 @@ export default {
391396
stamp: this.t('stamp'),
392397
payment: this.t('payment'),
393398
phone: this.t('phone'),
394-
verification: this.t('verify_id')
399+
verification: this.t('verify_id'),
400+
kba: this.t('kba')
395401
}
396402
},
397403
strikethroughWidth () {
@@ -454,7 +460,8 @@ export default {
454460
multiple: IconChecks,
455461
phone: IconPhoneCheck,
456462
payment: IconCreditCard,
457-
verification: IconId
463+
verification: IconId,
464+
kba: IconUserScan,
458465
}
459466
},
460467
image () {
@@ -471,6 +478,13 @@ export default {
471478
return null
472479
}
473480
},
481+
kba () {
482+
if (this.field.type === 'kba') {
483+
return this.attachmentsIndex[this.modelValue]
484+
} else {
485+
return null
486+
}
487+
},
474488
signature () {
475489
if (this.field.type === 'signature') {
476490
return this.attachmentsIndex[this.modelValue]

app/javascript/submission_form/form.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,17 @@
465465
@focus="scrollIntoField(currentField)"
466466
@submit="!isSubmitting && submitStep()"
467467
/>
468+
<KbaStep
469+
v-else-if="currentField.type === 'kba'"
470+
ref="currentStep"
471+
:key="currentField.uuid"
472+
:submitter="submitter"
473+
:empty-value-required-step="emptyValueRequiredStep"
474+
:field="currentField"
475+
:submitter-slug="submitterSlug"
476+
:values="values"
477+
@submit="!isSubmitting && submitStep()"
478+
/>
468479
<VerificationStep
469480
v-else-if="currentField.type === 'verification'"
470481
ref="currentStep"
@@ -480,7 +491,7 @@
480491
/>
481492
</div>
482493
<div
483-
v-if="(currentField.type !== 'payment' && currentField.type !== 'verification') || submittedValues[currentField.uuid]"
494+
v-if="(currentField.type !== 'payment' && currentField.type !== 'verification' && currentField.type !== 'kba') || submittedValues[currentField.uuid]"
484495
:class="currentField.type === 'signature' ? 'mt-2' : 'mt-4 md:mt-6'"
485496
>
486497
<button
@@ -569,6 +580,7 @@ import MultiSelectStep from './multi_select_step'
569580
import PhoneStep from './phone_step'
570581
import PaymentStep from './payment_step'
571582
import VerificationStep from './verification_step'
583+
import KbaStep from './kba_step'
572584
import TextStep from './text_step'
573585
import NumberStep from './number_step'
574586
import DateStep from './date_step'
@@ -613,6 +625,7 @@ export default {
613625
AttachmentStep,
614626
InitialsStep,
615627
VerificationStep,
628+
KbaStep,
616629
InviteForm,
617630
MultiSelectStep,
618631
IconInnerShadowTop,
@@ -1004,7 +1017,7 @@ export default {
10041017
const verificationFields = []
10051018
10061019
const sortedFields = this.fields.reduce((acc, f) => {
1007-
if (f.type === 'verification') {
1020+
if (f.type === 'verification' || f.type === 'kba') {
10081021
verificationFields.push(f)
10091022
} else if (!f.readonly) {
10101023
acc.push(f)
@@ -1401,7 +1414,7 @@ export default {
14011414
14021415
const submitStep = this.currentStep
14031416
1404-
const stepPromise = ['signature', 'phone', 'initials', 'payment', 'verification'].includes(this.currentField.type)
1417+
const stepPromise = ['signature', 'phone', 'initials', 'payment', 'verification', 'kba'].includes(this.currentField.type)
14051418
? this.$refs.currentStep.submit
14061419
: () => Promise.resolve({})
14071420

app/javascript/submission_form/i18n.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const en = {
2+
kba: 'KBA',
23
please_upload_an_image_file: 'Please upload an image file',
34
must_be_characters_length: 'Must be {number} characters length',
45
complete_all_required_fields_to_proceed_with_identity_verification: 'Complete all required fields to proceed with identity verification.',
@@ -100,6 +101,7 @@ const en = {
100101
}
101102

102103
const es = {
104+
kba: 'KBA',
103105
please_upload_an_image_file: 'Por favor, sube un archivo de imagen',
104106
must_be_characters_length: 'Debe tener {number} caracteres de longitud',
105107
complete_all_required_fields_to_proceed_with_identity_verification: 'Complete todos los campos requeridos para continuar con la verificación de identidad.',
@@ -201,6 +203,7 @@ const es = {
201203
}
202204

203205
const it = {
206+
kba: 'KBA',
204207
please_upload_an_image_file: 'Per favore carica un file immagine',
205208
must_be_characters_length: 'Deve essere lungo {number} caratteri',
206209
complete_all_required_fields_to_proceed_with_identity_verification: "Compila tutti i campi obbligatori per procedere con la verifica dell'identità.",
@@ -302,6 +305,7 @@ const it = {
302305
}
303306

304307
const de = {
308+
kba: 'KBA',
305309
please_upload_an_image_file: 'Bitte laden Sie eine Bilddatei hoch',
306310
must_be_characters_length: 'Muss {number} Zeichen lang sein',
307311
complete_all_required_fields_to_proceed_with_identity_verification: 'Füllen Sie alle Pflichtfelder aus, um mit der Identitätsprüfung fortzufahren.',
@@ -403,6 +407,7 @@ const de = {
403407
}
404408

405409
const fr = {
410+
kba: 'KBA',
406411
please_upload_an_image_file: 'Veuillez téléverser un fichier image',
407412
must_be_characters_length: 'Doit comporter {number} caractères',
408413
complete_all_required_fields_to_proceed_with_identity_verification: "Veuillez remplir tous les champs obligatoires pour poursuivre la vérification d'identité.",
@@ -504,6 +509,7 @@ const fr = {
504509
}
505510

506511
const pl = {
512+
kba: 'KBA',
507513
please_upload_an_image_file: 'Proszę przesłać plik obrazu',
508514
must_be_characters_length: 'Musi mieć długość {number} znaków',
509515
complete_all_required_fields_to_proceed_with_identity_verification: 'Uzupełnij wszystkie wymagane pola, aby kontynuować weryfikację tożsamości.',
@@ -605,6 +611,7 @@ const pl = {
605611
}
606612

607613
const uk = {
614+
kba: 'KBA',
608615
please_upload_an_image_file: 'Будь ласка, завантажте файл зображення',
609616
must_be_characters_length: 'Має містити {number} символів',
610617
complete_all_required_fields_to_proceed_with_identity_verification: "Заповніть всі обов'язкові поля, щоб продовжити перевірку особи.",
@@ -706,6 +713,7 @@ const uk = {
706713
}
707714

708715
const cs = {
716+
kba: 'KBA',
709717
please_upload_an_image_file: 'Nahrajte prosím obrázkový soubor',
710718
must_be_characters_length: 'Musí mít délku {number} znaků',
711719
complete_all_required_fields_to_proceed_with_identity_verification: 'Vyplňte všechna povinná pole, abyste mohli pokračovat v ověření identity.',
@@ -807,6 +815,7 @@ const cs = {
807815
}
808816

809817
const pt = {
818+
kba: 'KBA',
810819
please_upload_an_image_file: 'Por favor, envie um arquivo de imagem',
811820
must_be_characters_length: 'Deve ter {number} caracteres',
812821
complete_all_required_fields_to_proceed_with_identity_verification: 'Preencha todos os campos obrigatórios para prosseguir com a verificação de identidade.',
@@ -908,6 +917,7 @@ const pt = {
908917
}
909918

910919
const he = {
920+
kba: 'KBA',
911921
please_upload_an_image_file: 'אנא העלה קובץ תמונה',
912922
must_be_characters_length: 'חייב להיות באורך של {number} תווים',
913923
complete_all_required_fields_to_proceed_with_identity_verification: 'מלא את כל השדות הנדרשים כדי להמשיך עם אימות זהות.',
@@ -1009,6 +1019,7 @@ const he = {
10091019
}
10101020

10111021
const nl = {
1022+
kba: 'KBA',
10121023
please_upload_an_image_file: 'Upload alstublieft een afbeeldingsbestand',
10131024
must_be_characters_length: 'Moet {number} tekens lang zijn',
10141025
complete_all_required_fields_to_proceed_with_identity_verification: 'Vul alle verplichte velden in om door te gaan met de identiteitsverificatie.',
@@ -1110,6 +1121,7 @@ const nl = {
11101121
}
11111122

11121123
const ar = {
1124+
kba: 'KBA',
11131125
please_upload_an_image_file: 'يرجى تحميل ملف صورة',
11141126
must_be_characters_length: 'يجب أن يكون الطول {number} حرفًا',
11151127
complete_all_required_fields_to_proceed_with_identity_verification: 'أكمل جميع الحقول المطلوبة للمتابعة في التحقق من الهوية.',
@@ -1211,6 +1223,7 @@ const ar = {
12111223
}
12121224

12131225
const ko = {
1226+
kba: 'KBA',
12141227
please_upload_an_image_file: '이미지 파일을 업로드해 주세요',
12151228
must_be_characters_length: '{number}자여야 합니다',
12161229
complete_all_required_fields_to_proceed_with_identity_verification: '신원 확인을 진행하려면 모든 필수 필드를 작성하십시오.',
@@ -1312,6 +1325,7 @@ const ko = {
13121325
}
13131326

13141327
const ja = {
1328+
kba: 'KBA',
13151329
please_upload_an_image_file: '画像ファイルをアップロードしてください',
13161330
must_be_characters_length: '{number}文字でなければなりません',
13171331
complete_all_required_fields_to_proceed_with_identity_verification: '本人確認を進めるには、すべての必須項目を入力してください。',

0 commit comments

Comments
 (0)