diff --git a/apps/mana/apps/web/src/lib/i18n/locales/forms/de.json b/apps/mana/apps/web/src/lib/i18n/locales/forms/de.json index eeb5ea9fe..b360ba57a 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/forms/de.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/forms/de.json @@ -23,5 +23,53 @@ "draft": "Entwurf", "published": "Veröffentlicht", "closed": "Geschlossen" + }, + "builder": { + "routeTitle": "Formular bearbeiten", + "loading": "Lade ...", + "notFound": "Formular nicht gefunden.", + "backLink": "← Zurück zur Liste", + "back": "← Zurück", + "delete": "Löschen", + "deleteConfirm": "Formular \"{title}\" wirklich löschen?", + "statusGroupAria": "Status", + "titlePlaceholder": "Formular-Titel", + "titleAria": "Formular-Titel", + "descriptionPlaceholder": "Beschreibung (optional)", + "fields": { + "title": "Felder", + "count": "{n} Felder", + "empty": "Noch keine Felder. Wähle unten einen Typ." + }, + "palette": { + "title": "Feld hinzufügen" + }, + "field": { + "labelPlaceholder": "Feldfrage ...", + "labelAria": "Feldlabel", + "removeAria": "Feld löschen", + "required": "Pflichtfeld", + "lessOptions": "− weniger", + "moreOptions": "+ mehr", + "helpPlaceholder": "Hilfetext (optional)", + "options": "Optionen", + "optionPlaceholder": "Option ...", + "optionRemoveAria": "Option löschen", + "addOption": "+ Option hinzufügen", + "ratingScale": "Skala", + "scale5": "1–5", + "scale10": "1–10", + "min": "Minimum", + "max": "Maximum", + "maxLength": "Max. Länge" + }, + "settings": { + "title": "Einstellungen", + "submitLabel": "Beschriftung Absenden-Button", + "successMessage": "Bestätigungstext nach Absenden", + "requireEmail": "E-Mail-Adresse vom Absender abfragen", + "allowMultiple": "Mehrere Antworten pro Person erlauben", + "anonymous": "Anonym — Submitter-Daten nicht speichern" + } } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/forms/en.json b/apps/mana/apps/web/src/lib/i18n/locales/forms/en.json index 43e96a4e7..c25918e2f 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/forms/en.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/forms/en.json @@ -23,5 +23,53 @@ "draft": "Draft", "published": "Published", "closed": "Closed" + }, + "builder": { + "routeTitle": "Edit form", + "loading": "Loading ...", + "notFound": "Form not found.", + "backLink": "← Back to list", + "back": "← Back", + "delete": "Delete", + "deleteConfirm": "Really delete form \"{title}\"?", + "statusGroupAria": "Status", + "titlePlaceholder": "Form title", + "titleAria": "Form title", + "descriptionPlaceholder": "Description (optional)", + "fields": { + "title": "Fields", + "count": "{n} fields", + "empty": "No fields yet. Pick a type below." + }, + "palette": { + "title": "Add field" + }, + "field": { + "labelPlaceholder": "Field question ...", + "labelAria": "Field label", + "removeAria": "Delete field", + "required": "Required", + "lessOptions": "− less", + "moreOptions": "+ more", + "helpPlaceholder": "Help text (optional)", + "options": "Options", + "optionPlaceholder": "Option ...", + "optionRemoveAria": "Delete option", + "addOption": "+ Add option", + "ratingScale": "Scale", + "scale5": "1–5", + "scale10": "1–10", + "min": "Minimum", + "max": "Maximum", + "maxLength": "Max length" + }, + "settings": { + "title": "Settings", + "submitLabel": "Submit button label", + "successMessage": "Confirmation text after submit", + "requireEmail": "Ask submitter for email address", + "allowMultiple": "Allow multiple submissions per person", + "anonymous": "Anonymous — don't store submitter data" + } } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/forms/es.json b/apps/mana/apps/web/src/lib/i18n/locales/forms/es.json index c3dfe4c90..ea259ea2a 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/forms/es.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/forms/es.json @@ -23,5 +23,53 @@ "draft": "Borrador", "published": "Publicado", "closed": "Cerrado" + }, + "builder": { + "routeTitle": "Editar formulario", + "loading": "Cargando ...", + "notFound": "Formulario no encontrado.", + "backLink": "← Volver a la lista", + "back": "← Atrás", + "delete": "Eliminar", + "deleteConfirm": "¿Eliminar el formulario \"{title}\"?", + "statusGroupAria": "Estado", + "titlePlaceholder": "Título del formulario", + "titleAria": "Título del formulario", + "descriptionPlaceholder": "Descripción (opcional)", + "fields": { + "title": "Campos", + "count": "{n} campos", + "empty": "Aún sin campos. Elige un tipo abajo." + }, + "palette": { + "title": "Añadir campo" + }, + "field": { + "labelPlaceholder": "Pregunta del campo ...", + "labelAria": "Etiqueta del campo", + "removeAria": "Eliminar campo", + "required": "Obligatorio", + "lessOptions": "− menos", + "moreOptions": "+ más", + "helpPlaceholder": "Texto de ayuda (opcional)", + "options": "Opciones", + "optionPlaceholder": "Opción ...", + "optionRemoveAria": "Eliminar opción", + "addOption": "+ Añadir opción", + "ratingScale": "Escala", + "scale5": "1–5", + "scale10": "1–10", + "min": "Mínimo", + "max": "Máximo", + "maxLength": "Longitud máx." + }, + "settings": { + "title": "Ajustes", + "submitLabel": "Texto del botón de envío", + "successMessage": "Mensaje de confirmación tras el envío", + "requireEmail": "Pedir correo electrónico al remitente", + "allowMultiple": "Permitir varias respuestas por persona", + "anonymous": "Anónimo — no guardar datos del remitente" + } } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/forms/fr.json b/apps/mana/apps/web/src/lib/i18n/locales/forms/fr.json index 990967e05..09885ab29 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/forms/fr.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/forms/fr.json @@ -23,5 +23,53 @@ "draft": "Brouillon", "published": "Publié", "closed": "Clôturé" + }, + "builder": { + "routeTitle": "Modifier le formulaire", + "loading": "Chargement ...", + "notFound": "Formulaire introuvable.", + "backLink": "← Retour à la liste", + "back": "← Retour", + "delete": "Supprimer", + "deleteConfirm": "Vraiment supprimer le formulaire \"{title}\" ?", + "statusGroupAria": "Statut", + "titlePlaceholder": "Titre du formulaire", + "titleAria": "Titre du formulaire", + "descriptionPlaceholder": "Description (facultatif)", + "fields": { + "title": "Champs", + "count": "{n} champs", + "empty": "Pas encore de champs. Choisis un type ci-dessous." + }, + "palette": { + "title": "Ajouter un champ" + }, + "field": { + "labelPlaceholder": "Question du champ ...", + "labelAria": "Libellé du champ", + "removeAria": "Supprimer le champ", + "required": "Obligatoire", + "lessOptions": "− moins", + "moreOptions": "+ plus", + "helpPlaceholder": "Texte d'aide (facultatif)", + "options": "Options", + "optionPlaceholder": "Option ...", + "optionRemoveAria": "Supprimer l'option", + "addOption": "+ Ajouter une option", + "ratingScale": "Échelle", + "scale5": "1–5", + "scale10": "1–10", + "min": "Minimum", + "max": "Maximum", + "maxLength": "Longueur max." + }, + "settings": { + "title": "Paramètres", + "submitLabel": "Libellé du bouton d'envoi", + "successMessage": "Message de confirmation après envoi", + "requireEmail": "Demander l'adresse e-mail au destinataire", + "allowMultiple": "Autoriser plusieurs réponses par personne", + "anonymous": "Anonyme — ne pas conserver les données du destinataire" + } } } diff --git a/apps/mana/apps/web/src/lib/i18n/locales/forms/it.json b/apps/mana/apps/web/src/lib/i18n/locales/forms/it.json index bdc6d3194..62b3dca95 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/forms/it.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/forms/it.json @@ -23,5 +23,53 @@ "draft": "Bozza", "published": "Pubblicato", "closed": "Chiuso" + }, + "builder": { + "routeTitle": "Modifica modulo", + "loading": "Caricamento ...", + "notFound": "Modulo non trovato.", + "backLink": "← Torna alla lista", + "back": "← Indietro", + "delete": "Elimina", + "deleteConfirm": "Eliminare davvero il modulo \"{title}\"?", + "statusGroupAria": "Stato", + "titlePlaceholder": "Titolo del modulo", + "titleAria": "Titolo del modulo", + "descriptionPlaceholder": "Descrizione (facoltativa)", + "fields": { + "title": "Campi", + "count": "{n} campi", + "empty": "Ancora nessun campo. Scegli un tipo sotto." + }, + "palette": { + "title": "Aggiungi campo" + }, + "field": { + "labelPlaceholder": "Domanda del campo ...", + "labelAria": "Etichetta del campo", + "removeAria": "Elimina campo", + "required": "Obbligatorio", + "lessOptions": "− meno", + "moreOptions": "+ altro", + "helpPlaceholder": "Testo di aiuto (facoltativo)", + "options": "Opzioni", + "optionPlaceholder": "Opzione ...", + "optionRemoveAria": "Elimina opzione", + "addOption": "+ Aggiungi opzione", + "ratingScale": "Scala", + "scale5": "1–5", + "scale10": "1–10", + "min": "Minimo", + "max": "Massimo", + "maxLength": "Lunghezza max." + }, + "settings": { + "title": "Impostazioni", + "submitLabel": "Testo del pulsante di invio", + "successMessage": "Messaggio di conferma dopo l'invio", + "requireEmail": "Chiedi l'indirizzo e-mail al mittente", + "allowMultiple": "Permetti più risposte per persona", + "anonymous": "Anonimo — non memorizzare i dati del mittente" + } } } diff --git a/apps/mana/apps/web/src/lib/modules/forms/components/FieldEditor.svelte b/apps/mana/apps/web/src/lib/modules/forms/components/FieldEditor.svelte new file mode 100644 index 000000000..ee522f43c --- /dev/null +++ b/apps/mana/apps/web/src/lib/modules/forms/components/FieldEditor.svelte @@ -0,0 +1,411 @@ + + + +
+ {$_('forms.builder.palette.title', { default: 'Feld hinzufügen' })} +
++ {$_('forms.builder.settings.title', { default: 'Einstellungen' })} +
+ + + + + + + + + + ++ {$_('forms.builder.fields.empty', { + default: 'Noch keine Felder. Wähle unten einen Typ.', + })} +
+ {:else} +{$_('forms.builder.loading', { default: 'Lade ...' })}
+ {:else if !entry} +{$_('forms.builder.notFound', { default: 'Formular nicht gefunden.' })}
+ {$_('forms.builder.backLink', { default: '← Zurück zur Liste' })} +