Merge from docusealco/wip
This commit is contained in:
@@ -42,6 +42,12 @@ Metrics/CyclomaticComplexity:
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 15
|
||||
|
||||
Style/MultipleComparison:
|
||||
Enabled: false
|
||||
|
||||
Naming/PredicateMethod:
|
||||
Enabled: false
|
||||
|
||||
Layout/LineLength:
|
||||
AllowedPatterns: ['\A\s*#']
|
||||
|
||||
|
||||
+19
-15
@@ -76,7 +76,7 @@ GEM
|
||||
public_suffix (>= 2.0.2, < 7.0)
|
||||
annotaterb (4.14.0)
|
||||
arabic-letter-connector (0.1.1)
|
||||
ast (2.4.2)
|
||||
ast (2.4.3)
|
||||
aws-eventstream (1.3.0)
|
||||
aws-partitions (1.1027.0)
|
||||
aws-sdk-core (3.214.0)
|
||||
@@ -291,10 +291,10 @@ GEM
|
||||
rdoc (>= 4.0.0)
|
||||
reline (>= 0.4.2)
|
||||
jmespath (1.6.2)
|
||||
json (2.13.2)
|
||||
json (2.15.0)
|
||||
jwt (2.9.3)
|
||||
base64
|
||||
language_server-protocol (3.17.0.3)
|
||||
language_server-protocol (3.17.0.5)
|
||||
launchy (3.0.1)
|
||||
addressable (~> 2.8)
|
||||
childprocess (~> 5.0)
|
||||
@@ -305,6 +305,7 @@ GEM
|
||||
letter_opener (~> 1.9)
|
||||
railties (>= 6.1)
|
||||
rexml
|
||||
lint_roller (1.1.0)
|
||||
logger (1.7.0)
|
||||
lograge (0.14.0)
|
||||
actionpack (>= 4)
|
||||
@@ -365,8 +366,8 @@ GEM
|
||||
ostruct (0.6.3)
|
||||
package_json (0.1.0)
|
||||
pagy (9.3.3)
|
||||
parallel (1.26.3)
|
||||
parser (3.3.6.0)
|
||||
parallel (1.27.0)
|
||||
parser (3.3.9.0)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
pg (1.5.9)
|
||||
@@ -383,6 +384,7 @@ GEM
|
||||
pretender (0.5.0)
|
||||
actionpack (>= 6.1)
|
||||
prettyprint (0.2.0)
|
||||
prism (1.5.1)
|
||||
pry (0.15.0)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
@@ -395,7 +397,7 @@ GEM
|
||||
puma (6.5.0)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.8.1)
|
||||
rack (3.2.0)
|
||||
rack (3.2.3)
|
||||
rack-proxy (0.7.7)
|
||||
rack
|
||||
rack-session (2.1.1)
|
||||
@@ -448,7 +450,7 @@ GEM
|
||||
psych (>= 4.0.0)
|
||||
redis-client (0.23.0)
|
||||
connection_pool
|
||||
regexp_parser (2.9.3)
|
||||
regexp_parser (2.11.3)
|
||||
reline (0.6.2)
|
||||
io-console (~> 0.5)
|
||||
representable (3.2.0)
|
||||
@@ -485,18 +487,20 @@ GEM
|
||||
rspec-mocks (~> 3.13)
|
||||
rspec-support (~> 3.13)
|
||||
rspec-support (3.13.2)
|
||||
rubocop (1.69.2)
|
||||
rubocop (1.81.1)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (>= 3.17.0)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 2.9.3, < 3.0)
|
||||
rubocop-ast (>= 1.36.2, < 2.0)
|
||||
rubocop-ast (>= 1.47.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 4.0)
|
||||
rubocop-ast (1.37.0)
|
||||
parser (>= 3.3.1.0)
|
||||
rubocop-ast (1.47.1)
|
||||
parser (>= 3.3.7.2)
|
||||
prism (~> 1.4)
|
||||
rubocop-performance (1.23.0)
|
||||
rubocop (>= 1.48.1, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
@@ -567,9 +571,9 @@ GEM
|
||||
tzinfo-data (1.2024.2)
|
||||
tzinfo (>= 1.0.0)
|
||||
uber (0.1.0)
|
||||
unicode-display_width (3.1.2)
|
||||
unicode-emoji (~> 4.0, >= 4.0.4)
|
||||
unicode-emoji (4.0.4)
|
||||
unicode-display_width (3.2.0)
|
||||
unicode-emoji (~> 4.1)
|
||||
unicode-emoji (4.1.0)
|
||||
uniform_notifier (1.16.0)
|
||||
uri (1.0.3)
|
||||
useragent (0.16.11)
|
||||
|
||||
@@ -42,7 +42,7 @@ DocuSeal is an open source platform that provides secure and efficient digital d
|
||||
- PDF signature verification
|
||||
- Users management
|
||||
- Mobile-optimized
|
||||
- 6 UI languages with signing available in 14 languages
|
||||
- 7 UI languages with signing available in 14 languages
|
||||
- API and Webhooks for integrations
|
||||
- Easy to deploy in minutes
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ class AccountsController < ApplicationController
|
||||
'es-ES' => 'Español',
|
||||
'pt-PT' => 'Português',
|
||||
'de-DE' => 'Deutsch',
|
||||
'it-IT' => 'Italiano'
|
||||
'it-IT' => 'Italiano',
|
||||
'nl-NL' => 'Nederlands'
|
||||
}.freeze
|
||||
|
||||
before_action :load_account
|
||||
|
||||
@@ -147,7 +147,7 @@ module Api
|
||||
is_send_email = !params[:send_email].in?(['false', false])
|
||||
|
||||
if (emails = (params[:emails] || params[:email]).presence) &&
|
||||
(params[:submission].blank? && params[:submitters].blank?)
|
||||
params[:submission].blank? && params[:submitters].blank?
|
||||
Submissions.create_from_emails(template:,
|
||||
user: current_user,
|
||||
source: :api,
|
||||
|
||||
@@ -118,7 +118,8 @@ class TemplatesController < ApplicationController
|
||||
def template_params
|
||||
params.require(:template).permit(
|
||||
:name,
|
||||
{ schema: [[:attachment_uuid, :name, { conditions: [%i[field_uuid value action operation]] }]],
|
||||
{ schema: [[:attachment_uuid, :google_drive_file_id, :name,
|
||||
{ conditions: [%i[field_uuid value action operation]] }]],
|
||||
submitters: [%i[name uuid is_requester linked_to_uuid invite_by_uuid optional_invite_by_uuid email order]],
|
||||
fields: [[:uuid, :submitter_uuid, :name, :type,
|
||||
:required, :readonly, :default_value,
|
||||
|
||||
@@ -49,6 +49,8 @@ import ShowOnValue from './elements/show_on_value'
|
||||
import CustomValidation from './elements/custom_validation'
|
||||
import ToggleClasses from './elements/toggle_classes'
|
||||
import AutosizeField from './elements/autosize_field'
|
||||
import GoogleDriveFilePicker from './elements/google_drive_file_picker'
|
||||
import OpenModal from './elements/open_modal'
|
||||
|
||||
import * as TurboInstantClick from './lib/turbo_instant_click'
|
||||
|
||||
@@ -136,6 +138,8 @@ safeRegisterElement('show-on-value', ShowOnValue)
|
||||
safeRegisterElement('custom-validation', CustomValidation)
|
||||
safeRegisterElement('toggle-classes', ToggleClasses)
|
||||
safeRegisterElement('autosize-field', AutosizeField)
|
||||
safeRegisterElement('google-drive-file-picker', GoogleDriveFilePicker)
|
||||
safeRegisterElement('open-modal', OpenModal)
|
||||
|
||||
safeRegisterElement('template-builder', class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
@@ -160,6 +164,7 @@ safeRegisterElement('template-builder', class extends HTMLElement {
|
||||
withSendButton: this.dataset.withSendButton !== 'false',
|
||||
withSignYourselfButton: this.dataset.withSignYourselfButton !== 'false',
|
||||
withConditions: this.dataset.withConditions === 'true',
|
||||
withGoogleDrive: this.dataset.withGoogleDrive === 'true',
|
||||
withReplaceAndCloneUpload: true,
|
||||
currencies: (this.dataset.currencies || '').split(',').filter(Boolean),
|
||||
acceptFileTypes: this.dataset.acceptFileTypes,
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
const iframeTemplate = this.querySelector('template')
|
||||
|
||||
this.observer = new IntersectionObserver((entries) => {
|
||||
if (entries.some(e => e.isIntersecting)) {
|
||||
iframeTemplate.parentElement.prepend(iframeTemplate.content)
|
||||
|
||||
this.observer.disconnect()
|
||||
}
|
||||
})
|
||||
|
||||
this.observer.observe(this)
|
||||
|
||||
window.addEventListener('message', this.messageHandler)
|
||||
}
|
||||
|
||||
messageHandler = (event) => {
|
||||
if (event.data.type === 'google-drive-files-picked') {
|
||||
this.form.querySelectorAll('input[name="google_drive_file_ids[]"]').forEach(el => el.remove())
|
||||
|
||||
const files = event.data.files || []
|
||||
|
||||
files.forEach((file) => {
|
||||
const input = document.createElement('input')
|
||||
input.type = 'hidden'
|
||||
input.name = 'google_drive_file_ids[]'
|
||||
input.value = file.id
|
||||
this.form.appendChild(input)
|
||||
})
|
||||
|
||||
this.form.querySelector('button[type="submit"]').click()
|
||||
this.loader.classList.remove('hidden')
|
||||
} else if (event.data.type === 'google-drive-picker-loaded') {
|
||||
this.loader.classList.add('hidden')
|
||||
this.form.classList.remove('hidden')
|
||||
} else if (event.data.type === 'google-drive-picker-request-oauth') {
|
||||
document.getElementById(this.dataset.oauthButtonId).classList.remove('hidden')
|
||||
this.classList.add('hidden')
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback () {
|
||||
this.observer?.unobserve(this)
|
||||
window.removeEventListener('message', this.messageHandler)
|
||||
}
|
||||
|
||||
get form () {
|
||||
return this.querySelector('form')
|
||||
}
|
||||
|
||||
get loader () {
|
||||
return document.getElementById('google_drive_loader')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
const src = this.getAttribute('src')
|
||||
const link = document.createElement('a')
|
||||
|
||||
link.href = src
|
||||
link.setAttribute('data-turbo-frame', 'modal')
|
||||
link.style.display = 'none'
|
||||
|
||||
this.appendChild(link)
|
||||
|
||||
link.click()
|
||||
|
||||
window.history.replaceState({}, document.title, window.location.pathname)
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ const en = {
|
||||
type_text: 'Type text',
|
||||
email_has_been_sent: 'Email has been sent',
|
||||
processing: 'Processing',
|
||||
pay_with_strip: 'Pay with Stripe',
|
||||
pay_with_stripe: 'Pay with Stripe',
|
||||
reupload: 'Reupload',
|
||||
upload: 'Upload',
|
||||
files: 'Files',
|
||||
@@ -192,7 +192,7 @@ const es = {
|
||||
type_text: 'Escribir texto',
|
||||
email_has_been_sent: 'El correo electrónico ha sido enviado',
|
||||
processing: 'Procesando',
|
||||
pay_with_strip: 'Pagar con Stripe',
|
||||
pay_with_stripe: 'Pagar con Stripe',
|
||||
reupload: 'Volver a subir',
|
||||
upload: 'Subir',
|
||||
files: 'Archivos',
|
||||
@@ -222,7 +222,7 @@ const it = {
|
||||
value_is_invalid: 'Il valore non è valido',
|
||||
verification_code_is_invalid: 'Il codice di verifica non è valido',
|
||||
drawn_signature_on_a_touchscreen_device: 'Firma disegnata su un dispositivo con schermo tattile',
|
||||
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',
|
||||
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",
|
||||
by_clicking_you_agree_to_the: 'Cliccando su "{button}", accetti il',
|
||||
electronic_signature_disclosure: 'Divulgazione della Firma Elettronica',
|
||||
esignature_disclosure: 'Divulgazione della eFirma',
|
||||
@@ -293,7 +293,7 @@ const it = {
|
||||
toggle_multiline_text: 'Attiva Testo Multilinea',
|
||||
email_has_been_sent: "L'email è stata inviata",
|
||||
processing: 'Elaborazione',
|
||||
pay_with_strip: 'Paga con Stripe',
|
||||
pay_with_stripe: 'Paga con Stripe',
|
||||
reupload: 'Ricarica',
|
||||
upload: 'Carica',
|
||||
files: 'File',
|
||||
@@ -304,64 +304,64 @@ const it = {
|
||||
const de = {
|
||||
please_upload_an_image_file: 'Bitte laden Sie eine Bilddatei hoch',
|
||||
must_be_characters_length: 'Muss {number} Zeichen lang sein',
|
||||
complete_all_required_fields_to_proceed_with_identity_verification: 'Vervollständigen Sie alle erforderlichen Felder, um mit der Identitätsverifizierung fortzufahren.',
|
||||
complete_all_required_fields_to_proceed_with_identity_verification: 'Füllen Sie alle Pflichtfelder aus, um mit der Identitätsprüfung fortzufahren.',
|
||||
verify_id: 'ID überprüfen',
|
||||
identity_verification: 'Identitätsüberprüfung',
|
||||
identity_verification: 'Identitätsprüfung',
|
||||
complete: 'Abschließen',
|
||||
fill_all_required_fields_to_complete: 'Alle erforderlichen Felder ausfüllen, um abzuschließen',
|
||||
sign_and_complete: 'Signieren und Abschließen',
|
||||
fill_all_required_fields_to_complete: 'Füllen Sie alle Pflichtfelder aus, um abzuschließen',
|
||||
sign_and_complete: 'Unterzeichnen und abschließen',
|
||||
text: 'Text',
|
||||
by_clicking_you_agree_to_the: 'Durch Klicken auf "{button}" stimmen Sie dem',
|
||||
electronic_signature_disclosure: 'Hinweis zur E-Signatur',
|
||||
esignature_disclosure: 'Hinweis zur eSignatur',
|
||||
signature: 'Unterschrift',
|
||||
initials: 'Initialen',
|
||||
drawn_signature_on_a_touchscreen_device: 'Auf einem Touchscreen-Gerät gezeichnete Unterschrift',
|
||||
approved: 'Genehmigt',
|
||||
reviewed: 'Geprüft',
|
||||
other: 'Sonstiges',
|
||||
authored_by_me: 'Von mir erstellt',
|
||||
invite: 'Einladen',
|
||||
email: 'E-Mail',
|
||||
approved: 'Genehmigt',
|
||||
reviewed: 'Überprüft',
|
||||
other: 'Andere',
|
||||
authored_by_me: 'Von mir verfasst',
|
||||
approved_by: 'Genehmigt von',
|
||||
reviewed_by: 'Überprüft von',
|
||||
authored_by: 'Verfasst von',
|
||||
reviewed_by: 'Geprüft von',
|
||||
authored_by: 'Erstellt von',
|
||||
select_a_reason: 'Grund auswählen',
|
||||
value_is_invalid: 'Wert ist ungültig',
|
||||
verification_code_is_invalid: 'Bestätigungscode ist ungültig',
|
||||
drawn_signature_on_a_touchscreen_device: 'Gezeichnete Unterschrift auf einem Touchscreen-Gerät',
|
||||
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scannen Sie den QR-Code mit der Kamera-App, um das Formular auf dem Handy zu öffnen und Ihre Unterschrift zu zeichnen',
|
||||
by_clicking_you_agree_to_the: 'Durch Klicken auf "{button}" stimmen Sie zu, dass Sie die',
|
||||
electronic_signature_disclosure: 'Elektronische Unterschriftenoffenlegung',
|
||||
esignature_disclosure: 'eSignatur Offenlegung',
|
||||
already_paid: 'Bereits bezahlt',
|
||||
minimize: 'Minimieren',
|
||||
text: 'Text',
|
||||
signature: 'Unterschrift',
|
||||
digitally_signed_by: 'Digital unterschrieben von',
|
||||
reason: 'Grund',
|
||||
initials: 'Initialen',
|
||||
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scannen Sie den QR-Code mit der Kamera-App, um das Formular auf dem Mobilgerät zu öffnen und Ihre Unterschrift zu zeichnen',
|
||||
date: 'Datum',
|
||||
number: 'Nummer',
|
||||
number: 'Zahl',
|
||||
value_is_invalid: 'Wert ist ungültig',
|
||||
verification_code_is_invalid: 'Verifizierungscode ist ungültig',
|
||||
already_paid: 'Bereits bezahlt',
|
||||
image: 'Bild',
|
||||
pay: 'Bezahlen',
|
||||
take_photo: 'Foto aufnehmen',
|
||||
number_phone_is_invalid: 'Telefonnummer ({number}) ist ungültig',
|
||||
file: 'Datei',
|
||||
select: 'Auswählen',
|
||||
digitally_signed_by: 'Elektronisch signiert von',
|
||||
reason: 'Grund',
|
||||
select: 'Auswahl',
|
||||
checkbox: 'Checkbox',
|
||||
multiple: 'Mehrere',
|
||||
multiple: 'Mehrfach',
|
||||
radio: 'Radio',
|
||||
cells: 'Zellen',
|
||||
stamp: 'Stempel',
|
||||
minimize: 'Minimieren',
|
||||
payment: 'Zahlung',
|
||||
number_phone_is_invalid: '{number} Telefonnummer ist ungültig',
|
||||
phone: 'Telefon',
|
||||
start_now: 'Jetzt starten',
|
||||
continue: 'Fortsetzen',
|
||||
sign_now: 'Jetzt unterschreiben',
|
||||
continue: 'Weiter',
|
||||
sign_now: 'Jetzt unterzeichnen',
|
||||
type_here_: 'Hier eingeben...',
|
||||
optional: 'optional',
|
||||
option: 'Option',
|
||||
appears_on: 'Erscheint auf',
|
||||
page: 'Seite',
|
||||
take_photo: 'Foto aufnehmen',
|
||||
select_your_option: 'Wähle deine Option',
|
||||
complete_hightlighted_checkboxes_and_click: 'Markierte Kontrollkästchen ausfüllen und klicken',
|
||||
submit: 'absenden',
|
||||
next: 'weiter',
|
||||
click_to_upload: 'Klicken zum Hochladen',
|
||||
select_your_option: 'Option auswählen',
|
||||
complete_hightlighted_checkboxes_and_click: 'Füllen Sie die markierten Kontrollkästchen aus und klicken Sie auf',
|
||||
submit: 'Einreichen',
|
||||
next: 'Weiter',
|
||||
click_to_upload: 'Zum Hochladen klicken',
|
||||
or_drag_and_drop_files: 'oder Dateien hierher ziehen und ablegen',
|
||||
send_copy_via_email: 'Kopie per E-Mail senden',
|
||||
download: 'Herunterladen',
|
||||
@@ -370,137 +370,137 @@ const de = {
|
||||
draw_initials: 'Initialen zeichnen',
|
||||
type_signature_here: 'Unterschrift hier eingeben',
|
||||
type_initial_here: 'Initialen hier eingeben',
|
||||
form_has_been_completed: 'Formular wurde ausgefüllt!',
|
||||
document_has_been_signed: 'Dokument wurde unterschrieben!',
|
||||
documents_have_been_signed: 'Dokumente wurden unterschrieben!',
|
||||
form_has_been_completed: 'Formular wurde abgeschlossen!',
|
||||
document_has_been_signed: 'Dokument wurde unterzeichnet!',
|
||||
documents_have_been_signed: 'Dokumente wurden unterzeichnet!',
|
||||
create_a_free_account: 'Kostenloses Konto erstellen',
|
||||
powered_by: 'Bereitgestellt von',
|
||||
please_check_the_box_to_continue: 'Bitte setzen Sie das Häkchen, um fortzufahren.',
|
||||
please_check_the_box_to_continue: 'Bitte aktivieren Sie das Kontrollkästchen, um fortzufahren.',
|
||||
open_source_documents_software: 'Open-Source-Dokumentensoftware',
|
||||
verified_phone_number: 'Telefonnummer überprüfen',
|
||||
verified_phone_number: 'Telefonnummer verifizieren',
|
||||
use_international_format: 'Internationales Format verwenden: +1xxx',
|
||||
six_digits_code: '6-stelliger Code',
|
||||
change_phone_number: 'Telefonnummer ändern',
|
||||
sending: 'Senden...',
|
||||
resend_code: 'Code erneut senden',
|
||||
verification_code_has_been_resent: 'Die Verifizierungscode wurde erneut per SMS gesendet',
|
||||
please_fill_all_required_fields: 'Bitte füllen Sie alle erforderlichen Felder aus',
|
||||
set_today: 'Heute einstellen',
|
||||
verification_code_has_been_resent: 'Der Verifizierungscode wurde per SMS erneut gesendet',
|
||||
please_fill_all_required_fields: 'Bitte füllen Sie alle Pflichtfelder aus',
|
||||
set_today: 'Heute',
|
||||
toggle_multiline_text: 'Mehrzeiligen Text umschalten',
|
||||
draw_signature: 'Unterschrift zeichnen',
|
||||
type_initial: 'Initialen eingeben',
|
||||
draw: 'Zeichnen',
|
||||
type: 'Eingeben',
|
||||
type_text: 'Text eingeben',
|
||||
toggle_multiline_text: 'Mehrzeiligen Text umschalten',
|
||||
email_has_been_sent: 'Die E-Mail wurde gesendet',
|
||||
email_has_been_sent: 'E-Mail wurde gesendet',
|
||||
processing: 'Verarbeitung',
|
||||
pay_with_strip: 'Mit Stripe bezahlen',
|
||||
pay_with_stripe: 'Mit Stripe bezahlen',
|
||||
reupload: 'Erneut hochladen',
|
||||
upload: 'Hochladen',
|
||||
files: 'Dateien',
|
||||
signature_is_too_small_or_simple_please_redraw: 'Die Unterschrift ist zu klein oder zu einfach. Bitte erneut zeichnen.',
|
||||
wait_countdown_seconds: 'Warte {countdown} Sekunden'
|
||||
signature_is_too_small_or_simple_please_redraw: 'Die Unterschrift ist zu klein oder zu einfach. Bitte neu zeichnen.',
|
||||
wait_countdown_seconds: 'Bitte {countdown} Sekunden warten'
|
||||
}
|
||||
|
||||
const fr = {
|
||||
please_upload_an_image_file: 'Veuillez télécharger un fichier image',
|
||||
must_be_characters_length: 'Doit contenir {number} caractères',
|
||||
complete_all_required_fields_to_proceed_with_identity_verification: "Veuillez remplir tous les champs obligatoires pour continuer la vérification de l'identité.",
|
||||
verify_id: "Vérification de l'ID",
|
||||
identity_verification: "Vérification de l'identité",
|
||||
please_upload_an_image_file: 'Veuillez téléverser un fichier image',
|
||||
must_be_characters_length: 'Doit comporter {number} caractères',
|
||||
complete_all_required_fields_to_proceed_with_identity_verification: "Veuillez remplir tous les champs obligatoires pour poursuivre la vérification d'identité.",
|
||||
verify_id: "Vérifier l'ID",
|
||||
identity_verification: "Vérification d'identité",
|
||||
complete: 'Terminer',
|
||||
fill_all_required_fields_to_complete: 'Veuillez remplir tous les champs obligatoires pour compléter',
|
||||
sign_and_complete: 'Signer et Terminer',
|
||||
invite: 'Inviter',
|
||||
email: 'Courriel',
|
||||
fill_all_required_fields_to_complete: 'Remplissez tous les champs obligatoires pour terminer',
|
||||
sign_and_complete: 'Signer et terminer',
|
||||
text: 'Texte',
|
||||
by_clicking_you_agree_to_the: 'En cliquant sur "{button}", vous acceptez la',
|
||||
electronic_signature_disclosure: 'Déclaration relative à la signature électronique',
|
||||
esignature_disclosure: 'Déclaration eSignature',
|
||||
signature: 'Signature',
|
||||
initials: 'Initiales',
|
||||
drawn_signature_on_a_touchscreen_device: 'Signature dessinée sur un appareil à écran tactile',
|
||||
approved: 'Approuvé',
|
||||
reviewed: 'Révisé',
|
||||
other: 'Autre',
|
||||
authored_by_me: 'Rédigé par moi',
|
||||
invite: 'Inviter',
|
||||
email: 'E-mail',
|
||||
approved_by: 'Approuvé par',
|
||||
reviewed_by: 'Révisé par',
|
||||
authored_by: 'Rédigé par',
|
||||
select_a_reason: 'Sélectionnez une raison',
|
||||
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scannez le QR avec l’appareil photo pour ouvrir le formulaire et signer sur mobile',
|
||||
date: 'Date',
|
||||
number: 'Nombre',
|
||||
value_is_invalid: 'La valeur est invalide',
|
||||
verification_code_is_invalid: 'Le code de vérification est invalide',
|
||||
drawn_signature_on_a_touchscreen_device: 'Signature dessinée sur un appareil à écran tactile',
|
||||
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scannez le code QR avec l\'application de l\'appareil photo pour ouvrir le formulaire sur mobile et dessiner votre signature',
|
||||
by_clicking_you_agree_to_the: 'En cliquant sur "{button}", vous acceptez la',
|
||||
electronic_signature_disclosure: 'Divulgation de Signature Électronique',
|
||||
esignature_disclosure: 'Divulgation de la eSignature',
|
||||
minimize: 'Réduire',
|
||||
text: 'Texte',
|
||||
already_paid: 'Déjà payé',
|
||||
signature: 'Signature',
|
||||
initials: 'Initiales',
|
||||
digitally_signed_by: 'Signé numériquement par',
|
||||
reason: 'Raison',
|
||||
pay: 'Payer',
|
||||
date: 'Date',
|
||||
number: 'Numéro',
|
||||
image: 'Image',
|
||||
pay: 'Payer',
|
||||
take_photo: 'Prendre une photo',
|
||||
number_phone_is_invalid: "Le numéro de téléphone {number} n'est pas valide",
|
||||
file: 'Fichier',
|
||||
select: 'Choisir',
|
||||
digitally_signed_by: 'Signé électroniquement par',
|
||||
reason: 'Motif',
|
||||
select: 'Sélectionner',
|
||||
checkbox: 'Coche',
|
||||
multiple: 'Multiple',
|
||||
radio: 'Radio',
|
||||
cells: 'Cellules',
|
||||
stamp: 'Tampon',
|
||||
minimize: 'Réduire',
|
||||
payment: 'Paiement',
|
||||
number_phone_is_invalid: '{number} téléphone est invalide',
|
||||
phone: 'Téléphone',
|
||||
start_now: 'Commencer maintenant',
|
||||
continue: 'Continuer',
|
||||
sign_now: 'Signer maintenant',
|
||||
type_here_: 'Tapez ici...',
|
||||
type_here_: 'Saisissez ici...',
|
||||
optional: 'facultatif',
|
||||
option: 'Option',
|
||||
appears_on: 'Apparaît sur',
|
||||
page: 'Page',
|
||||
take_photo: 'Prendre une photo',
|
||||
select_your_option: 'Sélectionnez votre option',
|
||||
complete_hightlighted_checkboxes_and_click: 'Complétez les cases à cocher en surbrillance et cliquez',
|
||||
submit: 'envoyer',
|
||||
complete_hightlighted_checkboxes_and_click: 'Cochez les cases mises en évidence puis cliquez',
|
||||
submit: 'soumettre',
|
||||
next: 'suivant',
|
||||
click_to_upload: 'Cliquez pour télécharger',
|
||||
or_drag_and_drop_files: 'ou faites glisser-déposer les fichiers',
|
||||
click_to_upload: 'Cliquez pour téléverser',
|
||||
or_drag_and_drop_files: 'ou faites glisser et déposez des fichiers',
|
||||
send_copy_via_email: 'Envoyer une copie par e-mail',
|
||||
download: 'Télécharger',
|
||||
clear: 'Effacer',
|
||||
redraw: 'Redessiner',
|
||||
draw_initials: 'Dessiner les initiales',
|
||||
type_signature_here: 'Tapez la signature ici',
|
||||
type_initial_here: 'Tapez les initiales ici',
|
||||
form_has_been_completed: 'Le formulaire a été complété !',
|
||||
document_has_been_signed: 'Le document a été signé!',
|
||||
documents_have_been_signed: 'Les documents ont été signés!',
|
||||
create_a_free_account: 'Créer un Compte Gratuit',
|
||||
type_signature_here: 'Saisissez la signature ici',
|
||||
type_initial_here: 'Saisissez les initiales ici',
|
||||
form_has_been_completed: 'Le formulaire a été rempli !',
|
||||
document_has_been_signed: 'Le document a été signé !',
|
||||
documents_have_been_signed: 'Les documents ont été signés !',
|
||||
create_a_free_account: 'Créer un compte gratuit',
|
||||
powered_by: 'Propulsé par',
|
||||
please_check_the_box_to_continue: 'Veuillez cocher la case pour continuer.',
|
||||
open_source_documents_software: 'logiciel de documents open source',
|
||||
verified_phone_number: 'Vérifier le numéro de téléphone',
|
||||
use_international_format: 'Utiliser le format international : +1xxx',
|
||||
use_international_format: 'Utilisez le format international : +1xxx',
|
||||
six_digits_code: 'Code à 6 chiffres',
|
||||
change_phone_number: 'Changer le numéro de téléphone',
|
||||
sending: 'Envoi en cours...',
|
||||
change_phone_number: 'Changer de numéro de téléphone',
|
||||
sending: 'Envoi...',
|
||||
resend_code: 'Renvoyer le code',
|
||||
verification_code_has_been_resent: 'Le code de vérification a été renvoyé par SMS',
|
||||
please_fill_all_required_fields: 'Veuillez remplir tous les champs obligatoires',
|
||||
set_today: "Définir Aujourd'hui",
|
||||
draw_signature: 'Dessiner une signature',
|
||||
set_today: "Définir à aujourd'hui",
|
||||
toggle_multiline_text: 'Basculer le texte multiligne',
|
||||
draw_signature: 'Dessiner la signature',
|
||||
type_initial: 'Saisir les initiales',
|
||||
draw: 'Dessiner',
|
||||
type: 'Saisir',
|
||||
type_text: 'Saisir du texte',
|
||||
toggle_multiline_text: 'Basculer le Texte Multiligne',
|
||||
email_has_been_sent: "L'email a été envoyé",
|
||||
processing: 'Traitement',
|
||||
pay_with_strip: 'Paiement avec Stripe',
|
||||
reupload: 'Recharger',
|
||||
upload: 'Télécharger',
|
||||
email_has_been_sent: "L'e-mail a été envoyé",
|
||||
processing: 'Traitement en cours',
|
||||
pay_with_stripe: 'Payer avec Stripe',
|
||||
reupload: 'Retéléverser',
|
||||
upload: 'Téléverser',
|
||||
files: 'Fichiers',
|
||||
signature_is_too_small_or_simple_please_redraw: 'La signature est trop petite ou trop simple. Veuillez la redessiner.',
|
||||
wait_countdown_seconds: 'Attendez {countdown} secondes'
|
||||
wait_countdown_seconds: 'Veuillez patienter {countdown} secondes'
|
||||
}
|
||||
|
||||
const pl = {
|
||||
@@ -596,7 +596,7 @@ const pl = {
|
||||
toggle_multiline_text: 'Przełącz Tekst Wielolinijkowy',
|
||||
email_has_been_sent: 'E-mail został wysłany',
|
||||
processing: 'Przetwarzanie',
|
||||
pay_with_strip: 'Płatność za pomocą Stripe',
|
||||
pay_with_stripe: 'Płatność za pomocą Stripe',
|
||||
reupload: 'Ponowne przesłanie',
|
||||
upload: 'Przesyłanie',
|
||||
files: 'Pliki',
|
||||
@@ -798,7 +798,7 @@ const cs = {
|
||||
toggle_multiline_text: 'Přepnout Víceřádkový Text',
|
||||
email_has_been_sent: 'E-mail byl odeslán',
|
||||
processing: 'Zpracování',
|
||||
pay_with_strip: 'Zaplacení přes Stripe',
|
||||
pay_with_stripe: 'Zaplacení přes Stripe',
|
||||
reupload: 'Znovu nahrát',
|
||||
upload: 'Nahrát',
|
||||
files: 'Soubory',
|
||||
@@ -899,7 +899,7 @@ const pt = {
|
||||
toggle_multiline_text: 'Alternar Texto Multilinha',
|
||||
email_has_been_sent: 'Email enviado',
|
||||
processing: 'Processamento',
|
||||
pay_with_strip: 'Pagar com Stripe',
|
||||
pay_with_stripe: 'Pagar com Stripe',
|
||||
reupload: 'Reenviar',
|
||||
upload: 'Carregar',
|
||||
files: 'Arquivos',
|
||||
@@ -1000,7 +1000,7 @@ const he = {
|
||||
type_text: 'הקלד טקסט',
|
||||
email_has_been_sent: 'האימייל נשלח',
|
||||
processing: 'מעבד',
|
||||
pay_with_strip: 'שלם עם סטרייפ',
|
||||
pay_with_stripe: 'שלם עם סטרייפ',
|
||||
reupload: 'העלה שוב',
|
||||
upload: 'העלאה',
|
||||
files: 'קבצים',
|
||||
@@ -1101,7 +1101,7 @@ const nl = {
|
||||
type_text: 'Typ tekst',
|
||||
email_has_been_sent: 'E-mail is verzonden',
|
||||
processing: 'Verwerken',
|
||||
pay_with_strip: 'Betalen met Stripe',
|
||||
pay_with_stripe: 'Betalen met Stripe',
|
||||
reupload: 'Opnieuw uploaden',
|
||||
upload: 'Uploaden',
|
||||
files: 'Bestanden',
|
||||
@@ -1303,7 +1303,7 @@ const ko = {
|
||||
type_text: '텍스트 입력',
|
||||
email_has_been_sent: '이메일이 전송되었습니다',
|
||||
processing: '처리 중',
|
||||
pay_with_strip: '스트라이프로 결제',
|
||||
pay_with_stripe: '스트라이프로 결제',
|
||||
reupload: '다시 업로드',
|
||||
upload: '업로드',
|
||||
files: '파일',
|
||||
@@ -1404,7 +1404,7 @@ const ja = {
|
||||
type_text: 'テキストを入力',
|
||||
email_has_been_sent: 'メールが送信されました',
|
||||
processing: '処理中',
|
||||
pay_with_strip: 'Stripeで支払う',
|
||||
pay_with_stripe: 'Stripeで支払う',
|
||||
reupload: '再アップロード',
|
||||
upload: 'アップロード',
|
||||
files: 'ファイル',
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
width="22"
|
||||
/>
|
||||
<span>
|
||||
{{ t('pay_with_strip') }}
|
||||
{{ t('pay_with_stripe') }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -260,8 +260,12 @@
|
||||
:style="{ backgroundColor }"
|
||||
>
|
||||
<Upload
|
||||
v-if="sortedDocuments.length && editable && withUploadButton"
|
||||
v-if="editable && withUploadButton"
|
||||
v-show="sortedDocuments.length"
|
||||
ref="upload"
|
||||
:accept-file-types="acceptFileTypes"
|
||||
:authenticity-token="authenticityToken"
|
||||
:with-google-drive="withGoogleDrive"
|
||||
:template-id="template.id"
|
||||
@success="updateFromUpload"
|
||||
/>
|
||||
@@ -297,6 +301,8 @@
|
||||
v-if="withUploadButton"
|
||||
:template-id="template.id"
|
||||
:accept-file-types="acceptFileTypes"
|
||||
:with-google-drive="withGoogleDrive"
|
||||
@click-google-drive="$refs.upload.openGoogleDriveModal()"
|
||||
@success="updateFromUpload"
|
||||
/>
|
||||
<button
|
||||
@@ -368,6 +374,8 @@
|
||||
v-if="withUploadButton"
|
||||
:template-id="template.id"
|
||||
:accept-file-types="acceptFileTypes"
|
||||
:authenticity-token="authenticityToken"
|
||||
:with-google-drive="withGoogleDrive"
|
||||
@success="updateFromUpload"
|
||||
/>
|
||||
<button
|
||||
@@ -766,6 +774,11 @@ export default {
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
withGoogleDrive: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
onlyDefinedFields: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
@@ -1757,8 +1770,9 @@ export default {
|
||||
},
|
||||
onDocumentReplace (data) {
|
||||
const { replaceSchemaItem, schema, documents } = data
|
||||
const { google_drive_file_id, ...cleanedReplaceSchemaItem } = replaceSchemaItem
|
||||
|
||||
this.template.schema.splice(this.template.schema.indexOf(replaceSchemaItem), 1, { ...replaceSchemaItem, ...schema[0] })
|
||||
this.template.schema.splice(this.template.schema.indexOf(replaceSchemaItem), 1, { ...cleanedReplaceSchemaItem, ...schema[0] })
|
||||
this.template.documents.push(...documents)
|
||||
|
||||
if (data.fields) {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
dir="auto"
|
||||
:contenteditable="editable"
|
||||
style="min-width: 2px"
|
||||
:class="iconInline ? 'inline' : 'block'"
|
||||
class="peer outline-none focus:block"
|
||||
:class="[iconInline ? 'inline' : 'block', hideIcon ? 'focus:block' : '']"
|
||||
class="peer outline-none"
|
||||
@paste.prevent="onPaste"
|
||||
@keydown.enter.prevent="blurContenteditable"
|
||||
@focus="$emit('focus', $event)"
|
||||
@@ -18,22 +18,19 @@
|
||||
{{ value }}
|
||||
</span>
|
||||
<span
|
||||
v-if="withRequired"
|
||||
title="Required"
|
||||
class="text-red-500 peer-focus:hidden"
|
||||
@click="focusContenteditable"
|
||||
class="relative inline"
|
||||
:class="{ 'peer-focus:hidden': hideIcon, 'peer-focus:invisible': !hideIcon }"
|
||||
>
|
||||
*
|
||||
<IconPencil
|
||||
class="cursor-pointer flex-none opacity-0 group-hover/contenteditable-container:opacity-100 group-hover/contenteditable:opacity-100 align-middle pl-1"
|
||||
:style="iconInline ? {} : { right: -(1.1 * iconWidth) + 'px' }"
|
||||
:title="t('edit')"
|
||||
:class="{ invisible: !editable, 'absolute top-1/2 -translate-y-1/2': !iconInline || floatIcon, 'inline align-bottom': iconInline, 'left-0': floatIcon }"
|
||||
:width="iconWidth + 4"
|
||||
:stroke-width="iconStrokeWidth"
|
||||
@click="[focusContenteditable(), selectOnEditClick && selectContent()]"
|
||||
/>
|
||||
</span>
|
||||
<IconPencil
|
||||
class="cursor-pointer flex-none opacity-0 group-hover/contenteditable-container:opacity-100 group-hover/contenteditable:opacity-100 align-middle peer-focus:hidden"
|
||||
:style="iconInline ? {} : { right: -(1.1 * iconWidth) + 'px' }"
|
||||
:title="t('edit')"
|
||||
:class="{ invisible: !editable, 'ml-1': !withRequired, 'absolute': !iconInline, 'inline align-bottom': iconInline }"
|
||||
:width="iconWidth"
|
||||
:stroke-width="iconStrokeWidth"
|
||||
@click="[focusContenteditable(), selectOnEditClick && selectContent()]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -62,7 +59,12 @@ export default {
|
||||
required: false,
|
||||
default: 30
|
||||
},
|
||||
withRequired: {
|
||||
hideIcon: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
floatIcon: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
:for="inputId"
|
||||
:class="{ 'opacity-50': isLoading, 'hover:bg-base-200/50': withHoverClass && !isDragEntering, 'bg-base-200/50 border-base-content/30': isDragEntering }"
|
||||
>
|
||||
<div class="absolute top-0 right-0 left-0 bottom-0 flex items-center justify-center pointer-events-none">
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="absolute top-0 right-0 left-0 bottom-0 flex items-center justify-center">
|
||||
<div class="flex flex-col items-center pointer-events-none">
|
||||
<IconInnerShadowTop
|
||||
v-if="isLoading"
|
||||
class="animate-spin"
|
||||
@@ -40,6 +40,15 @@
|
||||
>
|
||||
<span class="font-medium">{{ t('click_to_upload') }}</span> {{ t('or_drag_and_drop_files') }}
|
||||
</div>
|
||||
<button
|
||||
v-if="withGoogleDrive"
|
||||
class="flex items-center text-sm mt-2 pointer-events-auto"
|
||||
@click.stop.prevent="$emit('click-google-drive')"
|
||||
>
|
||||
<span>{{ t('or_add_from') }}</span>
|
||||
<IconBrandGoogleDrive class="w-4 h-4 inline-block ml-1" />
|
||||
<span class="ml-1 font-medium hover:underline">Google Drive</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form
|
||||
@@ -62,7 +71,7 @@
|
||||
|
||||
<script>
|
||||
import Upload from './upload'
|
||||
import { IconCloudUpload, IconFilePlus, IconFileSymlink, IconFiles, IconInnerShadowTop } from '@tabler/icons-vue'
|
||||
import { IconCloudUpload, IconFilePlus, IconFileSymlink, IconFiles, IconInnerShadowTop, IconBrandGoogleDrive } from '@tabler/icons-vue'
|
||||
|
||||
export default {
|
||||
name: 'FileDropzone',
|
||||
@@ -71,7 +80,8 @@ export default {
|
||||
IconCloudUpload,
|
||||
IconInnerShadowTop,
|
||||
IconFileSymlink,
|
||||
IconFiles
|
||||
IconFiles,
|
||||
IconBrandGoogleDrive
|
||||
},
|
||||
inject: ['baseFetch', 't'],
|
||||
props: {
|
||||
@@ -99,6 +109,11 @@ export default {
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
withGoogleDrive: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -110,7 +125,7 @@ export default {
|
||||
default: 'image/*, application/pdf, application/zip'
|
||||
}
|
||||
},
|
||||
emits: ['success', 'error', 'loading'],
|
||||
emits: ['success', 'error', 'loading', 'click-google-drive'],
|
||||
data () {
|
||||
return {
|
||||
isLoading: false,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
>
|
||||
<span class="py-1 flex items-center">
|
||||
<span
|
||||
class="rounded-full w-3 h-3 ml-1 mr-3"
|
||||
class="rounded-full w-3 h-3 ml-1 mr-3 flex-shrink-0"
|
||||
:class="colors[index % colors.length]"
|
||||
/>
|
||||
<span>
|
||||
@@ -100,7 +100,7 @@
|
||||
class="cursor-pointer text-base-100 flex h-full items-center justify-center"
|
||||
>
|
||||
<button
|
||||
class="mx-1 w-3 h-3 rounded-full"
|
||||
class="mx-1 w-3 h-3 rounded-full flex-shrink-0"
|
||||
:class="colors[submitters.indexOf(selectedSubmitter) % colors.length]"
|
||||
/>
|
||||
</label>
|
||||
@@ -108,11 +108,11 @@
|
||||
v-else
|
||||
ref="label"
|
||||
tabindex="0"
|
||||
class="group cursor-pointer group/contenteditable-container rounded-md p-2 border border-base-300 hover:border-content w-full flex justify-between"
|
||||
class="group cursor-pointer group/contenteditable-container rounded-md p-2 border border-base-300 hover:border-content w-full flex justify-between items-center"
|
||||
>
|
||||
<div class="flex items-center space-x-2">
|
||||
<span
|
||||
class="w-3 h-3 rounded-full"
|
||||
class="w-3 h-3 rounded-full flex-shrink-0"
|
||||
:class="colors[submitters.indexOf(selectedSubmitter) % colors.length]"
|
||||
/>
|
||||
<Contenteditable
|
||||
@@ -125,7 +125,7 @@
|
||||
@update:model-value="$emit('name-change', selectedSubmitter)"
|
||||
/>
|
||||
</div>
|
||||
<span class="flex items-center transition-all duration-75 group-hover:border border-base-content/20 border-dashed w-6 h-6 flex justify-center items-center rounded">
|
||||
<span class="flex items-center transition-all duration-75 group-hover:border border-base-content/20 border-dashed w-6 h-6 justify-center rounded flex-shrink-0">
|
||||
<component
|
||||
:is="editable ? 'IconPlus' : 'IconChevronDown'"
|
||||
width="18"
|
||||
@@ -153,7 +153,7 @@
|
||||
>
|
||||
<span class="py-1 flex items-center">
|
||||
<span
|
||||
class="rounded-full w-3 h-3 ml-1 mr-3"
|
||||
class="rounded-full w-3 h-3 ml-1 mr-3 flex-shrink-0"
|
||||
:class="colors[index % colors.length]"
|
||||
/>
|
||||
<span>
|
||||
@@ -164,7 +164,7 @@
|
||||
v-if="!compact && submitters.length > 1 && editable"
|
||||
class="flex"
|
||||
>
|
||||
<div class="flex-col pr-1 hidden group-hover:flex -mt-1 h-0">
|
||||
<div class="flex-col pr-1 flex invisible group-hover:visible -mt-1 h-0">
|
||||
<button
|
||||
:title="t('up')"
|
||||
class="relative w-2"
|
||||
@@ -184,7 +184,7 @@
|
||||
</div>
|
||||
<button
|
||||
v-if="!compact && submitters.length > 1 && editable"
|
||||
class="hidden group-hover:block px-2"
|
||||
class="invisible group-hover:visible px-2"
|
||||
@click.prevent.stop="remove(submitter)"
|
||||
>
|
||||
<IconTrashX :width="18" />
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div
|
||||
class="dropdown"
|
||||
:class="{ 'dropdown-open': isLoading }"
|
||||
>
|
||||
<label tabindex="0">
|
||||
<IconBrandGoogleDrive
|
||||
width="19"
|
||||
class="inline-block mr-1 cursor-pointer"
|
||||
/>
|
||||
</label>
|
||||
<ul
|
||||
tabindex="0"
|
||||
:style="{ backgroundColor }"
|
||||
class="dropdown-content z-[1] shadow menu rounded-box"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
:href="`https://drive.google.com/file/d/${googleDriveFileId}/view?usp=sharing`"
|
||||
data-turbo="false"
|
||||
target="_blank"
|
||||
class="flex items-center"
|
||||
>
|
||||
<IconExternalLink class="w-4 h-4 flex-shrink-0" />
|
||||
<span>{{ t('view') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
form="sync_form"
|
||||
type="submit"
|
||||
:disabled="isLoading"
|
||||
>
|
||||
<IconRefresh
|
||||
class="w-4 h-4 flex-shrink-0"
|
||||
:class="{ 'animate-spin': isLoading }"
|
||||
/>
|
||||
<span>{{ message }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<form
|
||||
id="sync_form"
|
||||
ref="form"
|
||||
class="hidden"
|
||||
@submit.prevent="upload({ path: uploadUrl })"
|
||||
>
|
||||
<input
|
||||
:id="inputId"
|
||||
ref="input"
|
||||
:value="googleDriveFileId"
|
||||
name="google_drive_file_ids[]"
|
||||
>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from './upload'
|
||||
import { IconRefresh, IconBrandGoogleDrive, IconExternalLink } from '@tabler/icons-vue'
|
||||
|
||||
export default {
|
||||
name: 'GoogleDriveDocumentSettings',
|
||||
components: {
|
||||
IconRefresh,
|
||||
IconBrandGoogleDrive,
|
||||
IconExternalLink
|
||||
},
|
||||
inject: ['baseFetch', 't', 'backgroundColor'],
|
||||
props: {
|
||||
templateId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
googleDriveFileId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
emits: ['success'],
|
||||
data () {
|
||||
return {
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
inputId () {
|
||||
return 'el' + Math.random().toString(32).split('.')[1]
|
||||
},
|
||||
uploadUrl () {
|
||||
return `/templates/${this.templateId}/google_drive_documents`
|
||||
},
|
||||
message () {
|
||||
if (this.isLoading) {
|
||||
return this.t('syncing')
|
||||
} else {
|
||||
return this.t('sync')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
upload: Upload.methods.upload
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,4 +1,5 @@
|
||||
const en = {
|
||||
view: 'View',
|
||||
payment_link: 'Payment link',
|
||||
strikeout: 'Strikeout',
|
||||
draw_strikethrough_the_document: 'Draw strikethrough the document',
|
||||
@@ -176,10 +177,14 @@ const en = {
|
||||
and: 'and',
|
||||
or: 'or',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Start a quick tour to learn how to create an send your first document',
|
||||
start_tour: 'Start Tour'
|
||||
start_tour: 'Start Tour',
|
||||
or_add_from: 'Or add from',
|
||||
sync: 'Sync',
|
||||
syncing: 'Syncing...'
|
||||
}
|
||||
|
||||
const es = {
|
||||
view: 'Vista',
|
||||
payment_link: 'Enlace de pago',
|
||||
strikeout: 'Tachar',
|
||||
draw_strikethrough_the_document: 'Dibujar una línea de tachado en el documento',
|
||||
@@ -357,10 +362,14 @@ const es = {
|
||||
and: 'y',
|
||||
or: 'o',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Inicia una guía rápida para aprender a crear y enviar tu primer documento.',
|
||||
start_tour: 'Iniciar guía'
|
||||
start_tour: 'Iniciar guía',
|
||||
or_add_from: 'O agregar desde',
|
||||
sync: 'Sincronizar',
|
||||
syncing: 'Sincronizando...'
|
||||
}
|
||||
|
||||
const it = {
|
||||
view: 'Vista',
|
||||
payment_link: 'Link di pagamento',
|
||||
strikeout: 'Barrato',
|
||||
draw_strikethrough_the_document: 'Disegna una linea barrata sul documento',
|
||||
@@ -538,10 +547,14 @@ const it = {
|
||||
and: 'e',
|
||||
or: 'o',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Inizia un tour rapido per imparare a creare e inviare il tuo primo documento.',
|
||||
start_tour: 'Inizia il tour'
|
||||
start_tour: 'Inizia il tour',
|
||||
or_add_from: 'O aggiungi da',
|
||||
sync: 'Sincronizza',
|
||||
syncing: 'Sincronizzazione...'
|
||||
}
|
||||
|
||||
const pt = {
|
||||
view: 'Visualizar',
|
||||
payment_link: 'Link de pagamento',
|
||||
strikeout: 'Tachado',
|
||||
draw_strikethrough_the_document: 'Desenhe uma linha de tachado no documento',
|
||||
@@ -719,94 +732,104 @@ const pt = {
|
||||
and: 'e',
|
||||
or: 'ou',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Comece um tour rápido para aprender a criar e enviar seu primeiro documento.',
|
||||
start_tour: 'Iniciar tour'
|
||||
start_tour: 'Iniciar tour',
|
||||
or_add_from: 'Ou adicionar de',
|
||||
sync: 'Sincronizar',
|
||||
syncing: 'Sincronizando...'
|
||||
}
|
||||
|
||||
const fr = {
|
||||
view: 'Voir',
|
||||
payment_link: 'Lien de paiement',
|
||||
strikeout: 'Barrer',
|
||||
draw_strikethrough_the_document: 'Tracer une ligne de suppression sur le document',
|
||||
strikeout: 'Rature',
|
||||
draw_strikethrough_the_document: 'Tracer une rature sur le document',
|
||||
quantity: 'Quantité',
|
||||
prefillable: 'Pré-remplissable',
|
||||
signature_id: 'ID de signature',
|
||||
error_message: 'Message d\'erreur',
|
||||
prefillable: 'Préremplissable',
|
||||
signature_id: 'Identifiant de signature',
|
||||
error_message: "Message d'erreur",
|
||||
length: 'Longueur',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
date_signed: 'Date actuelle',
|
||||
font: 'Police',
|
||||
party: 'Partie',
|
||||
date_signed: 'Date de signature',
|
||||
method: 'Méthode',
|
||||
reorder_fields: 'Réorganiser les champs',
|
||||
verify_id: "Vérifier l'ID",
|
||||
obtain_qualified_electronic_signature_with_the_trusted_provider_click_to_learn_more: 'Obtenez une signature électronique qualifiée (QeS) avec le fournisseur de confiance. Cliquez pour en savoir plus.',
|
||||
obtain_qualified_electronic_signature_with_the_trusted_provider_click_to_learn_more: 'Obtenez une signature électronique qualifiée (QeS) auprès du fournisseur de confiance. Cliquez pour en savoir plus.',
|
||||
editable: 'Modifiable',
|
||||
recurrent: 'Récurrent',
|
||||
one_off: 'Ponctuel',
|
||||
editable: 'Éditable',
|
||||
search_field: 'Champ de recherche',
|
||||
field_not_found: 'Champ non trouvé',
|
||||
field_not_found: 'Champ introuvable',
|
||||
clear: 'Effacer',
|
||||
type_value: 'Tapez la valeur',
|
||||
add_all_required_fields_to_continue: 'Ajoutez tous les champs obligatoires pour continuer',
|
||||
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'Le PDF téléchargé contient des champs. Les conserver ou les supprimer?',
|
||||
keep: 'Conserver',
|
||||
align: 'Aligner',
|
||||
add_all_required_fields_to_continue: 'Ajoutez tous les champs obligatoires pour continuer',
|
||||
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'Le PDF téléversé contient des champs de formulaire. Les conserver ou les supprimer ?',
|
||||
keep: 'Conserver',
|
||||
left: 'Gauche',
|
||||
heading: 'En-tête',
|
||||
heading: 'Titre',
|
||||
validation: 'Validation',
|
||||
add_blank_page: 'Ajouter une page blanche',
|
||||
right: 'Droite',
|
||||
add_condition: 'Ajouter une condition',
|
||||
center: 'Centre',
|
||||
with_logo: 'Avec logo',
|
||||
description: 'Description',
|
||||
display_title: "Titre d'affichage",
|
||||
unchecked: 'Non coché',
|
||||
display_title: 'Afficher le titre',
|
||||
with_logo: 'Avec logo',
|
||||
unchecked: 'Décoché',
|
||||
price: 'Prix',
|
||||
type_value: 'Saisir une valeur',
|
||||
equal: 'Égal',
|
||||
not_equal: 'Non égal',
|
||||
not_equal: 'Différent',
|
||||
contains: 'Contient',
|
||||
signing_date: 'Date de signature',
|
||||
does_not_contain: 'Ne contient pas',
|
||||
not_empty: 'Non vide',
|
||||
empty: 'Vide',
|
||||
select_field_: 'Sélectionner un champ...',
|
||||
select_value_: 'Sélectionner une valeur...',
|
||||
remove_condition: 'Supprimer la condition',
|
||||
condition: 'Condition',
|
||||
formula: 'Formule',
|
||||
edit: 'Éditer',
|
||||
add_condition: 'Ajouter une condition',
|
||||
are_you_sure_: 'Êtes-vous sûr ?',
|
||||
sign_yourself: 'Signer vous-même',
|
||||
set_signing_date: 'Définir la date de signature',
|
||||
signing_date: 'Date de signature',
|
||||
send: 'Envoyer',
|
||||
remove: 'Supprimer',
|
||||
edit: 'Modifier',
|
||||
settings: 'Paramètres',
|
||||
up: 'Haut',
|
||||
down: 'Bas',
|
||||
set_signing_date: 'Définir la date de signature',
|
||||
are_you_sure_: 'Êtes-vous sûr?',
|
||||
sign_yourself: 'Signez-vous',
|
||||
checked: 'Coché',
|
||||
send: 'Envoyer',
|
||||
remove: 'Supprimer',
|
||||
save: 'Enregistrer',
|
||||
cancel: 'Annuler',
|
||||
draw_field_on_the_document: 'Dessiner un champ sur le document',
|
||||
click_to_upload: 'Cliquez pour télécharger',
|
||||
any: "N'importe lequel",
|
||||
drawn: 'Dessiné',
|
||||
drawn_or_typed: 'Dessiné ou tapé',
|
||||
drawn_or_upload: 'Dessiné ou téléversé',
|
||||
upload: 'Téléverser',
|
||||
formula: 'Formule',
|
||||
typed: 'Tapé',
|
||||
draw_field_on_the_document: 'Dessinez un champ sur le document',
|
||||
click_to_upload: 'Cliquez pour téléverser',
|
||||
or_drag_and_drop_files: 'ou faites glisser-déposer des fichiers',
|
||||
uploading: 'Téléchargement en cours',
|
||||
processing_: 'Traitement en cours...',
|
||||
add_pdf_documents_or_images: 'Ajoutez des documents PDF ou des images',
|
||||
add_documents_or_images: 'Ajoutez des documents ou des images',
|
||||
add_a_new_document: 'Adicionar um novo documento',
|
||||
uploading: 'Téléversement en cours',
|
||||
processing_: 'Traitement...',
|
||||
add_pdf_documents_or_images: 'Ajouter des documents PDF ou des images',
|
||||
add_documents_or_images: 'Ajouter des documents ou des images',
|
||||
add_a_new_document: 'Ajouter un nouveau document',
|
||||
replace_existing_document: 'Remplacer le document existant',
|
||||
clone_and_replace_documents: 'Cloner et remplacer les documents',
|
||||
required: 'Requis',
|
||||
clone_and_replace_documents: 'Cloner et remplacer des documents',
|
||||
required: 'Obligatoire',
|
||||
default_value: 'Valeur par défaut',
|
||||
format: 'Format',
|
||||
read_only: 'Lecture seule',
|
||||
page: 'Page',
|
||||
draw_new_area: 'Dessiner une nouvelle zone',
|
||||
draw_new_area: 'Dessiner une zone',
|
||||
copy_to_all_pages: 'Copier sur toutes les pages',
|
||||
add_option: 'Ajouter une option',
|
||||
option: 'Option',
|
||||
options: 'Options',
|
||||
condition: 'Condition',
|
||||
first_party: 'Première partie',
|
||||
second_party: 'Deuxième partie',
|
||||
third_party: 'Troisième partie',
|
||||
@@ -817,27 +840,27 @@ const fr = {
|
||||
eighth_party: 'Huitième partie',
|
||||
ninth_party: 'Neuvième partie',
|
||||
tenth_party: 'Dixième partie',
|
||||
eleventh_party: 'Onzième Parti',
|
||||
twelfth_party: 'Douzième Parti',
|
||||
thirteenth_party: 'Treizième Parti',
|
||||
fourteenth_party: 'Quatorzième Parti',
|
||||
fifteenth_party: 'Quinzième Parti',
|
||||
sixteenth_party: 'Seizième Parti',
|
||||
seventeenth_party: 'Dix-septième Parti',
|
||||
eighteenth_party: 'Dix-huitième Parti',
|
||||
nineteenth_party: 'Dix-Neuvième Fête',
|
||||
twentieth_party: 'Vingtième Fête',
|
||||
eleventh_party: 'Onzième partie',
|
||||
twelfth_party: 'Douzième partie',
|
||||
thirteenth_party: 'Treizième partie',
|
||||
fourteenth_party: 'Quatorzième partie',
|
||||
fifteenth_party: 'Quinzième partie',
|
||||
sixteenth_party: 'Seizième partie',
|
||||
seventeenth_party: 'Dix-septième partie',
|
||||
eighteenth_party: 'Dix-huitième partie',
|
||||
nineteenth_party: 'Dix-neuvième partie',
|
||||
twentieth_party: 'Vingtième partie',
|
||||
draw: 'Dessiner',
|
||||
add: 'Ajouter',
|
||||
or_add_field_without_drawing: 'Ou ajoutez un champ sans dessiner',
|
||||
or_add_field_without_drawing: 'Ou ajouter un champ sans le dessiner',
|
||||
text: 'Texte',
|
||||
number: 'Nombre',
|
||||
signature: 'Signature',
|
||||
initials: 'Initiales',
|
||||
date: 'Date',
|
||||
number: 'Numéro',
|
||||
image: 'Image',
|
||||
file: 'Fichier',
|
||||
select: 'Choisir',
|
||||
select: 'Sélection',
|
||||
checkbox: 'Coche',
|
||||
multiple: 'Multiple',
|
||||
radio: 'Radio',
|
||||
@@ -845,40 +868,34 @@ const fr = {
|
||||
stamp: 'Tampon',
|
||||
payment: 'Paiement',
|
||||
phone: 'Téléphone',
|
||||
text_field: 'Champ de Texte',
|
||||
signature_field: 'Champ de Signature',
|
||||
initials_field: "Champ d'Initiales",
|
||||
date_field: 'Champ de Date',
|
||||
number_field: 'Champ de Numéro',
|
||||
image_field: "Champ d'Image",
|
||||
file_field: 'Champ de Fichier',
|
||||
select_field: 'Champ de Choix',
|
||||
checkbox_field: 'Champ de Coche',
|
||||
multiple_field: 'Champ de Choix Multiple',
|
||||
radio_field: 'Champ de Groupe Radio',
|
||||
cells_field: 'Champ de Cellules',
|
||||
stamp_field: 'Champ de Tampon',
|
||||
payment_field: 'Champ de Paiement',
|
||||
phone_field: 'Champ de Téléphone',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Dessinez un champ texte sur la page avec une souris',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Glissez et déposez tout autre type de champ sur la page',
|
||||
text_field: 'Champ de texte',
|
||||
signature_field: 'Champ de signature',
|
||||
initials_field: "Champ d'initiales",
|
||||
date_field: 'Champ de date',
|
||||
number_field: 'Champ de numéro',
|
||||
image_field: "Champ d'image",
|
||||
file_field: 'Champ de fichier',
|
||||
select_field: 'Champ de choix',
|
||||
checkbox_field: 'Champ de coche',
|
||||
multiple_field: 'Champ de choix multiple',
|
||||
radio_field: 'Champ de groupe radio',
|
||||
cells_field: 'Champ de cellules',
|
||||
stamp_field: 'Champ de tampon',
|
||||
payment_field: 'Champ de paiement',
|
||||
phone_field: 'Champ de téléphone',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Dessinez un champ de texte sur la page avec la souris',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Glissez-déposez tout autre type de champ sur la page',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Cliquez sur le type de champ ci-dessus pour commencer à le dessiner',
|
||||
please_draw_fields_to_prepare_the_document: 'Veuillez dessiner les champs pour préparer le document.',
|
||||
please_draw_fields_to_prepare_the_document: 'Veuillez dessiner des champs pour préparer le document.',
|
||||
only_pdf_and_images_are_supported: 'Seuls les PDF et les images sont pris en charge.',
|
||||
unlock_sms_verified_phone_number_field_with_paid_plan_use_text_field_for_phone_numbers_without_verification: 'Débloquez le champ de numéro de téléphone vérifié par SMS avec un plan payant. Utilisez un champ texte pour les numéros de téléphone sans vérification.',
|
||||
available_only_in_pro: 'Disponible uniquement en Pro',
|
||||
failed_to_download_files: 'Échec du téléchargement des fichiers',
|
||||
please_add_fields_for_the_submitter_name_or_remove_the_submitter_name_if_not_needed: 'Veuillez ajouter des champs pour {submitter_name} ou retirer {submitter_name} si ce n\'est pas nécessaire.',
|
||||
unlock_sms_verified_phone_number_field_with_paid_plan_use_text_field_for_phone_numbers_without_verification: 'Débloquez le champ de numéro de téléphone vérifié par SMS avec un forfait payant. Utilisez un champ texte pour les numéros sans vérification.',
|
||||
available_only_in_pro: 'Disponible uniquement dans la version Pro',
|
||||
failed_to_download_files: 'Impossible de télécharger les fichiers',
|
||||
please_add_fields_for_the_submitter_name_or_remove_the_submitter_name_if_not_needed: "Veuillez ajouter des champs pour {submitter_name}. Ou supprimez {submitter_name} si ce n'est pas nécessaire.",
|
||||
draw_field: 'Dessiner le champ {field}',
|
||||
replace: 'Remplacer',
|
||||
uploading_: 'Téléchargement en cours...',
|
||||
add_document: 'Télécharger',
|
||||
any: 'Tout',
|
||||
drawn: 'Dessiné',
|
||||
drawn_or_typed: 'Dessiné ou Tapé',
|
||||
drawn_or_upload: 'Dessiné ou Téléchargé',
|
||||
upload: 'Téléverser',
|
||||
typed: 'Tapé',
|
||||
uploading_: 'Téléversement...',
|
||||
add_document: 'Téléverser',
|
||||
none: 'Aucun',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -889,90 +906,99 @@ const fr = {
|
||||
numbers_only: 'Chiffres uniquement',
|
||||
letters_only: 'Lettres uniquement',
|
||||
regexp_validation: 'Validation par expression régulière',
|
||||
enter_pdf_password: 'Entrez le mot de passe PDF',
|
||||
enter_pdf_password: 'Saisir le mot de passe du PDF',
|
||||
wrong_password: 'Mot de passe incorrect',
|
||||
currency: 'Devise',
|
||||
save_and_preview: 'Enregistrer et prévisualiser',
|
||||
preferences: 'Préférences',
|
||||
available_in_pro: 'Disponible en version Pro',
|
||||
available_in_pro: 'Disponible dans la version Pro',
|
||||
some_fields_are_missing_in_the_formula: 'Certains champs manquent dans la formule.',
|
||||
learn_more: 'En savoir plus',
|
||||
and: 'et',
|
||||
or: 'ou',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Lancez une visite rapide pour apprendre à créer et envoyer votre premier document.',
|
||||
start_tour: 'Démarrer'
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Commencez une visite rapide pour apprendre à créer et à envoyer votre premier document',
|
||||
start_tour: 'Démarrer',
|
||||
or_add_from: 'Ou ajouter depuis',
|
||||
sync: 'Synchroniser',
|
||||
syncing: 'Synchronisation...'
|
||||
}
|
||||
|
||||
const de = {
|
||||
view: 'Anzeigen',
|
||||
payment_link: 'Zahlungslink',
|
||||
strikeout: 'Streichung',
|
||||
draw_strikethrough_the_document: 'Ziehe eine Streichung auf das Dokument',
|
||||
strikeout: 'Durchstreichen',
|
||||
draw_strikethrough_the_document: 'Durchstreichung im Dokument zeichnen',
|
||||
quantity: 'Menge',
|
||||
prefillable: 'Vorausfüllbar',
|
||||
signature_id: 'Signatur-ID',
|
||||
error_message: 'Fehlermeldung',
|
||||
length: 'Länge',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
date_now: 'Akt. Datum',
|
||||
min: 'Min.',
|
||||
max: 'Max.',
|
||||
font: 'Schriftart',
|
||||
party: 'Partei',
|
||||
method: 'Verfahren',
|
||||
date_signed: 'Unterzeichnungsdatum',
|
||||
method: 'Methode',
|
||||
reorder_fields: 'Felder neu anordnen',
|
||||
verify_id: 'ID überprüfen',
|
||||
obtain_qualified_electronic_signature_with_the_trusted_provider_click_to_learn_more: 'Erhalten Sie eine qualifizierte elektronische Signatur (QeS) beim vertrauenswürdigen Anbieter. Klicken Sie hier, um mehr zu erfahren.',
|
||||
wiederkehrend: 'Wiederkehrend',
|
||||
einmalig: 'Einmalig',
|
||||
obtain_qualified_electronic_signature_with_the_trusted_provider_click_to_learn_more: 'Qualifizierte elektronische Signatur (QES) beim vertrauenswürdigen Anbieter einholen. Klicken Sie, um mehr zu erfahren.',
|
||||
editable: 'Bearbeitbar',
|
||||
recurrent: 'Wiederkehrend',
|
||||
one_off: 'Einmalig',
|
||||
search_field: 'Suchfeld',
|
||||
field_not_found: 'Feld nicht gefunden',
|
||||
clear: 'Löschen',
|
||||
type_value: 'Wert eingeben',
|
||||
add_all_required_fields_to_continue: 'Fügen Sie alle erforderlichen Felder hinzu, um fortzufahren',
|
||||
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'Das hochgeladene PDF enthält Formularfelder. Behalten oder entfernen?',
|
||||
keep: 'Behalten',
|
||||
clear: 'Leeren',
|
||||
align: 'Ausrichten',
|
||||
add_all_required_fields_to_continue: 'Fügen Sie alle erforderlichen Felder hinzu, um fortzufahren',
|
||||
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'Das hochgeladene PDF enthält Formularfelder. Beibehalten oder entfernen?',
|
||||
keep: 'Beibehalten',
|
||||
left: 'Links',
|
||||
heading: 'Überschrift',
|
||||
validation: 'Validierung',
|
||||
add_blank_page: 'Leere Seite hinzufügen',
|
||||
right: 'Rechts',
|
||||
add_condition: 'Bedingung hinzufügen',
|
||||
center: 'Zentriert',
|
||||
with_logo: 'Mit Logo',
|
||||
description: 'Beschreibung',
|
||||
display_title: 'Anzeigetitel',
|
||||
unchecked: 'Nicht überprüft',
|
||||
with_logo: 'Mit Logo',
|
||||
unchecked: 'Nicht markiert',
|
||||
price: 'Preis',
|
||||
type_value: 'Wert eingeben',
|
||||
equal: 'Gleich',
|
||||
not_equal: 'Ungleich',
|
||||
contains: 'Enthält',
|
||||
does_not_contain: 'Enthält nicht',
|
||||
not_empty: 'Nicht leer',
|
||||
empty: 'Leer',
|
||||
signing_date: 'Signaturdatum',
|
||||
select_field_: 'Feld auswählen...',
|
||||
select_value_: 'Wert auswählen...',
|
||||
remove_condition: 'Bedingung entfernen',
|
||||
condition: 'Bedingung',
|
||||
formula: 'Formel',
|
||||
add_condition: 'Bedingung hinzufügen',
|
||||
are_you_sure_: 'Sind Sie sicher?',
|
||||
sign_yourself: 'Selbst unterschreiben',
|
||||
set_signing_date: 'Unterzeichnungsdatum festlegen',
|
||||
signing_date: 'Unterzeichnungsdatum',
|
||||
send: 'Senden',
|
||||
remove: 'Entfernen',
|
||||
edit: 'Bearbeiten',
|
||||
settings: 'Einstellungen',
|
||||
up: 'Nach oben',
|
||||
down: 'Nach unten',
|
||||
set_signing_date: 'Unterschriftdatum festlegen',
|
||||
are_you_sure_: 'Bist du sicher?',
|
||||
sign_yourself: 'Unterschreiben Sie selbst',
|
||||
checked: 'Ausgewählt',
|
||||
send: 'Senden',
|
||||
remove: 'Entfernen',
|
||||
checked: 'Markiert',
|
||||
save: 'Speichern',
|
||||
cancel: 'Abbrechen',
|
||||
draw_field_on_the_document: 'Ein Feld auf dem Dokument zeichnen',
|
||||
click_to_upload: 'Klicken Sie zum Hochladen',
|
||||
or_drag_and_drop_files: 'oder Dateien hierher ziehen',
|
||||
uploading: 'Hochladen',
|
||||
processing_: 'Verarbeitung...',
|
||||
any: 'Beliebig',
|
||||
drawn: 'Gezeichnet',
|
||||
drawn_or_typed: 'Gezeichnet oder getippt',
|
||||
drawn_or_upload: 'Gezeichnet oder hochgeladen',
|
||||
upload: 'Hochladen',
|
||||
formula: 'Formel',
|
||||
typed: 'Getippt',
|
||||
draw_field_on_the_document: 'Ein Feld im Dokument zeichnen',
|
||||
click_to_upload: 'Zum Hochladen klicken',
|
||||
or_drag_and_drop_files: 'oder Dateien per Drag & Drop ablegen',
|
||||
uploading: 'Hochladen...',
|
||||
processing_: 'Verarbeiten...',
|
||||
add_pdf_documents_or_images: 'PDF-Dokumente oder Bilder hinzufügen',
|
||||
add_documents_or_images: 'Dokumente oder Bilder hinzufügen',
|
||||
add_a_new_document: 'Neues Dokument hinzufügen',
|
||||
@@ -983,11 +1009,12 @@ const de = {
|
||||
format: 'Format',
|
||||
read_only: 'Nur lesen',
|
||||
page: 'Seite',
|
||||
draw_new_area: 'Neuen Bereich zeichnen',
|
||||
draw_new_area: 'Bereich zeichnen',
|
||||
copy_to_all_pages: 'Auf alle Seiten kopieren',
|
||||
add_option: 'Option hinzufügen',
|
||||
option: 'Option',
|
||||
options: 'Options',
|
||||
options: 'Optionen',
|
||||
condition: 'Bedingung',
|
||||
first_party: 'Erste Partei',
|
||||
second_party: 'Zweite Partei',
|
||||
third_party: 'Dritte Partei',
|
||||
@@ -1006,21 +1033,21 @@ const de = {
|
||||
sixteenth_party: 'Sechzehnte Partei',
|
||||
seventeenth_party: 'Siebzehnte Partei',
|
||||
eighteenth_party: 'Achtzehnte Partei',
|
||||
nineteenth_party: 'Neunzehnte Party',
|
||||
twentieth_party: 'Zwanzigste Party',
|
||||
nineteenth_party: 'Neunzehnte Partei',
|
||||
twentieth_party: 'Zwanzigste Partei',
|
||||
draw: 'Zeichnen',
|
||||
add: 'Hinzufügen',
|
||||
or_add_field_without_drawing: 'Oder Feld ohne Zeichnung hinzufügen',
|
||||
or_add_field_without_drawing: 'Oder Feld ohne Zeichnen hinzufügen',
|
||||
text: 'Text',
|
||||
number: 'Zahl',
|
||||
signature: 'Unterschrift',
|
||||
initials: 'Initialen',
|
||||
date: 'Datum',
|
||||
number: 'Nummer',
|
||||
image: 'Bild',
|
||||
file: 'Datei',
|
||||
select: 'Auswählen',
|
||||
select: 'Auswahl',
|
||||
checkbox: 'Checkbox',
|
||||
multiple: 'Mehrere',
|
||||
multiple: 'Mehrfach',
|
||||
radio: 'Radio',
|
||||
cells: 'Zellen',
|
||||
stamp: 'Stempel',
|
||||
@@ -1034,32 +1061,26 @@ const de = {
|
||||
image_field: 'Bildfeld',
|
||||
file_field: 'Dateifeld',
|
||||
select_field: 'Auswahlfeld',
|
||||
checkbox_field: 'Checkbox-Feld',
|
||||
multiple_field: 'Mehrfach-Auswahlfeld',
|
||||
radio_field: 'Radio-Gruppenfeld',
|
||||
checkbox_field: 'Checkboxfeld',
|
||||
multiple_field: 'Mehrfachauswahlfeld',
|
||||
radio_field: 'Radiogruppe',
|
||||
cells_field: 'Zellenfeld',
|
||||
stamp_field: 'Stempelfeld',
|
||||
payment_field: 'Zahlungsfeld',
|
||||
phone_field: 'Telefonfeld',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Textfeld auf der Seite mit der Maus zeichnen',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Ziehe und lasse einen anderen Feldtyp auf die Seite fallen',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Klicke auf den Feldtyp oben, um mit dem Zeichnen zu beginnen',
|
||||
please_draw_fields_to_prepare_the_document: 'Bitte zeichne Felder, um das Dokument vorzubereiten.',
|
||||
only_pdf_and_images_are_supported: 'Nur PDFs und Bilder werden unterstützt.',
|
||||
unlock_sms_verified_phone_number_field_with_paid_plan_use_text_field_for_phone_numbers_without_verification: 'Schalte das SMS-verifizierte Telefonnummernfeld mit einem kostenpflichtigen Plan frei. Verwende das Textfeld für Telefonnummern ohne Verifizierung.',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Ein Textfeld mit der Maus auf der Seite zeichnen',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Jeden anderen Feldtyp auf die Seite ziehen und ablegen',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Klicken Sie oben auf den Feldtyp, um mit dem Zeichnen zu beginnen',
|
||||
please_draw_fields_to_prepare_the_document: 'Bitte zeichnen Sie Felder, um das Dokument vorzubereiten.',
|
||||
only_pdf_and_images_are_supported: 'Nur PDF und Bilder werden unterstützt.',
|
||||
unlock_sms_verified_phone_number_field_with_paid_plan_use_text_field_for_phone_numbers_without_verification: 'SMS-verifiziertes Telefonnummernfeld mit kostenpflichtigem Plan freischalten. Verwenden Sie für Telefonnummern ohne Verifizierung das Textfeld.',
|
||||
available_only_in_pro: 'Nur in Pro verfügbar',
|
||||
failed_to_download_files: 'Fehler beim Herunterladen der Dateien',
|
||||
please_add_fields_for_the_submitter_name_or_remove_the_submitter_name_if_not_needed: 'Bitte füge Felder für {submitter_name} hinzu oder entferne {submitter_name}, falls nicht erforderlich.',
|
||||
draw_field: 'Feld {field} zeichnen',
|
||||
failed_to_download_files: 'Dateien konnten nicht heruntergeladen werden',
|
||||
please_add_fields_for_the_submitter_name_or_remove_the_submitter_name_if_not_needed: 'Bitte fügen Sie Felder für {submitter_name} hinzu oder entfernen Sie {submitter_name}, falls nicht benötigt.',
|
||||
draw_field: '{field}-Feld zeichnen',
|
||||
replace: 'Ersetzen',
|
||||
uploading_: 'Hochladen...',
|
||||
add_document: 'Hochladen',
|
||||
any: 'Jede',
|
||||
drawn: 'Gezeichnet',
|
||||
drawn_or_typed: 'Gezeichnet oder getippt',
|
||||
drawn_or_upload: 'Gezeichnet oder hochgeladen',
|
||||
upload: 'Upload',
|
||||
typed: 'Getippt',
|
||||
none: 'Keine',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -1069,19 +1090,207 @@ const de = {
|
||||
custom: 'Benutzerdefiniert',
|
||||
numbers_only: 'Nur Zahlen',
|
||||
letters_only: 'Nur Buchstaben',
|
||||
regexp_validation: 'Regulärer Ausdruck Überprüfung',
|
||||
enter_pdf_password: 'Geben Sie das PDF-Passwort ein',
|
||||
regexp_validation: 'RegExp-Validierung',
|
||||
enter_pdf_password: 'PDF-Passwort eingeben',
|
||||
wrong_password: 'Falsches Passwort',
|
||||
currency: 'Währung',
|
||||
save_and_preview: 'Speichern und Vorschau',
|
||||
preferences: 'Einstellungen',
|
||||
preferences: 'Voreinstellungen',
|
||||
available_in_pro: 'In Pro verfügbar',
|
||||
some_fields_are_missing_in_the_formula: 'Einige Felder fehlen in der Formel.',
|
||||
learn_more: 'Erfahren Sie mehr',
|
||||
learn_more: 'Mehr erfahren',
|
||||
and: 'und',
|
||||
or: 'oder',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Starte eine kurze Tour, um zu lernen, wie du dein erstes Dokument erstellst und versendest.',
|
||||
start_tour: 'Starten'
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Starten Sie eine Kurztour, um zu lernen, wie Sie Ihr erstes Dokument erstellen und versenden.',
|
||||
start_tour: 'Tour starten',
|
||||
or_add_from: 'Oder hinzufügen aus',
|
||||
sync: 'Synchronisieren',
|
||||
syncing: 'Synchronisiere...'
|
||||
}
|
||||
|
||||
export { en, es, it, pt, fr, de }
|
||||
const nl = {
|
||||
view: 'Bekijken',
|
||||
payment_link: 'Betaallink',
|
||||
strikeout: 'Doorhalen',
|
||||
draw_strikethrough_the_document: 'Teken doorhaling in het document',
|
||||
quantity: 'Aantal',
|
||||
prefillable: 'Voorinvulbaar',
|
||||
signature_id: 'Handtekening-ID',
|
||||
error_message: 'Foutmelding',
|
||||
length: 'Lengte',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
font: 'Lettertype',
|
||||
party: 'Partij',
|
||||
date_signed: 'Datum ondertekend',
|
||||
method: 'Methode',
|
||||
reorder_fields: 'Velden herschikken',
|
||||
verify_id: 'ID verifiëren',
|
||||
obtain_qualified_electronic_signature_with_the_trusted_provider_click_to_learn_more: 'Verkrijg een gekwalificeerde elektronische handtekening (QeS) via de vertrouwde provider. Klik voor meer informatie.',
|
||||
editable: 'Bewerkbaar',
|
||||
recurrent: 'Terugkerend',
|
||||
one_off: 'Eenmalig',
|
||||
search_field: 'Zoekveld',
|
||||
field_not_found: 'Veld niet gevonden',
|
||||
clear: 'Wissen',
|
||||
align: 'Uitlijnen',
|
||||
add_all_required_fields_to_continue: 'Voeg alle vereiste velden toe om door te gaan',
|
||||
uploaded_pdf_contains_form_fields_keep_or_remove_them: 'Geüploade PDF bevat formuliervelden. Behouden of verwijderen?',
|
||||
keep: 'Behouden',
|
||||
left: 'Links',
|
||||
heading: 'Koptekst',
|
||||
validation: 'Validatie',
|
||||
add_blank_page: 'Lege pagina toevoegen',
|
||||
right: 'Rechts',
|
||||
center: 'Centreren',
|
||||
description: 'Beschrijving',
|
||||
display_title: 'Titel weergeven',
|
||||
with_logo: 'Met logo',
|
||||
unchecked: 'Niet aangevinkt',
|
||||
price: 'Prijs',
|
||||
type_value: 'Typ waarde',
|
||||
equal: 'Gelijk aan',
|
||||
not_equal: 'Niet gelijk aan',
|
||||
contains: 'Bevat',
|
||||
does_not_contain: 'Bevat niet',
|
||||
not_empty: 'Niet leeg',
|
||||
empty: 'Leeg',
|
||||
select_field_: 'Veld selecteren...',
|
||||
select_value_: 'Waarde selecteren...',
|
||||
remove_condition: 'Voorwaarde verwijderen',
|
||||
add_condition: 'Voorwaarde toevoegen',
|
||||
are_you_sure_: 'Weet u het zeker?',
|
||||
sign_yourself: 'Zelf ondertekenen',
|
||||
set_signing_date: 'Ondertekeningsdatum instellen',
|
||||
signing_date: 'Ondertekeningsdatum',
|
||||
send: 'Verzenden',
|
||||
remove: 'Verwijderen',
|
||||
edit: 'Bewerken',
|
||||
settings: 'Instellingen',
|
||||
up: 'Omhoog',
|
||||
down: 'Omlaag',
|
||||
checked: 'Aangevinkt',
|
||||
save: 'Opslaan',
|
||||
cancel: 'Annuleren',
|
||||
any: 'Elke',
|
||||
drawn: 'Getekend',
|
||||
drawn_or_typed: 'Getekend of getypt',
|
||||
drawn_or_upload: 'Getekend of uploaden',
|
||||
upload: 'Uploaden',
|
||||
formula: 'Formule',
|
||||
typed: 'Getypt',
|
||||
draw_field_on_the_document: 'Teken een veld op het document',
|
||||
click_to_upload: 'Klik om te uploaden',
|
||||
or_drag_and_drop_files: 'of sleep bestanden hierheen',
|
||||
uploading: 'Uploaden',
|
||||
processing_: 'Bezig met verwerken...',
|
||||
add_pdf_documents_or_images: 'PDF-documenten of afbeeldingen toevoegen',
|
||||
add_documents_or_images: 'Documenten of afbeeldingen toevoegen',
|
||||
add_a_new_document: 'Nieuw document toevoegen',
|
||||
replace_existing_document: 'Bestaand document vervangen',
|
||||
clone_and_replace_documents: 'Documenten klonen en vervangen',
|
||||
required: 'Vereist',
|
||||
default_value: 'Standaardwaarde',
|
||||
format: 'Formaat',
|
||||
read_only: 'Alleen-lezen',
|
||||
page: 'Pagina',
|
||||
draw_new_area: 'Nieuw gebied tekenen',
|
||||
copy_to_all_pages: 'Kopieer naar alle pag.',
|
||||
add_option: 'Optie toevoegen',
|
||||
option: 'Optie',
|
||||
options: 'Opties',
|
||||
condition: 'Voorwaarde',
|
||||
first_party: 'Eerste partij',
|
||||
second_party: 'Tweede partij',
|
||||
third_party: 'Derde partij',
|
||||
fourth_party: 'Vierde partij',
|
||||
fifth_party: 'Vijfde partij',
|
||||
sixth_party: 'Zesde partij',
|
||||
seventh_party: 'Zevende partij',
|
||||
eighth_party: 'Achtste partij',
|
||||
ninth_party: 'Negende partij',
|
||||
tenth_party: 'Tiende partij',
|
||||
eleventh_party: 'Elfde partij',
|
||||
twelfth_party: 'Twaalfde partij',
|
||||
thirteenth_party: 'Dertiende partij',
|
||||
fourteenth_party: 'Veertiende partij',
|
||||
fifteenth_party: 'Vijftiende partij',
|
||||
sixteenth_party: 'Zestiende partij',
|
||||
seventeenth_party: 'Zeventiende partij',
|
||||
eighteenth_party: 'Achttiende partij',
|
||||
nineteenth_party: 'Negentiende partij',
|
||||
twentieth_party: 'Twintigste partij',
|
||||
draw: 'Tekenen',
|
||||
add: 'Toevoegen',
|
||||
or_add_field_without_drawing: 'Of voeg een veld toe zonder te tekenen',
|
||||
text: 'Tekst',
|
||||
number: 'Getal',
|
||||
signature: 'Signatuur',
|
||||
initials: 'Initialen',
|
||||
date: 'Datum',
|
||||
image: 'Afbeelding',
|
||||
file: 'Bestand',
|
||||
select: 'Selecteren',
|
||||
checkbox: 'Checkbox',
|
||||
multiple: 'Meerdere',
|
||||
radio: 'Radio',
|
||||
cells: 'Cellen',
|
||||
stamp: 'Stempel',
|
||||
payment: 'Betaling',
|
||||
phone: 'Telefoon',
|
||||
text_field: 'Tekstveld',
|
||||
signature_field: 'Signatuurveld',
|
||||
initials_field: 'Initialenveld',
|
||||
date_field: 'Datumveld',
|
||||
number_field: 'Getalveld',
|
||||
image_field: 'Afbeeldingsveld',
|
||||
file_field: 'Bestandsveld',
|
||||
select_field: 'Selectieveld',
|
||||
checkbox_field: 'Aankruisvakje',
|
||||
multiple_field: 'Meerkeuzeveld',
|
||||
radio_field: 'Radiogroepveld',
|
||||
cells_field: 'Cellenveld',
|
||||
stamp_field: 'Stempelveld',
|
||||
payment_field: 'Betalingsveld',
|
||||
phone_field: 'Telefoonveld',
|
||||
draw_a_text_field_on_the_page_with_a_mouse: 'Teken met de muis een tekstveld op de pagina',
|
||||
drag_and_drop_any_other_field_type_on_the_page: 'Sleep elk ander veldtype naar de pagina',
|
||||
click_on_the_field_type_above_to_start_drawing_it: 'Klik op het bovenstaande veldtype om te beginnen met tekenen',
|
||||
please_draw_fields_to_prepare_the_document: 'Teken velden om het document voor te bereiden.',
|
||||
only_pdf_and_images_are_supported: 'Alleen PDF en afbeeldingen worden ondersteund.',
|
||||
unlock_sms_verified_phone_number_field_with_paid_plan_use_text_field_for_phone_numbers_without_verification: 'Ontgrendel het SMS-geverifieerde veld voor telefoonnummer met een betaald abonnement. Gebruik het tekstveld voor telefoonnummers zonder verificatie.',
|
||||
available_only_in_pro: 'Alleen beschikbaar in Pro',
|
||||
failed_to_download_files: 'Bestanden downloaden mislukt',
|
||||
please_add_fields_for_the_submitter_name_or_remove_the_submitter_name_if_not_needed: 'Voeg velden toe voor de {submitter_name}. Of verwijder de {submitter_name} als deze niet nodig is.',
|
||||
draw_field: 'Teken het veld {field}',
|
||||
replace: 'Vervangen',
|
||||
uploading_: 'Bezig met uploaden...',
|
||||
add_document: 'Doc. toevoegen',
|
||||
none: 'Geen',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
email: 'E-mail',
|
||||
url: 'URL',
|
||||
zip: 'Postcode',
|
||||
custom: 'Aangepast',
|
||||
numbers_only: 'Alleen cijfers',
|
||||
letters_only: 'Alleen letters',
|
||||
regexp_validation: 'Regex validatie',
|
||||
enter_pdf_password: 'Voer PDF-wachtwoord in',
|
||||
wrong_password: 'Onjuist wachtwoord',
|
||||
currency: 'Valuta',
|
||||
save_and_preview: 'Opslaan & bekijken',
|
||||
preferences: 'Voorkeuren',
|
||||
available_in_pro: 'Beschikbaar in Pro',
|
||||
some_fields_are_missing_in_the_formula: 'Sommige velden ontbreken in de formule.',
|
||||
learn_more: 'Meer informatie',
|
||||
and: 'en',
|
||||
or: 'of',
|
||||
start_a_quick_tour_to_learn_how_to_create_an_send_your_first_document: 'Start een korte rondleiding om te leren hoe u uw eerste document maakt en verzendt',
|
||||
start_tour: 'Rondleiding starten',
|
||||
or_add_from: 'Of toevoegen van',
|
||||
sync: 'Synchroniseren',
|
||||
syncing: 'Synchroniseren...'
|
||||
}
|
||||
|
||||
export { en, es, it, pt, fr, de, nl }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="absolute text-center w-full bottom-0 pr-3 mb-4">
|
||||
<div class="absolute w-full bottom-0 pr-3 mb-4">
|
||||
<span class="w-full bg-base-200 px-4 py-2 rounded-md inline-flex space-x-2 mx-auto items-center justify-between mb-2 z-20 draw-field-container-mobile">
|
||||
<div class="flex items-center space-x-2">
|
||||
<component
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
loading="lazy"
|
||||
>
|
||||
<div
|
||||
class="group flex justify-end cursor-pointer top-0 bottom-0 left-0 right-0 absolute p-1 hover:bg-black/10 transition-colors"
|
||||
class="group flex justify-end cursor-pointer top-0 bottom-0 left-0 right-0 absolute p-1 hover:bg-black/10 transition-colors rounded"
|
||||
@click="$emit('scroll-to', item)"
|
||||
>
|
||||
<div
|
||||
@@ -23,7 +23,7 @@
|
||||
>
|
||||
<div>
|
||||
<button
|
||||
class="btn border-base-200 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors p-0 document-control-button"
|
||||
class="btn border-gray-300 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors p-0 document-control-button"
|
||||
@click.stop="isShowConditionsModal = true"
|
||||
>
|
||||
<IconRouteAltLeft
|
||||
@@ -48,7 +48,7 @@
|
||||
>
|
||||
<div>
|
||||
<button
|
||||
class="btn border-base-200 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
class="btn border-gray-300 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
style="width: 24px; height: 24px"
|
||||
@click.stop="$emit('remove', item)"
|
||||
>
|
||||
@@ -63,7 +63,7 @@
|
||||
class="tooltip tooltip-left before:text-xs"
|
||||
>
|
||||
<button
|
||||
class="btn border-base-200 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors p-0 document-control-button"
|
||||
class="btn border-gray-300 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors p-0 document-control-button"
|
||||
@click.stop="$emit('reorder', item)"
|
||||
>
|
||||
<IconSortDescending2
|
||||
@@ -75,14 +75,14 @@
|
||||
</span>
|
||||
<template v-if="withArrows">
|
||||
<button
|
||||
class="btn border-base-200 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
class="btn border-gray-300 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
style="width: 24px; height: 24px"
|
||||
@click.stop="$emit('up', item)"
|
||||
>
|
||||
↑
|
||||
</button>
|
||||
<button
|
||||
class="btn border-base-200 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
class="btn border-gray-300 bg-white text-base-content btn-xs rounded hover:text-base-100 hover:bg-base-content hover:border-base-content w-full transition-colors document-control-button"
|
||||
style="width: 24px; height: 24px"
|
||||
@click.stop="$emit('down', item)"
|
||||
>
|
||||
@@ -94,12 +94,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex pb-2 pt-1.5 document-preview-name">
|
||||
<div class="flex items-center gap-1 pb-2 pt-1.5 document-preview-name">
|
||||
<GoogleDriveDocumentSettings
|
||||
v-if="item.google_drive_file_id"
|
||||
:template-id="template.id"
|
||||
:google-drive-file-id="item.google_drive_file_id"
|
||||
@success="$emit('replace', { replaceSchemaItem: item, ...$event })"
|
||||
/>
|
||||
<Contenteditable
|
||||
:model-value="item.name"
|
||||
:icon-width="16"
|
||||
:icon-inline="true"
|
||||
:float-icon="!item.google_drive_file_id"
|
||||
:hide-icon="!item.google_drive_file_id"
|
||||
:editable="editable"
|
||||
style="max-width: 95%"
|
||||
class="mx-auto"
|
||||
@update:model-value="onUpdateName"
|
||||
/>
|
||||
@@ -123,6 +131,7 @@ import Upload from './upload'
|
||||
import { IconRouteAltLeft, IconSortDescending2 } from '@tabler/icons-vue'
|
||||
import ConditionsModal from './conditions_modal'
|
||||
import ReplaceButton from './replace'
|
||||
import GoogleDriveDocumentSettings from './google_drive_document_settings'
|
||||
import Field from './field'
|
||||
import FieldType from './field_type'
|
||||
|
||||
@@ -133,6 +142,7 @@ export default {
|
||||
IconRouteAltLeft,
|
||||
ConditionsModal,
|
||||
ReplaceButton,
|
||||
GoogleDriveDocumentSettings,
|
||||
IconSortDescending2
|
||||
},
|
||||
inject: ['t'],
|
||||
|
||||
@@ -3,29 +3,155 @@
|
||||
<label
|
||||
id="add_document_button"
|
||||
:for="inputId"
|
||||
class="btn btn-outline w-full add-document-button"
|
||||
class="btn btn-outline w-full add-document-button px-0"
|
||||
:class="{ 'btn-disabled': isLoading }"
|
||||
>
|
||||
<IconInnerShadowTop
|
||||
v-if="isLoading"
|
||||
width="20"
|
||||
class="animate-spin"
|
||||
/>
|
||||
<IconUpload
|
||||
v-else
|
||||
width="20"
|
||||
/>
|
||||
<span v-if="isLoading">
|
||||
{{ t('uploading_') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ t('add_document') }}
|
||||
</span>
|
||||
<div
|
||||
class="flex items-center justify-between w-full h-full"
|
||||
>
|
||||
<span
|
||||
class="flex items-center space-x-2 w-full justify-center"
|
||||
:class="{ 'pl-3': withGoogleDrive }"
|
||||
>
|
||||
<IconInnerShadowTop
|
||||
v-if="isLoading"
|
||||
width="20"
|
||||
class="animate-spin"
|
||||
/>
|
||||
<IconUpload
|
||||
v-else
|
||||
width="20"
|
||||
/>
|
||||
<span v-if="isLoading">
|
||||
{{ t('uploading_') }}
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
class="mr-1 whitespace-nowrap truncate"
|
||||
>
|
||||
{{ t('add_document') }}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="withGoogleDrive"
|
||||
class="dropdown dropdown-end dropdown-top inline h-full"
|
||||
style="width: 33px"
|
||||
>
|
||||
<label
|
||||
tabindex="0"
|
||||
class="flex items-center h-full cursor-pointer"
|
||||
>
|
||||
<IconChevronDown class="w-5 h-5 flex-shrink-0" />
|
||||
</label>
|
||||
<ul
|
||||
tabindex="0"
|
||||
:style="{ backgroundColor }"
|
||||
class="dropdown-content p-2 mt-2 shadow menu text-base mb-1 rounded-box text-right !text-base-content"
|
||||
>
|
||||
<li>
|
||||
<button
|
||||
type="button"
|
||||
@click="openGoogleDriveModal"
|
||||
>
|
||||
<IconBrandGoogleDrive class="w-5 h-5 flex-shrink-0" />
|
||||
<span class="whitespace-nowrap text-sm normal-case font-medium">Google Drive</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
<Teleport
|
||||
v-if="showGoogleDriveModal"
|
||||
:to="modalContainerEl"
|
||||
>
|
||||
<div
|
||||
class="modal modal-open items-start !animate-none overflow-y-auto"
|
||||
>
|
||||
<div
|
||||
class="absolute top-0 bottom-0 right-0 left-0"
|
||||
@click.prevent="showGoogleDriveModal = false"
|
||||
/>
|
||||
<div class="modal-box pt-4 pb-6 px-6 mt-20 max-h-none w-full max-w-xl">
|
||||
<div class="flex justify-between items-center border-b pb-2 mb-2 font-medium">
|
||||
<span class="modal-title">
|
||||
Google Drive
|
||||
</span>
|
||||
<a
|
||||
href="#"
|
||||
class="text-xl modal-close-button"
|
||||
@click.prevent="showGoogleDriveModal = false"
|
||||
>×</a>
|
||||
</div>
|
||||
<div>
|
||||
<form
|
||||
v-if="showGoogleDriveOauthButton"
|
||||
method="post"
|
||||
:action="googleDriveOauthPath"
|
||||
@submit="isConnectGoogleDriveClicked = true"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
name="authenticity_token"
|
||||
:value="authenticityToken"
|
||||
autocomplete="off"
|
||||
>
|
||||
<button
|
||||
id="gdrive_oauth_button"
|
||||
class="btn bg-white btn-outline w-full text-base font-medium mt-4"
|
||||
data-turbo="false"
|
||||
type="submit"
|
||||
:disabled="isConnectGoogleDriveClicked"
|
||||
>
|
||||
<span v-if="isConnectGoogleDriveClicked">
|
||||
<span class="flex items-center justify-center space-x-2">
|
||||
<IconInnerShadowTop class="animate-spin" />
|
||||
<span class="">Submitting...</span>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
>
|
||||
<span class="flex items-center justify-center space-x-2">
|
||||
<IconBrandGoogleDrive />
|
||||
<span>Connect Google Drive</span>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
<div
|
||||
v-else
|
||||
class="relative"
|
||||
>
|
||||
<iframe
|
||||
class="border border-base-300 rounded-lg"
|
||||
style="width: 100%; height: 440px; background: white;"
|
||||
src="/template_google_drive"
|
||||
/>
|
||||
<div v-if="isLoadingGoogleDrive">
|
||||
<div
|
||||
class="bg-white absolute top-0 bottom-0 left-0 right-0 opacity-80 rounded-lg"
|
||||
style="margin: 1px"
|
||||
/>
|
||||
<div class="absolute top-0 bottom-0 left-0 right-0 flex items-center justify-center">
|
||||
<IconInnerShadowTop class="animate-spin" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
<form
|
||||
ref="form"
|
||||
class="hidden"
|
||||
>
|
||||
<input
|
||||
v-for="file in googleDriveFiles"
|
||||
:key="file.id"
|
||||
name="google_drive_file_ids[]"
|
||||
:value="file.id"
|
||||
>
|
||||
<input
|
||||
:id="inputId"
|
||||
ref="input"
|
||||
@@ -40,20 +166,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { IconUpload, IconInnerShadowTop } from '@tabler/icons-vue'
|
||||
import { IconUpload, IconInnerShadowTop, IconChevronDown, IconBrandGoogleDrive } from '@tabler/icons-vue'
|
||||
|
||||
export default {
|
||||
name: 'DocumentsUpload',
|
||||
components: {
|
||||
IconUpload,
|
||||
IconInnerShadowTop
|
||||
IconInnerShadowTop,
|
||||
IconChevronDown,
|
||||
IconBrandGoogleDrive
|
||||
},
|
||||
inject: ['baseFetch', 't'],
|
||||
inject: ['baseFetch', 't', 'backgroundColor'],
|
||||
props: {
|
||||
templateId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
authenticityToken: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
withGoogleDrive: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
acceptFileTypes: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -63,22 +201,85 @@ export default {
|
||||
emits: ['success', 'error'],
|
||||
data () {
|
||||
return {
|
||||
isLoading: false
|
||||
isLoading: false,
|
||||
isConnectGoogleDriveClicked: false,
|
||||
isLoadingGoogleDrive: false,
|
||||
googleDriveFiles: [],
|
||||
showGoogleDriveModal: false,
|
||||
showGoogleDriveOauthButton: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
inputId () {
|
||||
return 'el' + Math.random().toString(32).split('.')[1]
|
||||
},
|
||||
uploadUrl () {
|
||||
return `/templates/${this.templateId}/documents`
|
||||
queryParams () {
|
||||
return new URLSearchParams(window.location.search)
|
||||
},
|
||||
googleDriveOauthPath () {
|
||||
const params = {
|
||||
access_type: 'offline',
|
||||
include_granted_scopes: 'true',
|
||||
prompt: 'consent',
|
||||
scope: [
|
||||
'https://www.googleapis.com/auth/userinfo.email',
|
||||
'https://www.googleapis.com/auth/drive.file'
|
||||
].join(' '),
|
||||
state: new URLSearchParams({
|
||||
redir: `/templates/${this.templateId}/edit?google_drive_open=1`
|
||||
}).toString()
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(params).toString()
|
||||
|
||||
return `/auth/google_oauth2?${query}`
|
||||
},
|
||||
modalContainerEl () {
|
||||
return this.$el.getRootNode().querySelector('#docuseal_modal_container')
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
window.addEventListener('message', this.messageHandler)
|
||||
|
||||
if (this.queryParams.get('google_drive_open') === '1') {
|
||||
this.openGoogleDriveModal()
|
||||
|
||||
window.history.replaceState({}, document.title, window.location.pathname)
|
||||
}
|
||||
},
|
||||
beforeUnmount () {
|
||||
window.removeEventListener('message', this.messageHandler)
|
||||
},
|
||||
methods: {
|
||||
async upload () {
|
||||
openGoogleDriveModal () {
|
||||
this.showGoogleDriveModal = true
|
||||
this.isLoadingGoogleDrive = true
|
||||
},
|
||||
messageHandler (event) {
|
||||
if (event.data.type === 'google-drive-files-picked') {
|
||||
this.googleDriveFiles = event.data.files || []
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.isLoadingGoogleDrive = true
|
||||
|
||||
this.upload({ path: `/templates/${this.templateId}/google_drive_documents` }).then((resp) => {
|
||||
if (resp.ok) {
|
||||
this.showGoogleDriveModal = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isLoadingGoogleDrive = false
|
||||
})
|
||||
})
|
||||
} else if (event.data.type === 'google-drive-picker-loaded') {
|
||||
this.isLoadingGoogleDrive = false
|
||||
} else if (event.data.type === 'google-drive-picker-request-oauth') {
|
||||
this.showGoogleDriveOauthButton = true
|
||||
}
|
||||
},
|
||||
async upload ({ path } = {}) {
|
||||
this.isLoading = true
|
||||
|
||||
this.baseFetch(this.uploadUrl, {
|
||||
return this.baseFetch(path || `/templates/${this.templateId}/documents`, {
|
||||
method: 'POST',
|
||||
headers: { Accept: 'application/json' },
|
||||
body: new FormData(this.$refs.form)
|
||||
@@ -111,6 +312,10 @@ export default {
|
||||
this.isLoading = false
|
||||
}
|
||||
})
|
||||
} else if (data.status === 'google_drive_file_missing') {
|
||||
alert(data.error)
|
||||
this.$emit('error', data.error)
|
||||
this.isLoading = false
|
||||
} else {
|
||||
this.$emit('error', data.error)
|
||||
this.isLoading = false
|
||||
@@ -122,6 +327,8 @@ export default {
|
||||
this.isLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
return resp
|
||||
}).catch(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ class GeneratePreviewImagesJob
|
||||
max_page = [attachment.metadata['pdf']['number_of_pages'].to_i - 1,
|
||||
Templates::ProcessDocument::MAX_NUMBER_OF_PAGES_PROCESSED].min
|
||||
|
||||
Templates::ProcessDocument.generate_document_preview_images(attachment, attachment.download, (1..max_page),
|
||||
Templates::ProcessDocument.generate_document_preview_images(attachment, attachment.download, 1..max_page,
|
||||
concurrency: 1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -93,18 +93,26 @@ class ProcessSubmitterCompletionJob
|
||||
|
||||
def enqueue_completed_emails(submitter)
|
||||
submission = submitter.submission
|
||||
template = submitter.template
|
||||
|
||||
user = submission.created_by_user || submitter.template.author
|
||||
user = submission.created_by_user || template.author
|
||||
|
||||
if submitter.account.users.exists?(id: user.id) && submission.preferences['send_email'] != false &&
|
||||
submitter.template&.preferences&.dig('completed_notification_email_enabled') != false
|
||||
if submission.submitters.map(&:email).exclude?(user.email) &&
|
||||
user.user_configs.find_by(key: UserConfig::RECEIVE_COMPLETED_EMAIL)&.value != false &&
|
||||
user.role != 'integration'
|
||||
SubmitterMailer.completed_email(submitter, user).deliver_later!
|
||||
end
|
||||
(!template || template.preferences['completed_notification_email_enabled'] != false)
|
||||
user_submitter = submission.submitters.find { |s| s.email == user.email }
|
||||
|
||||
is_sent_to_user =
|
||||
if user.role != 'integration' &&
|
||||
(!user_submitter || user_submitter.preferences['send_email'] == false) &&
|
||||
user.user_configs.find_by(key: UserConfig::RECEIVE_COMPLETED_EMAIL)&.value != false
|
||||
SubmitterMailer.completed_email(submitter, user).deliver_later!
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
build_bcc_addresses(submission).each do |to|
|
||||
next if is_sent_to_user && to == user.email
|
||||
|
||||
SubmitterMailer.completed_email(submitter, user, to:).deliver_later!
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ class User < ApplicationRecord
|
||||
EMAIL_REGEXP = /[^@;,<>\s]+@[^@;,<>\s]+/
|
||||
|
||||
FULL_EMAIL_REGEXP =
|
||||
/\A[a-z0-9][\.']?(?:(?:[a-z0-9_-]+[\.\+'])*[a-z0-9_-]+)*@(?:[a-z0-9]+[\.-])*[a-z0-9]+\.[a-z]{2,}\z/i
|
||||
/\A[a-z0-9][.']?(?:(?:[a-z0-9_-]+[.+'])*[a-z0-9_-]+)*@(?:[a-z0-9]+[.-])*[a-z0-9]+\.[a-z]{2,}\z/i
|
||||
|
||||
has_one_attached :signature
|
||||
has_one_attached :initials
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<%= hidden_field_tag :redir, params[:redir] %>
|
||||
<% end %>
|
||||
<submit-form data-on="change">
|
||||
<%= select_tag :lang, options_for_select((I18n.available_locales - %i[en pt-PT de-DE fr-FR it-IT es-ES]).map { |code| [t("language_#{code}"), code] }, I18n.locale), class: 'select select-sm border-base-content/30 text-base' %>
|
||||
<%= select_tag :lang, options_for_select((I18n.available_locales - %i[en pt-PT de-DE fr-FR it-IT es-ES nl-NL]).map { |code| [t("language_#{code}"), code] }, I18n.locale), class: 'select select-sm border-base-content/30 text-base' %>
|
||||
</submit-form>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg class="<%= local_assigns[:class] %>" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-google-drive"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M12 10l-6 10l-3 -5l6 -10z" /><path d="M9 15h12l-3 5h-12" /><path d="M15 15l-6 -10h6l6 10z" /></svg>
|
||||
|
After Width: | Height: | Size: 458 B |
@@ -19,6 +19,12 @@
|
||||
<%= stylesheet_pack_tag 'application', media: 'all' %>
|
||||
</head>
|
||||
<body>
|
||||
<% if params[:modal].present? %>
|
||||
<% url_params = Rails.application.routes.recognize_path(params[:modal], method: :get) %>
|
||||
<% if url_params[:action] == 'new' %>
|
||||
<open-modal src="<%= params[:modal] %>"></open-modal>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<turbo-frame id="modal"></turbo-frame>
|
||||
<turbo-frame id="drawer"></turbo-frame>
|
||||
<%= render 'shared/navbar' %>
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
<span class="disabled">
|
||||
<span class="flex items-center justify-center space-x-2">
|
||||
<%= local_assigns[:icon_disabled] || svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
|
||||
<span class="<%= local_assigns[:title_class] %>"><%= disabled_with %>...</span>
|
||||
<% if disabled_with %>
|
||||
<span class="<%= local_assigns[:title_class] %>"><%= disabled_with %>...</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<% submitter_preferences_index = template&.preferences&.dig('submitters').to_a.index_by { |e| e['uuid'] } %>
|
||||
<% template_submitters = local_assigns[:submitter]&.submission&.template_submitters || template.submitters %>
|
||||
<% message_field_id = "message_field_#{SecureRandom.hex(3)}" %>
|
||||
<div class="form-control">
|
||||
<% can_send_emails = Accounts.can_send_emails?(current_account) %>
|
||||
<div class="flex justify-between items-center">
|
||||
@@ -11,7 +12,7 @@
|
||||
<% if can_send_emails %>
|
||||
<%= render 'submissions/email_stats' %>
|
||||
<%= content_for(:edit_button) || capture do %>
|
||||
<toggle-visible data-element-ids="<%= %w[message_field].to_json %>" class="flex">
|
||||
<toggle-visible data-element-ids="<%= [message_field_id].to_json %>" class="flex">
|
||||
<label>
|
||||
<%= f.check_box :is_custom_message, checked: false, class: 'hidden peer', data: { action: 'change:toggle-visible#trigger', type: 'checkbox' } %>
|
||||
<span class="link peer-checked:hidden"><%= t('edit_message') %></span>
|
||||
@@ -38,7 +39,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% config = AccountConfigs.find_or_initialize_for_key(current_account, AccountConfig::SUBMITTER_INVITATION_EMAIL_KEY) %>
|
||||
<div id="message_field" class="card card-compact bg-base-300/40 hidden">
|
||||
<div id="<%= message_field_id %>" class="card card-compact bg-base-300/40 hidden">
|
||||
<div class="card-body">
|
||||
<%= tag.input id: toggle_uuid = SecureRandom.uuid, value: '1', name: 'request_email_per_submitter', class: 'peer', type: 'checkbox', hidden: true, checked: local_assigns[:message_per_submitter] != false && template&.preferences&.dig('submitters').to_a.size > 1 %>
|
||||
<div class="peer-checked:hidden form-control space-y-2">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<%= svg_icon('cloud_upload', class: 'w-9 h-9') %>
|
||||
</span>
|
||||
<div class="font-medium mb-1">
|
||||
<%= t('upload_new_document') %>
|
||||
<%= t('upload_a_new_document') %>
|
||||
</div>
|
||||
</span>
|
||||
<span class="flex flex-col items-center hidden" data-target="dashboard-dropzone.fileDropzoneLoading">
|
||||
|
||||
@@ -5,16 +5,23 @@
|
||||
<label for="file_dropzone_input" class="w-full block h-52 relative hover:bg-base-200/30 rounded-xl border-2 border-base-300 border-dashed" data-target="file-dropzone.area">
|
||||
<div class="absolute top-0 right-0 left-0 bottom-0 flex items-center justify-center p-2 pointer-events-none">
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<span data-target="file-dropzone.icon" class="flex flex-col items-center">
|
||||
<span data-target="file-dropzone.icon" class="flex flex-col items-center <%= 'mb-5' if Docuseal.multitenant? %>">
|
||||
<span>
|
||||
<%= svg_icon('cloud_upload', class: 'w-10 h-10') %>
|
||||
</span>
|
||||
<div class="font-medium mb-1">
|
||||
<%= t('upload_new_document') %>
|
||||
<%= t('upload_a_new_document') %>
|
||||
</div>
|
||||
<div class="text-xs">
|
||||
<div class="text-sm">
|
||||
<%= t('click_to_upload_or_drag_and_drop_html') %>
|
||||
</div>
|
||||
<% if Docuseal.multitenant? %>
|
||||
<a class="flex absolute bottom-4 items-center text-sm mt-2 pointer-events-auto" href="<%= new_template_path(modal_tab: 'google_drive') %>" data-turbo-frame="modal">
|
||||
<span><%= t('or_add_from') %></span>
|
||||
<%= svg_icon('brand_gdrive', class: 'w-4 h-4 ml-1') %>
|
||||
<span class="ml-1 font-medium hover:underline">Google Drive</span>
|
||||
</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<span data-target="file-dropzone.loading" class="flex flex-col items-center hidden">
|
||||
<%= svg_icon('loader', class: 'w-10 h-10 animate-spin') %>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<%= form_for @template, data: { turbo_frame: :_top }, html: { autocomplete: :off } do |f| %>
|
||||
<% if @base_template %>
|
||||
<%= hidden_field_tag :base_template_id, @base_template.id %>
|
||||
<% end %>
|
||||
<% if @base_template && (can?(:manage, :tenants) || true_user != current_user) && true_user.account.linked_accounts.active.accessible_by(current_ability).exists? %>
|
||||
<div class="form-control -mb-2 mt-2">
|
||||
<%= select_tag :account_id, options_for_select([true_user.account, *true_user.account.linked_accounts.active.accessible_by(current_ability)].uniq.map { |e| [e.name, e.id] }, current_account.id), required: true, class: 'base-select' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-control mt-4">
|
||||
<%= f.text_field :name, required: true, placeholder: t('document_name'), class: 'base-input', dir: 'auto' %>
|
||||
</div>
|
||||
<div class="mt-3 mb-4 flex items-center justify-between">
|
||||
<label for="folder_name" class="cursor-pointer">
|
||||
<%= svg_icon('folder', class: 'w-6 h-6') %>
|
||||
</label>
|
||||
<folder-autocomplete class="flex justify-between w-full">
|
||||
<set-value data-on="blur" data-value="<%= TemplateFolder::DEFAULT_NAME %>" data-empty-only="true" class="peer w-full whitespace-nowrap">
|
||||
<input id="folder_name" placeholder="<%= t('folder_name') %>" type="text" class="w-full outline-none border-transparent focus:border-transparent focus:ring-0 bg-base-100 px-1" name="folder_name" value="<%= params[:folder_name].presence || @base_template&.folder&.full_name || TemplateFolder::DEFAULT_NAME %>" autocomplete="off">
|
||||
</set-value>
|
||||
<set-value data-on="click" data-value="" data-input-id="folder_name" class="peer-focus-within:hidden whitespace-nowrap">
|
||||
<label for="folder_name" data-clear-on-focus="true" class="shrink-0 link mr-1.5 cursor-pointer">
|
||||
<%= t('change_folder') %>
|
||||
</label>
|
||||
</set-value>
|
||||
</folder-autocomplete>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= f.button button_title(title: @base_template ? t('submit') : t('create'), disabled_with: t('creating')), class: 'base-button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -103,12 +103,12 @@
|
||||
</div>
|
||||
<% if !submission.archived_at? && !template&.archived_at? && can?(:destroy, submission) %>
|
||||
<span data-tip="<%= t('archive') %>" class="sm:tooltip tooltip-top">
|
||||
<%= button_to button_title(title: nil, disabled_with: t(:archive).first(4), icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('archive'), method: :delete %>
|
||||
<%= button_to button_title(title: nil, disabled_with: nil, icon: svg_icon('archive', class: 'w-6 h-6'), icon_disabled: svg_icon('loader', class: 'w-6 h-6 animate-spin')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('archive'), method: :delete %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if local_assigns[:archived] && can?(:destroy, submission) %>
|
||||
<span data-tip="<%= t('remove') %>" class="sm:tooltip tooltip-top">
|
||||
<%= button_to button_title(title: nil, disabled_with: t(:remove).first(3), icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('remove'), method: :delete, data: { turbo_confirm: t('submission_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } %>
|
||||
<%= button_to button_title(title: nil, disabled_with: nil, icon: svg_icon('trash', class: 'w-6 h-6'), icon_disabled: svg_icon('loader', class: 'w-6 h-6 animate-spin')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('remove'), method: :delete, data: { turbo_confirm: t('submission_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -210,12 +210,12 @@
|
||||
</div>
|
||||
<% if !submission.archived_at? && !template&.archived_at? %>
|
||||
<span data-tip="<%= t('archive') %>" class="sm:tooltip tooltip-top">
|
||||
<%= button_to button_title(title: nil, disabled_with: t(:archive).first(4), icon: svg_icon('archive', class: 'w-6 h-6')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('archive'), method: :delete %>
|
||||
<%= button_to button_title(title: nil, disabled_with: nil, icon: svg_icon('archive', class: 'w-6 h-6'), icon_disabled: svg_icon('loader', class: 'w-6 h-6 animate-spin')), submission_path(submission), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('archive'), method: :delete %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if local_assigns[:archived] && can?(:destroy, submission) %>
|
||||
<span data-tip="<%= t('remove') %>" class="sm:tooltip tooltip-top">
|
||||
<%= button_to button_title(title: nil, disabled_with: t(:remove).first(3), icon: svg_icon('trash', class: 'w-6 h-6')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('remove'), method: :delete, data: { turbo_confirm: t('submission_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } %>
|
||||
<%= button_to button_title(title: nil, disabled_with: nil, icon: svg_icon('trash', class: 'w-6 h-6'), icon_disabled: svg_icon('loader', class: 'w-6 h-6 animate-spin')), submission_path(submission, permanently: true), class: 'btn btn-outline btn-sm w-full md:w-fit', form: { class: 'flex' }, title: t('remove'), method: :delete, data: { turbo_confirm: t('submission_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,33 +1,3 @@
|
||||
<%= render 'shared/turbo_modal', title: @base_template ? t('clone_template') : t('new_document_template') do %>
|
||||
<%= form_for @template, data: { turbo_frame: :_top }, html: { autocomplete: :off } do |f| %>
|
||||
<% if @base_template %>
|
||||
<%= hidden_field_tag :base_template_id, @base_template.id %>
|
||||
<% end %>
|
||||
<% if @base_template && (can?(:manage, :tenants) || true_user != current_user) && true_user.account.linked_accounts.active.accessible_by(current_ability).exists? %>
|
||||
<div class="form-control -mb-2 mt-2">
|
||||
<%= select_tag :account_id, options_for_select([true_user.account, *true_user.account.linked_accounts.active.accessible_by(current_ability)].uniq.map { |e| [e.name, e.id] }, current_account.id), required: true, class: 'base-select' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-control mt-6">
|
||||
<%= f.text_field :name, required: true, placeholder: t('document_name'), class: 'base-input', dir: 'auto' %>
|
||||
</div>
|
||||
<div class="mt-3 mb-4 flex items-center justify-between">
|
||||
<label for="folder_name" class="cursor-pointer">
|
||||
<%= svg_icon('folder', class: 'w-6 h-6') %>
|
||||
</label>
|
||||
<folder-autocomplete class="flex justify-between w-full">
|
||||
<set-value data-on="blur" data-value="<%= TemplateFolder::DEFAULT_NAME %>" data-empty-only="true" class="peer w-full whitespace-nowrap">
|
||||
<input id="folder_name" placeholder="<%= t('folder_name') %>" type="text" class="w-full outline-none border-transparent focus:border-transparent focus:ring-0 bg-base-100 px-1" name="folder_name" value="<%= params[:folder_name].presence || @base_template&.folder&.full_name || TemplateFolder::DEFAULT_NAME %>" autocomplete="off">
|
||||
</set-value>
|
||||
<set-value data-on="click" data-value="" data-input-id="folder_name" class="peer-focus-within:hidden whitespace-nowrap">
|
||||
<label for="folder_name" data-clear-on-focus="true" class="shrink-0 link mr-1.5 cursor-pointer">
|
||||
<%= t('change_folder') %>
|
||||
</label>
|
||||
</set-value>
|
||||
</folder-autocomplete>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= f.button button_title(title: @base_template ? t('submit') : t('create'), disabled_with: t('creating')), class: 'base-button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render 'templates/file_form' %>
|
||||
<% end %>
|
||||
|
||||
@@ -25,8 +25,8 @@ module DocuSeal
|
||||
|
||||
config.active_storage.draw_routes = ENV['MULTITENANT'] != 'true'
|
||||
|
||||
config.i18n.available_locales = %i[en en-US en-GB es-ES fr-FR pt-PT de-DE it-IT
|
||||
es it de fr pl uk cs pt he nl ar ko ja]
|
||||
config.i18n.available_locales = %i[en en-US en-GB es-ES fr-FR pt-PT de-DE it-IT nl-NL
|
||||
es it de fr nl pl uk cs pt he ar ko ja]
|
||||
config.i18n.fallbacks = [:en]
|
||||
|
||||
config.exceptions_app = ->(env) { ErrorsController.action(:show).call(env) }
|
||||
|
||||
+1686
-815
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -78,7 +78,7 @@ module Docuseal
|
||||
|
||||
@fulltext_search =
|
||||
if SearchEntry.table_exists?
|
||||
Docuseal.multitenant? ? true : AccountConfig.exists?(key: :fulltext_search, value: true)
|
||||
Docuseal.multitenant? || AccountConfig.exists?(key: :fulltext_search, value: true)
|
||||
else
|
||||
false
|
||||
end
|
||||
|
||||
@@ -56,7 +56,7 @@ module SearchEntries
|
||||
end
|
||||
|
||||
[sql, number, number.length > 1 ? number.delete_prefix('0') : number, keyword]
|
||||
elsif keyword.match?(/[^\p{L}\d&@.\-]/) || keyword.match?(/\A['"].*['"]\z/) || keyword.match?(/[.\-]{2,}/)
|
||||
elsif keyword.match?(/[^\p{L}\d&@.-]/) || keyword.match?(/\A['"].*['"]\z/) || keyword.match?(/[.-]{2,}/)
|
||||
['tsvector @@ plainto_tsquery(?)', TextUtils.transliterate(keyword.downcase)]
|
||||
else
|
||||
keyword = TextUtils.transliterate(keyword.downcase).squish
|
||||
|
||||
@@ -6,7 +6,7 @@ module SendWebhookRequest
|
||||
LOCALHOSTS = %w[0.0.0.0 127.0.0.1 localhost].freeze
|
||||
|
||||
MANUAL_ATTEMPT = 99_999
|
||||
AUTOMATED_RETRY_RANGE = 1..MANUAL_ATTEMPT - 1
|
||||
AUTOMATED_RETRY_RANGE = 1..(MANUAL_ATTEMPT - 1)
|
||||
|
||||
HttpsError = Class.new(StandardError)
|
||||
LocalhostError = Class.new(StandardError)
|
||||
|
||||
@@ -481,7 +481,7 @@ module Submissions
|
||||
|
||||
def select_attachments(submitter)
|
||||
original_documents = submitter.submission.schema_documents.preload(:blob)
|
||||
is_more_than_two_images = original_documents.count(&:image?) > 1
|
||||
is_more_than_two_images = original_documents.many?(&:image?)
|
||||
|
||||
submitter.documents.preload(:blob).reject do |attachment|
|
||||
is_more_than_two_images &&
|
||||
|
||||
@@ -311,8 +311,8 @@ module Submissions
|
||||
timezone = submitter.timezone || submitter.account.timezone if with_submitter_timezone
|
||||
|
||||
if with_signature_id_reason
|
||||
"#{reason_value ? "#{I18n.t('reason')}: " : ''}#{reason_value || I18n.t('digitally_signed_by')} " \
|
||||
"#{submitter.name}#{submitter.email.present? ? " <#{submitter.email}>" : ''}\n" \
|
||||
"#{"#{I18n.t('reason')}: " if reason_value}#{reason_value || I18n.t('digitally_signed_by')} " \
|
||||
"#{submitter.name}#{" <#{submitter.email}>" if submitter.email.present?}\n" \
|
||||
"#{I18n.l(attachment.created_at.in_time_zone(timezone), format: :long)} " \
|
||||
"#{TimeUtils.timezone_abbr(timezone, attachment.created_at)}"
|
||||
else
|
||||
@@ -833,7 +833,7 @@ module Submissions
|
||||
def find_last_submitter(submission, submitter: nil)
|
||||
submission.submitters
|
||||
.select(&:completed_at?)
|
||||
.select { |e| submitter.nil? ? true : e.id != submitter.id && e.completed_at <= submitter.completed_at }
|
||||
.select { |e| submitter.nil? || (e.id != submitter.id && e.completed_at <= submitter.completed_at) }
|
||||
.max_by(&:completed_at)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ module Submitters
|
||||
end
|
||||
|
||||
[sql, number, weight, number.length > 1 ? number.delete_prefix('0') : number, weight]
|
||||
elsif keyword.match?(/[^\p{L}\d&@.\-]/) || keyword.match?(/[.\-]{2,}/)
|
||||
elsif keyword.match?(/[^\p{L}\d&@.-]/) || keyword.match?(/[.-]{2,}/)
|
||||
terms = TextUtils.transliterate(keyword.downcase).split(/\b/).map(&:squish).compact_blank.uniq
|
||||
|
||||
if terms.size > 1
|
||||
@@ -100,7 +100,7 @@ module Submitters
|
||||
end
|
||||
|
||||
original_documents = submitter.submission.schema_documents.preload(:blob)
|
||||
is_more_than_two_images = original_documents.count(&:image?) > 1
|
||||
is_more_than_two_images = original_documents.many?(&:image?)
|
||||
|
||||
submitter.documents.preload(:blob).reject do |attachment|
|
||||
is_more_than_two_images &&
|
||||
|
||||
@@ -99,7 +99,7 @@ module Templates
|
||||
|
||||
max_pages_to_process = data.size < GENERATE_PREVIEW_SIZE_LIMIT ? max_pages : 1
|
||||
|
||||
generate_document_preview_images(attachment, data, (0..[number_of_pages - 1, max_pages_to_process].min))
|
||||
generate_document_preview_images(attachment, data, 0..[number_of_pages - 1, max_pages_to_process].min)
|
||||
end
|
||||
|
||||
def generate_document_preview_images(attachment, data, range, concurrency: CONCURRENCY)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
module TextUtils
|
||||
RTL_REGEXP = /[\p{Hebrew}\p{Arabic}]/
|
||||
MASK_REGEXP = /[^\s\-_\[\]\(\)\+\?\.\,]/
|
||||
MASK_REGEXP = /[^\s\-_\[\]()+?.,]/
|
||||
MASK_SYMBOL = 'X'
|
||||
|
||||
TRANSLITERATIONS =
|
||||
|
||||
Reference in New Issue
Block a user