Skip to content

Commit

Permalink
fix: show the existing field meta when editing a template fields (doc…
Browse files Browse the repository at this point in the history
…umenso#1323)

Fixes documenso#1259. I literally just used the exact same line of code than from
the document page so it is consistent.

The bug is extremely frustrating because if you make change to the
fields meta on the template and refresh the page, you can't see field
meta (label, default value, required), and neither do your co-workers.

Of course, I tested the change and it now displays correctly the
existing field meta on the template page.
  • Loading branch information
Etrenak committed Sep 5, 2024
1 parent 921617b commit ad4cff9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
28 changes: 14 additions & 14 deletions packages/lib/translations/de/common.po
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ msgid "Advanced Options"
msgstr "Erweiterte Optionen"

#: packages/ui/primitives/document-flow/add-fields.tsx:510
#: packages/ui/primitives/template-flow/add-template-fields.tsx:369
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
msgid "Advanced settings"
msgstr "Erweiterte Einstellungen"

Expand Down Expand Up @@ -167,7 +167,7 @@ msgid "Character Limit"
msgstr "Zeichenbeschränkung"

#: packages/ui/primitives/document-flow/add-fields.tsx:932
#: packages/ui/primitives/template-flow/add-template-fields.tsx:755
#: packages/ui/primitives/template-flow/add-template-fields.tsx:756
msgid "Checkbox"
msgstr "Checkbox"

Expand Down Expand Up @@ -196,7 +196,7 @@ msgid "Configure Direct Recipient"
msgstr "Direkten Empfänger konfigurieren"

#: packages/ui/primitives/document-flow/add-fields.tsx:511
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
#: packages/ui/primitives/template-flow/add-template-fields.tsx:371
msgid "Configure the {0} field"
msgstr "Konfigurieren Sie das Feld {0}"

Expand All @@ -213,7 +213,7 @@ msgid "Custom Text"
msgstr "Benutzerdefinierter Text"

#: packages/ui/primitives/document-flow/add-fields.tsx:828
#: packages/ui/primitives/template-flow/add-template-fields.tsx:651
#: packages/ui/primitives/template-flow/add-template-fields.tsx:652
msgid "Date"
msgstr "Datum"

Expand Down Expand Up @@ -245,7 +245,7 @@ msgid "Drag & drop your PDF here."
msgstr "Ziehen Sie Ihr PDF hierher."

#: packages/ui/primitives/document-flow/add-fields.tsx:958
#: packages/ui/primitives/template-flow/add-template-fields.tsx:781
#: packages/ui/primitives/template-flow/add-template-fields.tsx:782
msgid "Dropdown"
msgstr "Dropdown"

Expand All @@ -257,7 +257,7 @@ msgstr "Dropdown-Optionen"
#: packages/ui/primitives/document-flow/add-signature.tsx:272
#: packages/ui/primitives/document-flow/add-signers.tsx:232
#: packages/ui/primitives/document-flow/add-signers.tsx:239
#: packages/ui/primitives/template-flow/add-template-fields.tsx:599
#: packages/ui/primitives/template-flow/add-template-fields.tsx:600
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:210
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:217
msgid "Email"
Expand Down Expand Up @@ -367,7 +367,7 @@ msgstr "Min"
#: packages/ui/primitives/document-flow/add-fields.tsx:802
#: packages/ui/primitives/document-flow/add-signature.tsx:298
#: packages/ui/primitives/document-flow/add-signers.tsx:265
#: packages/ui/primitives/template-flow/add-template-fields.tsx:625
#: packages/ui/primitives/template-flow/add-template-fields.tsx:626
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:245
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:251
msgid "Name"
Expand All @@ -386,12 +386,12 @@ msgid "Needs to view"
msgstr "Muss sehen"

#: packages/ui/primitives/document-flow/add-fields.tsx:613
#: packages/ui/primitives/template-flow/add-template-fields.tsx:464
#: packages/ui/primitives/template-flow/add-template-fields.tsx:465
msgid "No recipient matching this description was found."
msgstr "Kein passender Empfänger mit dieser Beschreibung gefunden."

#: packages/ui/primitives/document-flow/add-fields.tsx:629
#: packages/ui/primitives/template-flow/add-template-fields.tsx:480
#: packages/ui/primitives/template-flow/add-template-fields.tsx:481
msgid "No recipients with this role"
msgstr "Keine Empfänger mit dieser Rolle"

Expand All @@ -416,7 +416,7 @@ msgid "No value found."
msgstr "Kein Wert gefunden."

#: packages/ui/primitives/document-flow/add-fields.tsx:880
#: packages/ui/primitives/template-flow/add-template-fields.tsx:703
#: packages/ui/primitives/template-flow/add-template-fields.tsx:704
msgid "Number"
msgstr "Nummer"

Expand Down Expand Up @@ -451,7 +451,7 @@ msgid "Placeholder"
msgstr "Platzhalter"

#: packages/ui/primitives/document-flow/add-fields.tsx:906
#: packages/ui/primitives/template-flow/add-template-fields.tsx:729
#: packages/ui/primitives/template-flow/add-template-fields.tsx:730
msgid "Radio"
msgstr "Radio"

Expand Down Expand Up @@ -502,7 +502,7 @@ msgstr "Zeilen pro Seite"
msgid "Save"
msgstr "Speichern"

#: packages/ui/primitives/template-flow/add-template-fields.tsx:797
#: packages/ui/primitives/template-flow/add-template-fields.tsx:798
msgid "Save Template"
msgstr "Vorlage speichern"

Expand Down Expand Up @@ -552,7 +552,7 @@ msgstr "Unterschreiben"
#: packages/ui/primitives/document-flow/add-fields.tsx:724
#: packages/ui/primitives/document-flow/add-signature.tsx:323
#: packages/ui/primitives/document-flow/field-icon.tsx:52
#: packages/ui/primitives/template-flow/add-template-fields.tsx:547
#: packages/ui/primitives/template-flow/add-template-fields.tsx:548
msgid "Signature"
msgstr "Unterschrift"

Expand Down Expand Up @@ -598,7 +598,7 @@ msgid "Template title"
msgstr "Vorlagentitel"

#: packages/ui/primitives/document-flow/add-fields.tsx:854
#: packages/ui/primitives/template-flow/add-template-fields.tsx:677
#: packages/ui/primitives/template-flow/add-template-fields.tsx:678
msgid "Text"
msgstr "Text"

Expand Down
28 changes: 14 additions & 14 deletions packages/lib/translations/en/common.po
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ msgid "Advanced Options"
msgstr "Advanced Options"

#: packages/ui/primitives/document-flow/add-fields.tsx:510
#: packages/ui/primitives/template-flow/add-template-fields.tsx:369
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
msgid "Advanced settings"
msgstr "Advanced settings"

Expand Down Expand Up @@ -162,7 +162,7 @@ msgid "Character Limit"
msgstr "Character Limit"

#: packages/ui/primitives/document-flow/add-fields.tsx:932
#: packages/ui/primitives/template-flow/add-template-fields.tsx:755
#: packages/ui/primitives/template-flow/add-template-fields.tsx:756
msgid "Checkbox"
msgstr "Checkbox"

Expand Down Expand Up @@ -191,7 +191,7 @@ msgid "Configure Direct Recipient"
msgstr "Configure Direct Recipient"

#: packages/ui/primitives/document-flow/add-fields.tsx:511
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
#: packages/ui/primitives/template-flow/add-template-fields.tsx:371
msgid "Configure the {0} field"
msgstr "Configure the {0} field"

Expand All @@ -208,7 +208,7 @@ msgid "Custom Text"
msgstr "Custom Text"

#: packages/ui/primitives/document-flow/add-fields.tsx:828
#: packages/ui/primitives/template-flow/add-template-fields.tsx:651
#: packages/ui/primitives/template-flow/add-template-fields.tsx:652
msgid "Date"
msgstr "Date"

Expand Down Expand Up @@ -240,7 +240,7 @@ msgid "Drag & drop your PDF here."
msgstr "Drag & drop your PDF here."

#: packages/ui/primitives/document-flow/add-fields.tsx:958
#: packages/ui/primitives/template-flow/add-template-fields.tsx:781
#: packages/ui/primitives/template-flow/add-template-fields.tsx:782
msgid "Dropdown"
msgstr "Dropdown"

Expand All @@ -252,7 +252,7 @@ msgstr "Dropdown options"
#: packages/ui/primitives/document-flow/add-signature.tsx:272
#: packages/ui/primitives/document-flow/add-signers.tsx:232
#: packages/ui/primitives/document-flow/add-signers.tsx:239
#: packages/ui/primitives/template-flow/add-template-fields.tsx:599
#: packages/ui/primitives/template-flow/add-template-fields.tsx:600
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:210
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:217
msgid "Email"
Expand Down Expand Up @@ -362,7 +362,7 @@ msgstr "Min"
#: packages/ui/primitives/document-flow/add-fields.tsx:802
#: packages/ui/primitives/document-flow/add-signature.tsx:298
#: packages/ui/primitives/document-flow/add-signers.tsx:265
#: packages/ui/primitives/template-flow/add-template-fields.tsx:625
#: packages/ui/primitives/template-flow/add-template-fields.tsx:626
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:245
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:251
msgid "Name"
Expand All @@ -381,12 +381,12 @@ msgid "Needs to view"
msgstr "Needs to view"

#: packages/ui/primitives/document-flow/add-fields.tsx:613
#: packages/ui/primitives/template-flow/add-template-fields.tsx:464
#: packages/ui/primitives/template-flow/add-template-fields.tsx:465
msgid "No recipient matching this description was found."
msgstr "No recipient matching this description was found."

#: packages/ui/primitives/document-flow/add-fields.tsx:629
#: packages/ui/primitives/template-flow/add-template-fields.tsx:480
#: packages/ui/primitives/template-flow/add-template-fields.tsx:481
msgid "No recipients with this role"
msgstr "No recipients with this role"

Expand All @@ -411,7 +411,7 @@ msgid "No value found."
msgstr "No value found."

#: packages/ui/primitives/document-flow/add-fields.tsx:880
#: packages/ui/primitives/template-flow/add-template-fields.tsx:703
#: packages/ui/primitives/template-flow/add-template-fields.tsx:704
msgid "Number"
msgstr "Number"

Expand Down Expand Up @@ -446,7 +446,7 @@ msgid "Placeholder"
msgstr "Placeholder"

#: packages/ui/primitives/document-flow/add-fields.tsx:906
#: packages/ui/primitives/template-flow/add-template-fields.tsx:729
#: packages/ui/primitives/template-flow/add-template-fields.tsx:730
msgid "Radio"
msgstr "Radio"

Expand Down Expand Up @@ -497,7 +497,7 @@ msgstr "Rows per page"
msgid "Save"
msgstr "Save"

#: packages/ui/primitives/template-flow/add-template-fields.tsx:797
#: packages/ui/primitives/template-flow/add-template-fields.tsx:798
msgid "Save Template"
msgstr "Save Template"

Expand Down Expand Up @@ -547,7 +547,7 @@ msgstr "Sign"
#: packages/ui/primitives/document-flow/add-fields.tsx:724
#: packages/ui/primitives/document-flow/add-signature.tsx:323
#: packages/ui/primitives/document-flow/field-icon.tsx:52
#: packages/ui/primitives/template-flow/add-template-fields.tsx:547
#: packages/ui/primitives/template-flow/add-template-fields.tsx:548
msgid "Signature"
msgstr "Signature"

Expand Down Expand Up @@ -593,7 +593,7 @@ msgid "Template title"
msgstr "Template title"

#: packages/ui/primitives/document-flow/add-fields.tsx:854
#: packages/ui/primitives/template-flow/add-template-fields.tsx:677
#: packages/ui/primitives/template-flow/add-template-fields.tsx:678
msgid "Text"
msgstr "Text"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const AddTemplateFieldsFormPartial = ({
recipients.find((recipient) => recipient.id === field.recipientId)?.email ?? '',
signerToken:
recipients.find((recipient) => recipient.id === field.recipientId)?.token ?? '',
fieldMeta: field.fieldMeta ? ZFieldMetaSchema.parse(field.fieldMeta) : undefined,
})),
},
});
Expand Down

0 comments on commit ad4cff9

Please sign in to comment.