Merge pull request #17 from Apes-HDF/chore/sync-les-tilleuls

repo sync: profile fields fixes
This commit is contained in:
Paul Andrieux 2025-08-25 16:32:45 +02:00 committed by GitHub
commit f7b34484e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 19 deletions

View file

@ -5,12 +5,18 @@ on:
push:
branches:
- main
workflow_dispatch:
tags:
- '*'
pull_request:
types: [ opened, reopened, synchronize, labeled ]
workflow_dispatch: ~
permissions:
pull-requests: write
id-token: write
contents: read
packages: write
jobs:
# remove-deploy-label:
# name: Remove deploy label

View file

@ -4,8 +4,8 @@
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG PHP_VERSION=8.1
ARG CADDY_VERSION=2.9.1
ARG PHP_VERSION=8.1.32
ARG CADDY_VERSION=2.10.0
# yarn build
FROM gmolaire/yarn AS yarn_build
@ -185,6 +185,11 @@ RUN rm -f .env.local.php
# Build Caddy with the Mercure and Vulcain modules
FROM caddy:${CADDY_VERSION}-builder-alpine AS app_caddy_builder
# Temporary fix for https://github.com/dunglas/mercure/issues/770
# https://github.com/dunglas/symfony-docker/pull/407/files
# FROM caddy:2.9.1-builder-alpine AS app_caddy_builder
# RUN xcaddy build \
# --with github.com/dunglas/mercure \
# --with github.com/dunglas/mercure/caddy \

View file

@ -61,6 +61,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, ImageIn
private const EMAIL_MAX_LENGTH = 180;
private const NAME_LENGTH = 180;
private const DESCRIPTION_LENGTH = 255;
private const PHONE_LENGTH = 15;
private const SCHEDULE_LENGTH = 180;
@ -241,6 +242,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, ImageIn
* User's description.
*/
#[ORM\Column(type: 'string', nullable: true, )]
#[Assert\Length(max: self::DESCRIPTION_LENGTH)]
private ?string $description = null;
/**

View file

@ -61,6 +61,22 @@ final class EditProfileFormType extends AbstractType
->add('submit', SubmitType::class, [
'label' => self::I18N_PREFIX.'.submit',
'attr' => ['class' => 'btn-sm btn-primary'],
])
->add('category', EntityType::class, [
'class' => Category::class,
'query_builder' => fn (CategoryRepository $er) => $er->getHierarchy(),
'group_by' => fn (Category $category) => $this->translator->trans(self::I18N_PREFIX.'.'.$category->getType()->value),
'label' => self::I18N_PREFIX.'.category',
'label_attr' => ['class' => 'text-black fs-6 fw-normal'],
'choice_label' => 'getNameWithIndent',
'expanded' => false,
'required' => false,
])
->add('description', TextareaType::class, [
'label' => self::I18N_PREFIX.'.description',
'label_attr' => ['class' => 'text-black fs-6 fw-normal'],
'attr' => ['style' => 'height: 120px'],
'required' => false,
]);
if ($user->isPlace()) {
@ -93,22 +109,6 @@ final class EditProfileFormType extends AbstractType
'attr' => [
'class' => 'form-control-sm',
],
])
->add('category', EntityType::class, [
'class' => Category::class,
'query_builder' => fn (CategoryRepository $er) => $er->getHierarchy(),
'group_by' => fn (Category $category) => $this->translator->trans(self::I18N_PREFIX.'.'.$category->getType()->value),
'label' => self::I18N_PREFIX.'.category',
'label_attr' => ['class' => 'text-black fs-6 fw-normal'],
'choice_label' => 'getNameWithIndent',
'expanded' => false,
'required' => false,
])
->add('description', TextareaType::class, [
'label' => self::I18N_PREFIX.'.description',
'label_attr' => ['class' => 'text-black fs-6 fw-normal'],
'attr' => ['style' => 'height: 120px'],
'required' => false,
]);
}