diff --git a/Dockerfile b/Dockerfile index f768b367..8d1f58c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apk --no-cache add fontforge wget && \ wget https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansSymbols2/hinted/ttf/NotoSansSymbols2-Regular.ttf && \ wget https://github.com/Maxattax97/gnu-freefont/raw/master/ttf/FreeSans.ttf && \ wget https://github.com/impallari/DancingScript/raw/master/OFL.txt && \ - wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/1.1.0/model_704_int8.onnx" && \ + wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.0.0/model_704_int8.onnx" && \ 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" && \ mkdir -p /pdfium-linux && \ tar -xzf pdfium-linux.tgz -C /pdfium-linux diff --git a/Gemfile.lock b/Gemfile.lock index 9215b4b2..72f12d84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -587,7 +587,7 @@ GEM unicode-emoji (~> 4.1) unicode-emoji (4.1.0) uniform_notifier (1.16.0) - uri (1.0.3) + uri (1.1.1) useragent (0.16.11) warden (1.2.9) rack (>= 2.0.9) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index f10cb1f0..c39e99e5 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -17,7 +17,7 @@ class SubmissionsController < ApplicationController 'number' => 'square_number_1', 'image' => 'photo', 'initials' => 'letter_case_upper', 'file' => 'paperclip', 'select' => 'select', 'checkbox' => 'checkbox', 'radio' => 'circle_dot', 'stamp' => 'rubber_stamp', 'cells' => 'columns_3', 'multiple' => 'checks', 'phone' => 'phone_check', - 'payment' => 'credit_card', 'verification' => 'id' + 'payment' => 'credit_card', 'verification' => 'id', 'kba' => 'user_scan' }.freeze def show diff --git a/app/javascript/application.js b/app/javascript/application.js index 86a77b85..4b5988c9 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -159,6 +159,7 @@ safeRegisterElement('template-builder', class extends HTMLElement { locale: this.dataset.locale, withPhone: this.dataset.withPhone === 'true', withVerification: ['true', 'false'].includes(this.dataset.withVerification) ? this.dataset.withVerification === 'true' : null, + withKba: ['true', 'false'].includes(this.dataset.withKba) ? this.dataset.withKba === 'true' : null, withLogo: this.dataset.withLogo !== 'false', withFieldsDetection: this.dataset.withFieldsDetection === 'true', editable: this.dataset.editable !== 'false', diff --git a/app/javascript/submission_form/area.vue b/app/javascript/submission_form/area.vue index c39cb16d..1740fe0e 100644 --- a/app/javascript/submission_form/area.vue +++ b/app/javascript/submission_form/area.vue @@ -60,6 +60,11 @@ class="object-contain mx-auto" :src="stamp.url" > +
import MarkdownContent from './markdown_content' -import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconId } from '@tabler/icons-vue' +import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconId, IconUserScan } from '@tabler/icons-vue' export default { name: 'FieldArea', @@ -391,7 +396,8 @@ export default { stamp: this.t('stamp'), payment: this.t('payment'), phone: this.t('phone'), - verification: this.t('verify_id') + verification: this.t('verify_id'), + kba: this.t('kba') } }, strikethroughWidth () { @@ -454,7 +460,8 @@ export default { multiple: IconChecks, phone: IconPhoneCheck, payment: IconCreditCard, - verification: IconId + verification: IconId, + kba: IconUserScan, } }, image () { @@ -471,6 +478,13 @@ export default { return null } }, + kba () { + if (this.field.type === 'kba') { + return this.attachmentsIndex[this.modelValue] + } else { + return null + } + }, signature () { if (this.field.type === 'signature') { return this.attachmentsIndex[this.modelValue] diff --git a/app/javascript/submission_form/form.vue b/app/javascript/submission_form/form.vue index b793d6ae..fafccea7 100644 --- a/app/javascript/submission_form/form.vue +++ b/app/javascript/submission_form/form.vue @@ -465,6 +465,17 @@ @focus="scrollIntoField(currentField)" @submit="!isSubmitting && submitStep()" /> +