From 9c6e8b368ca35de58a968db8601a481b48aa770e Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Fri, 3 Jan 2025 04:50:15 +0200 Subject: [PATCH] Events v2: add FILE input (#348) --- src/client-config.js | 1 + src/client-config.prod.js | 1 + src/form/tennis-club-membership.ts | 30 ++++++++++++++++++++---------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/client-config.js b/src/client-config.js index 19aa2a2d5..d423e7c05 100644 --- a/src/client-config.js +++ b/src/client-config.js @@ -14,6 +14,7 @@ window.config = { LOGIN_URL: 'http://localhost:3020', AUTH_URL: 'http://localhost:7070/auth/', MINIO_BUCKET: 'ocrvs', + MINIO_URL: 'http://localhost:3535/ocrvs/', COUNTRY_CONFIG_URL: 'http://localhost:3040', // Country code in uppercase ALPHA-3 format COUNTRY: 'FAR', diff --git a/src/client-config.prod.js b/src/client-config.prod.js index 7b5e597bf..6735e1529 100644 --- a/src/client-config.prod.js +++ b/src/client-config.prod.js @@ -13,6 +13,7 @@ window.config = { CONFIG_API_URL: 'https://config.{{hostname}}', LOGIN_URL: 'https://login.{{hostname}}', AUTH_URL: 'https://gateway.{{hostname}}/auth/', + MINIO_URL: 'https://minio.{{hostname}}/ocrvs/', MINIO_BUCKET: 'ocrvs', COUNTRY_CONFIG_URL: 'https://countryconfig.{{hostname}}', // Country code in uppercase ALPHA-3 format diff --git a/src/form/tennis-club-membership.ts b/src/form/tennis-club-membership.ts index efb0ec55d..a25cedbee 100644 --- a/src/form/tennis-club-membership.ts +++ b/src/form/tennis-club-membership.ts @@ -90,17 +90,27 @@ const TENNIS_CLUB_FORM = defineForm({ description: 'This is the label for the field', id: 'event.tennis-club-membership.action.declare.form.section.who.field.dob.label' } + }, + { + id: 'applicant.image', + type: 'FILE', + required: false, + label: { + defaultMessage: "Applicant's profile picture", + description: 'This is the label for the field', + id: 'event.tennis-club-membership.action.declare.form.section.who.field.image.label' + } + }, + { + id: 'applicant.image.label', + type: 'TEXT', + required: false, + label: { + defaultMessage: "Applicant's profile picture description", + description: 'This is the label for the field', + id: 'event.tennis-club-membership.action.declare.form.section.who.field.image.label' + } } - // { - // id: 'applicant.image', - // type: 'FILE', - // required: false, - // label: { - // defaultMessage: "Applicant's profile picture", - // description: 'This is the label for the field', - // id: 'event.tennis-club-membership.action.declare.form.section.who.field.image.label' - // } - // } ] }, {