diff --git a/src/Entity/CommunityResource.php b/src/Entity/CommunityResource.php index 9241f11..e73cbb0 100644 --- a/src/Entity/CommunityResource.php +++ b/src/Entity/CommunityResource.php @@ -104,9 +104,8 @@ class CommunityResource private array $type = []; public function __construct( - private DateTime $today + private DateTime $today = new DateTime('now', new DateTimeZone('America/New_York')) ) { - $this->today = new DateTime('now', new DateTimeZone('America/New_York')); } public function getId(): ?Uuid diff --git a/src/Form/ResourceFormType.php b/src/Form/ResourceFormType.php index 5c50e31..e3c8e92 100644 --- a/src/Form/ResourceFormType.php +++ b/src/Form/ResourceFormType.php @@ -4,6 +4,7 @@ namespace App\Form; use App\Entity\CommunityResource; use App\Enums\County; +use App\Enums\ResourceType; use App\Enums\State; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\EmailType; @@ -83,6 +84,12 @@ class ResourceFormType extends AbstractType 'widget' => 'single_text', ]) ->add('notes') + ->add('type', EnumType::class, [ + 'class' => ResourceType::class, + 'expanded' => true, + 'multiple' => true, + + ]) ->add('servicesAvailable') ; } diff --git a/templates/internal/community_resource/add.html.twig b/templates/internal/community_resource/add.html.twig index 51bf6f0..bafe5f9 100644 --- a/templates/internal/community_resource/add.html.twig +++ b/templates/internal/community_resource/add.html.twig @@ -88,6 +88,10 @@ + +