pull/381/head
Oleksandr Turchyn 1 year ago
parent 711427521c
commit 9479771fc8

@ -87,7 +87,7 @@ class EsignSettingsController < ApplicationController
@encrypted_config.save! @encrypted_config.save!
redirect_to settings_esign_path, notice: I18m.t('certificate_has_been_removed') redirect_to settings_esign_path, notice: I18n.t('certificate_has_been_removed')
end end
private private

@ -216,7 +216,7 @@ const it = {
pay: 'Pagamento', pay: 'Pagamento',
file: 'File', file: 'File',
select: 'Seleziona', select: 'Seleziona',
checkbox: 'Casella di controllo', checkbox: 'Checkbox',
multiple: 'Multiplo', multiple: 'Multiplo',
radio: 'Radio', radio: 'Radio',
cells: 'Celle', cells: 'Celle',

@ -360,6 +360,7 @@ export default {
}, },
computed: { computed: {
fieldNames: FieldType.computed.fieldNames, fieldNames: FieldType.computed.fieldNames,
fieldLabels: FieldType.computed.fieldLabels,
fieldIcons: FieldType.computed.fieldIcons, fieldIcons: FieldType.computed.fieldIcons,
isDefaultValuePresent () { isDefaultValuePresent () {
if (this.field?.type === 'radio' && this.field?.areas?.length > 1) { if (this.field?.type === 'radio' && this.field?.areas?.length > 1) {

@ -332,7 +332,7 @@
> >
<div class="bg-base-200 rounded-lg p-5 text-center space-y-4"> <div class="bg-base-200 rounded-lg p-5 text-center space-y-4">
<p> <p>
{{ t('draw_field_on_the_document').replace('{field}', drawField?.name || '') }} {{ t('draw_field_on_the_document') }}
</p> </p>
<div> <div>
<button <button

@ -312,6 +312,7 @@ export default {
}, },
computed: { computed: {
fieldNames: FieldType.computed.fieldNames, fieldNames: FieldType.computed.fieldNames,
fieldLabels: FieldType.computed.fieldLabels,
dropdownBgColor () { dropdownBgColor () {
return ['', null, 'transparent'].includes(this.backgroundColor) ? 'white' : this.backgroundColor return ['', null, 'transparent'].includes(this.backgroundColor) ? 'white' : this.backgroundColor
}, },
@ -367,8 +368,7 @@ export default {
if (this.field.type === 'heading') { if (this.field.type === 'heading') {
return `${this.fieldNames[field.type]} ${typeIndex + 1}` return `${this.fieldNames[field.type]} ${typeIndex + 1}`
} else { } else {
const suffix = { multiple: this.t('select'), radio: this.t('group') }[field.type] || this.t('field') return `${this.fieldLabels[field.type]} ${typeIndex + 1}`
return `${this.fieldNames[field.type]} ${suffix} ${typeIndex + 1}`
} }
} }
}, },

@ -114,6 +114,25 @@ export default {
phone: this.t('phone') phone: this.t('phone')
} }
}, },
fieldLabels () {
return {
text: this.t('text_field'),
signature: this.t('signature_field'),
initials: this.t('initials_field'),
date: this.t('date_field'),
number: this.t('number_field'),
image: this.t('image_field'),
file: this.t('file_field'),
select: this.t('select_field'),
checkbox: this.t('checkbox_field'),
multiple: this.t('multiple_field'),
radio: this.t('radio_field'),
cells: this.t('cells_field'),
stamp: this.t('stamp_field'),
payment: this.t('payment_field'),
phone: this.t('phone_field')
}
},
fieldIcons () { fieldIcons () {
return { return {
heading: IconHeading, heading: IconHeading,

@ -46,7 +46,7 @@ const en = {
drawn: 'Drawn', drawn: 'Drawn',
formula: 'Formula', formula: 'Formula',
typed: 'Typed', typed: 'Typed',
draw_field_on_the_document: 'Draw {field} field on the document', draw_field_on_the_document: 'Draw a field on the document',
click_to_upload: 'Click to upload', click_to_upload: 'Click to upload',
or_drag_and_drop_files: 'or drag and drop files', or_drag_and_drop_files: 'or drag and drop files',
uploading: 'Uploading', uploading: 'Uploading',
@ -101,8 +101,21 @@ const en = {
stamp: 'Stamp', stamp: 'Stamp',
payment: 'Payment', payment: 'Payment',
phone: 'Phone', phone: 'Phone',
field: 'Field', text_field: 'Text Field',
group: 'Group', signature_field: 'Signature Field',
initials_field: 'Initials Field',
date_field: 'Date Field',
number_field: 'Number Field',
image_field: 'Image Field',
file_field: 'File Field',
select_field: 'Select Field',
checkbox_field: 'Checkbox Field',
multiple_field: 'Multiple Select Field',
radio_field: 'Radio Group Field',
cells_field: 'Cells Field',
stamp_field: 'Stamp Field',
payment_field: 'Payment Field',
phone_field: 'Phone Field',
draw_a_text_field_on_the_page_with_a_mouse: 'Draw a text field on the page with a mouse', draw_a_text_field_on_the_page_with_a_mouse: 'Draw a text field on the page with a mouse',
drag_and_drop_any_other_field_type_on_the_page: 'Drag & drop any other field type on the page', drag_and_drop_any_other_field_type_on_the_page: 'Drag & drop any other field type on the page',
click_on_the_field_type_above_to_start_drawing_it: 'Click on the field type above to start drawing it', click_on_the_field_type_above_to_start_drawing_it: 'Click on the field type above to start drawing it',
@ -184,7 +197,7 @@ const es = {
save: 'Guardar', save: 'Guardar',
cancel: 'Cancelar', cancel: 'Cancelar',
or_add_field_without_drawing: 'O añadir campo sin dibujar', or_add_field_without_drawing: 'O añadir campo sin dibujar',
draw_field_on_the_document: 'Dibujar campo {field} en el documento', draw_field_on_the_document: 'Dibujar un campo en el documento',
click_to_upload: 'Haz clic para cargar', click_to_upload: 'Haz clic para cargar',
or_drag_and_drop_files: 'o arrastra y suelta archivos', or_drag_and_drop_files: 'o arrastra y suelta archivos',
uploading: 'Subiendo', uploading: 'Subiendo',
@ -232,13 +245,26 @@ const es = {
select: 'Seleccionar', select: 'Seleccionar',
checkbox: 'Casilla', checkbox: 'Casilla',
multiple: 'Múltiple', multiple: 'Múltiple',
field: 'Campo',
group: 'Grupo',
radio: 'Radio', radio: 'Radio',
cells: 'Celdas', cells: 'Celdas',
stamp: 'Sello', stamp: 'Sello',
payment: 'Pago', payment: 'Pago',
phone: 'Teléfono', phone: 'Teléfono',
text_field: 'Campo de Texto',
signature_field: 'Campo de Firma',
initials_field: 'Campo de Iniciales',
date_field: 'Campo de Fecha',
number_field: 'Campo de Número',
image_field: 'Campo de Imagen',
file_field: 'Campo de Archivo',
select_field: 'Campo de Selección',
checkbox_field: 'Campo de Casilla',
multiple_field: 'Campo Múltiple',
radio_field: 'Campo de Grupo Radio',
cells_field: 'Campo de Celdas',
stamp_field: 'Campo de Sello',
payment_field: 'Campo de Pago',
phone_field: 'Campo de Teléfono',
draw_a_text_field_on_the_page_with_a_mouse: 'Dibujar un campo de texto en la página con el mouse', draw_a_text_field_on_the_page_with_a_mouse: 'Dibujar un campo de texto en la página con el mouse',
drag_and_drop_any_other_field_type_on_the_page: 'Arrastra y suelta cualquier otro tipo de campo en la página', drag_and_drop_any_other_field_type_on_the_page: 'Arrastra y suelta cualquier otro tipo de campo en la página',
click_on_the_field_type_above_to_start_drawing_it: 'Haz clic en el tipo de campo de arriba para comenzar a dibujarlo', click_on_the_field_type_above_to_start_drawing_it: 'Haz clic en el tipo de campo de arriba para comenzar a dibujarlo',
@ -324,7 +350,7 @@ const it = {
drawn: 'Disegnato', drawn: 'Disegnato',
formula: 'Formula', formula: 'Formula',
typed: 'Digitato', typed: 'Digitato',
draw_field_on_the_document: 'Disegna il campo {field} sul documento', draw_field_on_the_document: 'Disegnare un campo sul documento',
click_to_upload: 'Clicca per caricare', click_to_upload: 'Clicca per caricare',
or_drag_and_drop_files: 'o trascina e rilascia i file', or_drag_and_drop_files: 'o trascina e rilascia i file',
uploading: 'Caricamento in corso', uploading: 'Caricamento in corso',
@ -372,15 +398,28 @@ const it = {
image: 'Immagine', image: 'Immagine',
file: 'File', file: 'File',
select: 'Seleziona', select: 'Seleziona',
checkbox: 'Casella di controllo', checkbox: 'Checkbox',
multiple: 'Multiplo', multiple: 'Multiplo',
radio: 'Radio', radio: 'Radio',
cells: 'Celle', cells: 'Celle',
stamp: 'Timbro', stamp: 'Timbro',
payment: 'Pagamento', payment: 'Pagamento',
phone: 'Telefono', phone: 'Telefono',
field: 'Campo', text_field: 'Campo di Testo',
group: 'Gruppo', signature_field: 'Campo di Firma',
initials_field: 'Campo di Iniziali',
date_field: 'Campo Data',
number_field: 'Campo Numero',
image_field: 'Campo Immagine',
file_field: 'Campo File',
select_field: 'Campo di Selezione',
checkbox_field: 'Campo di Checkbox',
multiple_field: 'Campo Selezione Multipla',
radio_field: 'Campo di Gruppo Radio',
cells_field: 'Campo Celle',
stamp_field: 'Campo Timbro',
payment_field: 'Campo Pagamento',
phone_field: 'Campo Telefono',
draw_a_text_field_on_the_page_with_a_mouse: 'Disegna un campo di testo sulla pagina con il mouse', draw_a_text_field_on_the_page_with_a_mouse: 'Disegna un campo di testo sulla pagina con il mouse',
drag_and_drop_any_other_field_type_on_the_page: 'Trascina e rilascia qualsiasi altro tipo di campo sulla pagina', drag_and_drop_any_other_field_type_on_the_page: 'Trascina e rilascia qualsiasi altro tipo di campo sulla pagina',
click_on_the_field_type_above_to_start_drawing_it: 'Clicca sul tipo di campo sopra per iniziare a disegnarlo', click_on_the_field_type_above_to_start_drawing_it: 'Clicca sul tipo di campo sopra per iniziare a disegnarlo',
@ -462,7 +501,7 @@ const pt = {
save: 'Salvar', save: 'Salvar',
cancel: 'Cancelar', cancel: 'Cancelar',
or_add_field_without_drawing: 'Ou adicione campo sem desenhar', or_add_field_without_drawing: 'Ou adicione campo sem desenhar',
draw_field_on_the_document: 'Desenhar campo {field} no documento', draw_field_on_the_document: 'Desenhar um campo no documento',
click_to_upload: 'Clique para enviar', click_to_upload: 'Clique para enviar',
or_drag_and_drop_files: 'ou arraste e solte arquivos', or_drag_and_drop_files: 'ou arraste e solte arquivos',
uploading: 'Carregando', uploading: 'Carregando',
@ -509,14 +548,27 @@ const pt = {
file: 'Arquivo', file: 'Arquivo',
select: 'Selecionar', select: 'Selecionar',
checkbox: 'Caixa', checkbox: 'Caixa',
field: 'Campo',
group: 'Grupo',
multiple: 'Múltiplo', multiple: 'Múltiplo',
radio: 'Rádio', radio: 'Rádio',
cells: 'Células', cells: 'Células',
stamp: 'Carimbo', stamp: 'Carimbo',
payment: 'Pagamento', payment: 'Pagamento',
phone: 'Telefone', phone: 'Telefone',
text_field: 'Campo de Texto',
signature_field: 'Campo de Assinatura',
initials_field: 'Campo de Rúbrica',
date_field: 'Campo de Data',
number_field: 'Campo de Número',
image_field: 'Campo de Imagem',
file_field: 'Campo de Arquivo',
select_field: 'Campo de Seleção',
checkbox_field: 'Campo de Caixa',
multiple_field: 'Campo de Opção Múltipla',
radio_field: 'Campo de Grupo Rádio',
cells_field: 'Campo de Células',
stamp_field: 'Campo de Carimbo',
payment_field: 'Campo de Pagamento',
phone_field: 'Campo de Telefone',
draw_a_text_field_on_the_page_with_a_mouse: 'Desenhar um campo de texto na página com o mouse', draw_a_text_field_on_the_page_with_a_mouse: 'Desenhar um campo de texto na página com o mouse',
drag_and_drop_any_other_field_type_on_the_page: 'Arraste e solte qualquer outro tipo de campo na página', drag_and_drop_any_other_field_type_on_the_page: 'Arraste e solte qualquer outro tipo de campo na página',
click_on_the_field_type_above_to_start_drawing_it: 'Clique no tipo de campo acima para começar a desenhá-lo', click_on_the_field_type_above_to_start_drawing_it: 'Clique no tipo de campo acima para começar a desenhá-lo',
@ -600,7 +652,7 @@ const fr = {
remove: 'Supprimer', remove: 'Supprimer',
save: 'Enregistrer', save: 'Enregistrer',
cancel: 'Annuler', cancel: 'Annuler',
draw_field_on_the_document: 'Dessinez le champ {field} sur le document', draw_field_on_the_document: 'Dessiner un champ sur le document',
click_to_upload: 'Cliquez pour télécharger', click_to_upload: 'Cliquez pour télécharger',
or_drag_and_drop_files: 'ou faites glisser-déposer des fichiers', or_drag_and_drop_files: 'ou faites glisser-déposer des fichiers',
uploading: 'Téléchargement en cours', uploading: 'Téléchargement en cours',
@ -654,8 +706,21 @@ const fr = {
stamp: 'Tampon', stamp: 'Tampon',
payment: 'Paiement', payment: 'Paiement',
phone: 'Téléphone', phone: 'Téléphone',
field: 'Champ', text_field: 'Champ de Texte',
group: 'Groupe', 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', 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', drag_and_drop_any_other_field_type_on_the_page: 'Glissez et 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', click_on_the_field_type_above_to_start_drawing_it: 'Cliquez sur le type de champ ci-dessus pour commencer à le dessiner',
@ -739,7 +804,7 @@ const de = {
remove: 'Entfernen', remove: 'Entfernen',
save: 'Speichern', save: 'Speichern',
cancel: 'Abbrechen', cancel: 'Abbrechen',
draw_field_on_the_document: 'Feld {field} auf dem Dokument zeichnen', draw_field_on_the_document: 'Ein Feld auf dem Dokument zeichnen',
click_to_upload: 'Klicken Sie zum Hochladen', click_to_upload: 'Klicken Sie zum Hochladen',
or_drag_and_drop_files: 'oder Dateien hierher ziehen', or_drag_and_drop_files: 'oder Dateien hierher ziehen',
uploading: 'Hochladen', uploading: 'Hochladen',
@ -793,8 +858,21 @@ const de = {
stamp: 'Stempel', stamp: 'Stempel',
payment: 'Zahlung', payment: 'Zahlung',
phone: 'Telefon', phone: 'Telefon',
field: 'Feld', text_field: 'Textfeld',
group: 'Gruppe', signature_field: 'Unterschriftsfeld',
initials_field: 'Initialenfeld',
date_field: 'Datumsfeld',
number_field: 'Zahlenfeld',
image_field: 'Bildfeld',
file_field: 'Dateifeld',
select_field: 'Auswahlfeld',
checkbox_field: 'Checkbox-Feld',
multiple_field: 'Mehrfach-Auswahlfeld',
radio_field: 'Radio-Gruppenfeld',
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', 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', 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', click_on_the_field_type_above_to_start_drawing_it: 'Klicke auf den Feldtyp oben, um mit dem Zeichnen zu beginnen',

@ -182,7 +182,7 @@
<% next if value.blank? %> <% next if value.blank? %>
<div class="pt-2.5 border-b border-base-300"> <div class="pt-2.5 border-b border-base-300">
<div class="text-xs font-medium uppercase mb-0.5" dir="auto"> <div class="text-xs font-medium uppercase mb-0.5" dir="auto">
<%= field['name'].presence || "#{field['type'].titleize} Field #{submitter_field_counters[field['type']]}" %> <%= field['name'].presence || "#{t("#{field['type']}_field")} #{submitter_field_counters[field['type']]}" %>
</div> </div>
<div dir="auto"> <div dir="auto">
<% if field['type'].in?(%w[signature initials]) %> <% if field['type'].in?(%w[signature initials]) %>

@ -592,10 +592,27 @@ en: &en
email_verification: Email verification email_verification: Email verification
phone_verification: Phone verification phone_verification: Phone verification
session_id: Session ID session_id: Session ID
type_field: '%{type} Field' option: Option
text_field: Text Field
signature_field: Signature Field
initials_field: Initials Field
date_field: Date Field
number_field: Number Field
image_field: Image Field
file_field: File Field
select_field: Select Field
checkbox_field: Checkbox Field
multiple_field: Multiple Select Field
radio_field: Radio Group Field
cells_field: Cells Field
stamp_field: Stamp Field
payment_field: Payment Field
phone_field: Phone Field
paid_price: 'Paid %{price}' paid_price: 'Paid %{price}'
verified: Verified verified: Verified
unverified: Unverified unverified: Unverified
document: Document
completed_at: Completed At
submission_event_names: submission_event_names:
send_email_to_html: '<b>Email sent</b> to %{submitter_name}' send_email_to_html: '<b>Email sent</b> to %{submitter_name}'
send_reminder_email_to_html: '<b>Reminder email sent</b> to %{submitter_name}' send_reminder_email_to_html: '<b>Reminder email sent</b> to %{submitter_name}'
@ -1206,10 +1223,27 @@ es: &es
email_verification: Verificación de correo electrónico email_verification: Verificación de correo electrónico
phone_verification: Verificación telefónica phone_verification: Verificación telefónica
session_id: ID de la Sesión session_id: ID de la Sesión
type_field: 'Campo %{type}' option: Opción
text_field: Campo de Texto
signature_field: Campo de Firma
initials_field: Campo de Iniciales
date_field: Campo de Fecha
number_field: Campo de Número
image_field: Campo de Imagen
file_field: Campo de Archivo
select_field: Campo de Selección
multiple_field: Campo Múltiple
radio_field: Campo de Grupo Radio
radio_field: Campo de Radio
cells_field: Campo de Celdas
stamp_field: Campo de Sello
payment_field: Campo de Pago
phone_field: Campo de Teléfono
paid_price: 'Pagado %{price}' paid_price: 'Pagado %{price}'
verified: Verificado verified: Verificado
unverified: No verificado unverified: No verificado
document: Documento
completed_at: Completado el
submission_event_names: submission_event_names:
send_email_to_html: '<b>Correo electrónico enviado</b> a %{submitter_name}' send_email_to_html: '<b>Correo electrónico enviado</b> a %{submitter_name}'
send_reminder_email_to_html: '<b>Correo de recordatorio enviado</b> a %{submitter_name}' send_reminder_email_to_html: '<b>Correo de recordatorio enviado</b> a %{submitter_name}'
@ -1820,10 +1854,27 @@ it: &it
email_verification: Verifica e-mail email_verification: Verifica e-mail
phone_verification: Verifica telefono phone_verification: Verifica telefono
session_id: ID della Sessione session_id: ID della Sessione
type_field: 'Campo %{type}' option: Opzione
text_field: Campo di Testo
signature_field: Campo di Firma
initials_field: Campo di Iniziali
date_field: Campo Data
number_field: Campo Numero
image_field: Campo Immagine
file_field: Campo File
select_field: Campo di Selezione
checkbox_field: Campo di Checkbox
multiple_field: Campo Selezione Multipla
radio_field: Campo di Gruppo Radio
cells_field: Campo Celle
stamp_field: Campo Timbro
payment_field: Campo Pagamento
phone_field: Campo Telefono
paid_price: 'Pagato %{price}' paid_price: 'Pagato %{price}'
verified: Verificato verified: Verificato
unverified: Non verificato unverified: Non verificato
document: Documento
completed_at: Completato il
submission_event_names: submission_event_names:
send_email_to_html: '<b>E-mail inviato</b> a %{submitter_name}' send_email_to_html: '<b>E-mail inviato</b> a %{submitter_name}'
send_reminder_email_to_html: '<b>E-mail di promemoria inviato</b> a %{submitter_name}' send_reminder_email_to_html: '<b>E-mail di promemoria inviato</b> a %{submitter_name}'
@ -2435,10 +2486,27 @@ fr: &fr
email_verification: Vérification de l'e-mail email_verification: Vérification de l'e-mail
phone_verification: Vérification du téléphone phone_verification: Vérification du téléphone
session_id: ID de session session_id: ID de session
type_field: 'Champ %{type}' option: Option
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
paid_price: 'Payé %{price}' paid_price: 'Payé %{price}'
verified: Vérifié verified: Vérifié
unverified: Non vérifié unverified: Non vérifié
document: Document
completed_at: Terminé le
submission_event_names: submission_event_names:
send_email_to_html: '<b>E-mail envoyé</b> à %{submitter_name}' send_email_to_html: '<b>E-mail envoyé</b> à %{submitter_name}'
send_reminder_email_to_html: '<b>E-mail de rappel envoyé</b> à %{submitter_name}' send_reminder_email_to_html: '<b>E-mail de rappel envoyé</b> à %{submitter_name}'
@ -3049,10 +3117,27 @@ pt: &pt
email_verification: Verificação de E-mail email_verification: Verificação de E-mail
phone_verification: Verificação de Telefone phone_verification: Verificação de Telefone
session_id: ID da Sessão session_id: ID da Sessão
type_field: 'Campo %{type}' option: Opção
text_field: Campo de Texto
signature_field: Campo de Assinatura
initials_field: Campo de Rúbrica
date_field: Campo de Data
number_field: Campo de Número
image_field: Campo de Imagem
file_field: Campo de Arquivo
select_field: Campo de Seleção
checkbox_field: Campo de Caixa
multiple_field: Campo de Opção Múltipla
radio_field: Campo de Grupo Rádio
cells_field: Campo de Células
stamp_field: Campo de Carimbo
payment_field: Campo de Pagamento
phone_field: Campo de Telefone
paid_price: 'Pago %{price}' paid_price: 'Pago %{price}'
verified: Verificado verified: Verificado
unverified: Não verificado unverified: Não verificado
document: Documento
completed_at: Concluído em
submission_event_names: submission_event_names:
send_email_to_html: '<b>E-mail enviado</b> para %{submitter_name}' send_email_to_html: '<b>E-mail enviado</b> para %{submitter_name}'
send_reminder_email_to_html: '<b>E-mail de lembrete enviado</b> para %{submitter_name}' send_reminder_email_to_html: '<b>E-mail de lembrete enviado</b> para %{submitter_name}'
@ -3663,10 +3748,27 @@ de: &de
email_verification: E-Mail-Verifizierung email_verification: E-Mail-Verifizierung
phone_verification: Telefonverifizierung phone_verification: Telefonverifizierung
session_id: Sitzungs-ID session_id: Sitzungs-ID
type_field: '%{type} Feld' option: Option
text_field: Textfeld
signature_field: Unterschriftsfeld
initials_field: Initialenfeld
date_field: Datumsfeld
number_field: Zahlenfeld
image_field: Bildfeld
file_field: Dateifeld
select_field: Auswahlfeld
checkbox_field: Checkbox-Feld
multiple_field: Mehrfach-Auswahlfeld
radio_field: Radio-Gruppenfeld
cells_field: Zellenfeld
stamp_field: Stempelfeld
payment_field: Zahlungsfeld
phone_field: Telefonfeld
paid_price: 'Bezahlt %{price}' paid_price: 'Bezahlt %{price}'
verified: Verifiziert verified: Verifiziert
unverified: Nicht verifiziert unverified: Nicht verifiziert
document: Dokument
completed_at: Abgeschlossen am
submission_event_names: submission_event_names:
send_email_to_html: '<b>E-Mail gesendet</b> an %{submitter_name}' send_email_to_html: '<b>E-Mail gesendet</b> an %{submitter_name}'
send_reminder_email_to_html: '<b>Erinnerungs-E-Mail gesendet</b> an %{submitter_name}' send_reminder_email_to_html: '<b>Erinnerungs-E-Mail gesendet</b> an %{submitter_name}'

@ -282,8 +282,7 @@ module Submissions
[ [
{ {
text: TextUtils.maybe_rtl_reverse(field_name).upcase.presence || text: TextUtils.maybe_rtl_reverse(field_name).upcase.presence ||
"#{I18n.t('type_field', "#{I18n.t("#{field['type']}_field")} #{submitter_field_counters[field['type']]}\n".upcase,
type: field['type'])} #{submitter_field_counters[field['type']]}\n".upcase,
font_size: 6 font_size: 6
} }
].compact_blank, ].compact_blank,

@ -21,7 +21,7 @@ module Submissions
def rows_to_xlsx(rows) def rows_to_xlsx(rows)
workbook = RubyXL::Workbook.new workbook = RubyXL::Workbook.new
worksheet = workbook[0] worksheet = workbook[0]
worksheet.sheet_name = I18n.l(Time.current.to_date) worksheet.sheet_name = Time.current.to_date.to_s
headers = build_headers(rows) headers = build_headers(rows)
headers.each_with_index do |column_name, column_index| headers.each_with_index do |column_name, column_index|
@ -79,7 +79,7 @@ module Submissions
submission_data += submitter.documents.map.with_index(1) do |attachment, index| submission_data += submitter.documents.map.with_index(1) do |attachment, index|
{ {
name: "Document #{index}", name: "#{I18n.t('document')} #{index}",
value: ActiveStorage::Blob.proxy_url(attachment.blob) value: ActiveStorage::Blob.proxy_url(attachment.blob)
} }
end end
@ -92,20 +92,20 @@ module Submissions
def build_submission_data(submitter, submitter_name, submitters_count) def build_submission_data(submitter, submitter_name, submitters_count)
[ [
{ {
name: column_name('Name', submitter_name, submitters_count), name: column_name(I18n.t('name'), submitter_name, submitters_count),
value: submitter.name value: submitter.name
}, },
{ {
name: column_name('Email', submitter_name, submitters_count), name: column_name(I18n.t('email'), submitter_name, submitters_count),
value: submitter.email value: submitter.email
}, },
{ {
name: column_name('Phone', submitter_name, submitters_count), name: column_name(I18n.t('phone'), submitter_name, submitters_count),
value: submitter.phone value: submitter.phone
}, },
{ {
name: column_name('Completed At', submitter_name, submitters_count), name: column_name(I18n.t('completed_at'), submitter_name, submitters_count),
value: submitter.completed_at value: submitter.completed_at.to_s
} }
].reject { |e| e[:value].blank? } ].reject { |e| e[:value].blank? }
end end
@ -127,7 +127,8 @@ module Submissions
template_field_type = template_field['type'] template_field_type = template_field['type']
template_field_counters[template_field_type] += 1 template_field_counters[template_field_type] += 1
template_field_name = template_field['name'].presence template_field_name = template_field['name'].presence
template_field_name ||= "#{template_field_type.titleize} Field #{template_field_counters[template_field_type]}" template_field_name ||=
"#{I18n.t("#{template_field_type}_field")} #{template_field_counters[template_field_type]}"
value = value =
if template_field_type.in?(%w[image signature]) if template_field_type.in?(%w[image signature])

@ -341,7 +341,8 @@ module Submissions
if field['type'].in?(%w[multiple radio]) if field['type'].in?(%w[multiple radio])
option = field['options']&.find { |o| o['uuid'] == area['option_uuid'] } option = field['options']&.find { |o| o['uuid'] == area['option_uuid'] }
option_name = option['value'].presence || "Option #{field['options'].index(option) + 1}" option_name = option['value'].presence
option_name ||= "#{I18n.t('option', locale: account.locale)} #{field['options'].index(option) + 1}"
value = Array.wrap(value).include?(option_name) value = Array.wrap(value).include?(option_name)
end end

Loading…
Cancel
Save