Skip to content

Commit ae89193

Browse files
authored
Merge from docusealco/wip
2 parents 94d1fb7 + a8b5e00 commit ae89193

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+23420
-25183
lines changed

.github/workflows/docker.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
11
name: Build Docker Images
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: Version
8-
type: string
9-
required: true
10-
image:
11-
description: QEMU image
12-
type: string
13-
required: false
14-
default: tonistiigi/binfmt:latest
15-
os:
16-
description: OS
17-
type: string
18-
required: false
19-
default: ubuntu-24.04-arm
4+
push:
5+
tags:
6+
- "*.*.*"
207

218
jobs:
229
build:
23-
runs-on: ${{ inputs.os }}
24-
timeout-minutes: 20
10+
runs-on: ubuntu-24.04-arm
11+
timeout-minutes: 30
2512

2613
steps:
2714
- name: Checkout code
@@ -34,18 +21,16 @@ jobs:
3421
uses: docker/metadata-action@v4
3522
with:
3623
images: docuseal/docuseal
37-
tags: latest,${{ inputs.version }}
24+
tags: type=semver,pattern={{version}}
3825

3926
- name: Set up QEMU
4027
uses: docker/setup-qemu-action@v3
41-
with:
42-
image: ${{ inputs.image }}
4328

4429
- name: Set up Docker Buildx
4530
uses: docker/setup-buildx-action@v3
4631

4732
- name: Create .version file
48-
run: echo ${{ inputs.version }} > .version
33+
run: echo ${{ github.ref_name }} > .version
4934

5035
- name: Login to Docker Hub
5136
uses: docker/login-action@v3

app/controllers/api/submissions_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ def create_submissions(template, params)
182182
def submissions_params
183183
permitted_attrs = [
184184
:send_email, :send_sms, :bcc_completed, :completed_redirect_url, :reply_to, :go_to_last,
185-
:require_phone_2fa, :expire_at, :name,
185+
:require_phone_2fa, :require_email_2fa, :expire_at, :name,
186186
{
187187
variables: {},
188188
message: %i[subject body],
189189
submitters: [[:send_email, :send_sms, :completed_redirect_url, :uuid, :name, :email, :role,
190190
:completed, :phone, :application_key, :external_id, :reply_to, :go_to_last,
191-
:require_phone_2fa, :order,
191+
:require_phone_2fa, :require_email_2fa, :order, :invite_by,
192192
{ metadata: {}, values: {}, roles: [], readonly_fields: [], message: %i[subject body],
193193
fields: [:name, :uuid, :default_value, :value, :title, :description,
194194
:readonly, :required, :validation_pattern, :invalid_message,

app/controllers/api/submitters_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def submitter_params
8484

8585
submitter_params.permit(
8686
:send_email, :send_sms, :reply_to, :completed_redirect_url, :uuid, :name, :email, :role,
87-
:completed, :phone, :application_key, :external_id, :go_to_last, :require_phone_2fa,
87+
:completed, :phone, :application_key, :external_id, :go_to_last, :require_phone_2fa, :require_email_2fa,
8888
{ metadata: {}, values: {}, readonly_fields: [], message: %i[subject body],
8989
fields: [[:name, :uuid, :default_value, :value, :required,
9090
:readonly, :validation_pattern, :invalid_message,

app/controllers/submissions_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ class SubmissionsController < ApplicationController
1212
authorize!(:create, Submission)
1313
end
1414

15+
FIELD_ICONS = {
16+
'text' => 'text_size', 'signature' => 'writing_sign', 'date' => 'calendar_event',
17+
'number' => 'square_number_1', 'image' => 'photo', 'initials' => 'letter_case_upper',
18+
'file' => 'paperclip', 'select' => 'select', 'checkbox' => 'checkbox', 'radio' => 'circle_dot',
19+
'stamp' => 'rubber_stamp', 'cells' => 'columns_3', 'multiple' => 'checks', 'phone' => 'phone_check',
20+
'payment' => 'credit_card', 'verification' => 'id'
21+
}.freeze
22+
1523
def show
1624
@submission = Submissions.preload_with_pages(@submission)
1725

app/javascript/submission_form/form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@
537537
/>
538538
<div
539539
v-if="stepFields.length < 80"
540-
class="flex justify-center mt-3 sm:mt-4 mb-0 sm:mb-1"
540+
class="flex justify-center mt-3 sm:mt-4 mb-0 sm:mb-1 select-none"
541541
>
542542
<div class="flex items-center flex-wrap steps-progress">
543543
<a

app/javascript/submission_form/i18n.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const en = {
1313
esignature_disclosure: 'eSignature Disclosure',
1414
signature: 'Signature',
1515
initials: 'Initials',
16-
drawn_signature_on_a_touchscreen_device: 'Drawn signature on a touchscreen device',
16+
sign_on_the_touchscreen: 'Sign on the touchscreen',
1717
approved: 'Approved',
1818
reviewed: 'Reviewed',
1919
other: 'Other',
@@ -120,7 +120,7 @@ const es = {
120120
select_a_reason: 'Selecciona una razón',
121121
value_is_invalid: 'El valor no es válido',
122122
verification_code_is_invalid: 'El código de verificación no es válido',
123-
drawn_signature_on_a_touchscreen_device: 'Firma dibujada en un dispositivo con pantalla táctil',
123+
sign_on_the_touchscreen: 'Firmar en pantalla táctil',
124124
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Escanea el código QR con la aplicación de la cámara para abrir el formulario en el móvil y dibujar tu firma',
125125
by_clicking_you_agree_to_the: 'Al hacer clic en "{button}", usted acepta el',
126126
electronic_signature_disclosure: 'Divulgación de Firma Electrónica',
@@ -221,7 +221,7 @@ const it = {
221221
select_a_reason: 'Seleziona una ragione',
222222
value_is_invalid: 'Il valore non è valido',
223223
verification_code_is_invalid: 'Il codice di verifica non è valido',
224-
drawn_signature_on_a_touchscreen_device: 'Firma disegnata su un dispositivo con schermo tattile',
224+
sign_on_the_touchscreen: 'Firma su schermo tattile',
225225
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: "Scansiona il codice QR con l'app della fotocamera per aprire il modulo sul cellulare e disegnare la tua firma",
226226
by_clicking_you_agree_to_the: 'Cliccando su "{button}", accetti il',
227227
electronic_signature_disclosure: 'Divulgazione della Firma Elettronica',
@@ -316,7 +316,7 @@ const de = {
316316
esignature_disclosure: 'Hinweis zur eSignatur',
317317
signature: 'Unterschrift',
318318
initials: 'Initialen',
319-
drawn_signature_on_a_touchscreen_device: 'Auf einem Touchscreen-Gerät gezeichnete Unterschrift',
319+
sign_on_the_touchscreen: 'Auf Touchscreen signieren',
320320
approved: 'Genehmigt',
321321
reviewed: 'Geprüft',
322322
other: 'Sonstiges',
@@ -417,7 +417,7 @@ const fr = {
417417
esignature_disclosure: 'Déclaration eSignature',
418418
signature: 'Signature',
419419
initials: 'Initiales',
420-
drawn_signature_on_a_touchscreen_device: 'Signature dessinée sur un appareil à écran tactile',
420+
sign_on_the_touchscreen: 'Signer sur écran tactile',
421421
approved: 'Approuvé',
422422
reviewed: 'Révisé',
423423
other: 'Autre',
@@ -524,7 +524,7 @@ const pl = {
524524
select_a_reason: 'Wybierz powód',
525525
value_is_invalid: 'Wartość jest nieprawidłowa',
526526
verification_code_is_invalid: 'Kod weryfikacyjny jest nieprawidłowy',
527-
drawn_signature_on_a_touchscreen_device: 'Podpis odręczny na urządzeniu z ekranem dotykowym',
527+
sign_on_the_touchscreen: 'Podpisz na ekranie dotykowym',
528528
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Zeskanuj kod QR za pomocą aplikacji aparatu, aby otworzyć formularz na telefonie i narysować swój podpis',
529529
by_clicking_you_agree_to_the: 'Klikając na "{button}", zgadzasz się na',
530530
electronic_signature_disclosure: 'Ujawnienie Elektronicznej Sygnatury',
@@ -625,7 +625,7 @@ const uk = {
625625
select_a_reason: 'Виберіть причину',
626626
value_is_invalid: 'Значення є неправильним',
627627
verification_code_is_invalid: 'Код підтвердження є неправильним',
628-
drawn_signature_on_a_touchscreen_device: 'Підпис на сенсорному пристрої',
628+
sign_on_the_touchscreen: 'Підписати на сенсорному екрані',
629629
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Скануйте QR-код за допомогою програми камери, щоб відкрити форму на мобільному пристрої та намалювати свій підпис',
630630
by_clicking_you_agree_to_the: 'Натиснувши на "{button}", ви погоджуєтеся з',
631631
electronic_signature_disclosure: 'Розголошення Електронного Підпису',
@@ -726,7 +726,7 @@ const cs = {
726726
select_a_reason: 'Vyberte důvod',
727727
value_is_invalid: 'Hodnota je neplatná',
728728
verification_code_is_invalid: 'Ověřovací kód je neplatný',
729-
drawn_signature_on_a_touchscreen_device: 'Namalovaný podpis na dotykovém zařízení',
729+
sign_on_the_touchscreen: 'Podepsat na dotykové obrazovce',
730730
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Naskenujte QR kód pomocí aplikace fotoaparátu, abyste otevřeli formulář na mobilním zařízení a nakreslili svůj podpis',
731731
by_clicking_you_agree_to_the: 'Kliknutím na "{button}" souhlasíte s',
732732
electronic_signature_disclosure: 'Zveřejněním Elektronického Podpisu',
@@ -827,7 +827,7 @@ const pt = {
827827
select_a_reason: 'Selecione um motivo',
828828
value_is_invalid: 'Valor é inválido',
829829
verification_code_is_invalid: 'Código de verificação é inválido',
830-
drawn_signature_on_a_touchscreen_device: 'Assinatura desenhada em um dispositivo com tela sensível ao toque',
830+
sign_on_the_touchscreen: 'Assinar na tela sensível',
831831
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Escaneie o código QR com o aplicativo da câmera para abrir o formulário no celular e desenhar sua assinatura',
832832
by_clicking_you_agree_to_the: 'Ao clicar em "{button}", você concorda com o',
833833
electronic_signature_disclosure: 'Divulgação de Assinatura Eletrônica',
@@ -928,7 +928,7 @@ const he = {
928928
select_a_reason: 'בחר סיבה',
929929
value_is_invalid: 'ערך לא תקין',
930930
verification_code_is_invalid: 'קוד האימות אינו תקין',
931-
drawn_signature_on_a_touchscreen_device: 'חתימה שנוצרה במכשיר עם מסך מגע',
931+
sign_on_the_touchscreen: 'חתום על מסך המגע',
932932
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'סרוק את קוד ה-QR באמצעות אפליקציית המצלמה כדי לפתוח את הטופס במובייל ולצייר את החתימה שלך',
933933
by_clicking_you_agree_to_the: 'על ידי לחיצה על "{button}", אתה מסכים ל',
934934
electronic_signature_disclosure: 'חשיפת חתימה אלקטרונית',
@@ -1029,7 +1029,7 @@ const nl = {
10291029
select_a_reason: 'Selecteer een reden',
10301030
value_is_invalid: 'Waarde is ongeldig',
10311031
verification_code_is_invalid: 'Verificatiecode is ongeldig',
1032-
drawn_signature_on_a_touchscreen_device: 'Getekende handtekening op een apparaat met een touchscreen',
1032+
sign_on_the_touchscreen: 'Onderteken op touchscreen',
10331033
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scan de QR-code met de camera-app om het formulier op mobiel te openen en uw handtekening te tekenen',
10341034
by_clicking_you_agree_to_the: 'Door op "{button}" te klikken, gaat u akkoord met de',
10351035
electronic_signature_disclosure: 'Openbaarmaking van Elektronische Handtekening',
@@ -1131,7 +1131,7 @@ const ar = {
11311131
value_is_invalid: 'القيمة غير صالحة',
11321132
verification_code_is_invalid: 'رمز التحقق غير صالح',
11331133
already_paid: 'تم الدفع بالفعل',
1134-
drawn_signature_on_a_touchscreen_device: 'توقيع مرسوم على جهاز بشاشة تعمل باللمس',
1134+
sign_on_the_touchscreen: 'وقع على شاشة اللمس',
11351135
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'امسح رمز الاستجابة السريعة باستخدام تطبيق الكاميرا لفتح النموذج على الهاتف المحمول ورسم توقيعك',
11361136
by_clicking_you_agree_to_the: 'بالنقر فوق "{button}"، أنت توافق على',
11371137
electronic_signature_disclosure: 'كشف التوقيع الإلكتروني',
@@ -1229,7 +1229,7 @@ const ko = {
12291229
reviewed_by: '검토자',
12301230
authored_by: '작성자',
12311231
select_a_reason: '이유 선택',
1232-
drawn_signature_on_a_touchscreen_device: '터치스크린 장치에서 그린 서명',
1232+
sign_on_the_touchscreen: '터치스크린에서 서명',
12331233
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: '카메라 앱으로 QR 코드를 스캔하여 모바일에서 양식을 열고 서명을 그리세요',
12341234
by_clicking_you_agree_to_the: '"{button}"를 클릭함으로써, 다음에 동의하게 됩니다',
12351235
electronic_signature_disclosure: '전자 서명 공개',
@@ -1326,7 +1326,7 @@ const ja = {
13261326
esignature_disclosure: '電子署名開示',
13271327
signature: '署名',
13281328
initials: 'イニシャル',
1329-
drawn_signature_on_a_touchscreen_device: 'タッチスクリーンデバイスで描かれた署名',
1329+
sign_on_the_touchscreen: 'タッチスクリーンで署名',
13301330
approved: '承認済み',
13311331
reviewed: '確認済み',
13321332
other: 'その他',

app/javascript/submission_form/initials_step.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div class="space-x-2 flex flex-none">
2020
<span
2121
v-if="isDrawInitials"
22-
class="tooltip"
22+
class="md:tooltip"
2323
:data-tip="t('type_initial')"
2424
>
2525
<a
@@ -36,7 +36,7 @@
3636
</span>
3737
<span
3838
v-else
39-
class="tooltip ml-2"
39+
class="md:tooltip ml-2"
4040
:data-tip="t('draw_initials')"
4141
>
4242
<a
@@ -52,7 +52,7 @@
5252
</a>
5353
</span>
5454
<span
55-
class="tooltip"
55+
class="md:tooltip"
5656
:data-tip="t('click_to_upload')"
5757
>
5858
<label class="btn btn-outline btn-sm font-medium inline-flex flex-nowrap upload-image-button">

app/javascript/submission_form/signature_step.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div class="space-x-2 flex flex-none">
2323
<span
2424
v-if="isTextSignature && format !== 'typed_or_upload' && format !== 'typed' && format !== 'upload'"
25-
class="tooltip"
25+
class="md:tooltip"
2626
:data-tip="t('draw_signature')"
2727
>
2828
<a
@@ -39,7 +39,7 @@
3939
</span>
4040
<span
4141
v-else-if="withTypedSignature && format !== 'drawn_or_upload' && format !== 'typed_or_upload' && format !== 'typed' && format !== 'drawn' && format !== 'upload'"
42-
class="tooltip ml-2"
42+
class="md:tooltip ml-2"
4343
:class="{ 'hidden sm:inline': modelValue || computedPreviousValue }"
4444
:data-tip="t('type_text')"
4545
>
@@ -57,7 +57,7 @@
5757
</span>
5858
<span
5959
v-if="format !== 'typed' && format !== 'drawn' && format !== 'upload' && format !== 'drawn_or_typed'"
60-
class="tooltip"
60+
class="md:tooltip"
6161
:class="{ 'hidden sm:inline': modelValue || computedPreviousValue }"
6262
:data-tip="t('take_photo')"
6363
>
@@ -86,8 +86,8 @@
8686
</a>
8787
<span
8888
v-if="withQrButton && !modelValue && !computedPreviousValue && format !== 'typed_or_upload' && format !== 'typed' && format !== 'upload'"
89-
class="tooltip before:translate-x-[-90%]"
90-
:data-tip="t('drawn_signature_on_a_touchscreen_device')"
89+
class="md:tooltip before:translate-x-[-90%]"
90+
:data-tip="t('sign_on_the_touchscreen')"
9191
>
9292
<a
9393
href="#"
@@ -142,7 +142,7 @@
142142
/>
143143
<div
144144
v-else
145-
class="relative"
145+
class="relative select-none"
146146
>
147147
<div
148148
v-if="!modelValue && !computedPreviousValue && !isShowQr && !isTextSignature && isSignatureStarted"
@@ -176,7 +176,7 @@
176176
class="top-0 bottom-0 right-0 left-0 absolute bg-base-content/10 rounded-2xl"
177177
>
178178
<div
179-
class="absolute top-1.5 right-1.5 tooltip"
179+
class="absolute top-1.5 right-1.5 md:tooltip"
180180
>
181181
<a
182182
href="#"
@@ -281,7 +281,7 @@
281281
<div
282282
v-else-if="withDisclosure"
283283
dir="auto"
284-
class="text-base-content/60 text-xs text-center w-full mt-1"
284+
class="text-base-content/60 text-xs text-center w-full mt-1 select-none"
285285
>
286286
{{ t('by_clicking_you_agree_to_the').replace('{button}', buttonText.charAt(0).toUpperCase() + buttonText.slice(1)) }} <a
287287
href="https://www.docuseal.com/esign-disclosure"

app/jobs/send_submitter_verification_email_job.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ class SendSubmitterVerificationEmailJob
66
def perform(params = {})
77
submitter = Submitter.find(params['submitter_id'])
88

9-
SubmitterMailer.otp_verification_email(submitter).deliver_now!
9+
locale = params['locale'].presence || submitter.account.locale
10+
11+
SubmitterMailer.otp_verification_email(submitter, locale:).deliver_now!
1012

1113
SubmissionEvent.create!(submitter_id: params['submitter_id'],
1214
event_type: 'send_2fa_email',

app/mailers/submitter_mailer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ def documents_copy_email(submitter, to: nil, sig: false)
144144
end
145145
end
146146

147-
def otp_verification_email(submitter)
147+
def otp_verification_email(submitter, locale: nil)
148148
@submitter = submitter
149149
@otp_code = EmailVerificationCodes.generate([submitter.email.downcase.strip, submitter.slug].join(':'))
150150

151151
assign_message_metadata('otp_verification_email', submitter)
152152

153-
I18n.with_locale(submitter.account.locale) do
153+
I18n.with_locale(locale || submitter.account.locale) do
154154
mail(to: submitter.email, subject: I18n.t('email_verification'))
155155
end
156156
end

0 commit comments

Comments
 (0)