<?php

namespace App\Form;

use App\Entity\TourClaim;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;

class TourClaimType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder          
            ->add('startingDate', DateTimeType::class, [
                'attr' => ['class' => 'form-control',
                'style' => 'line-height:20px;'],
                'widget' => 'single_text',
                'empty_data' => null, 
                'label' => 'Actual tour starting date & time'                                              
                ])
            ->add('endingDate', DateTimeType::class, [
                'attr' => ['class' => 'form-control',
                'style' => 'line-height:20px;'],
                'widget' => 'single_text',
                'empty_data' => null, 
                'label' => 'Actual tour ending date & time'                                              
                ])
            ->add('tourDetails', TextareaType::class, [
                'attr' => ['class' => 'form-control',              
                    ],   
                'label' => 'Tour details: (please include the job reference number, additional pages can be included if necessary)',                                
                ])
                 
        ;
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => TourClaim::class,
        ]);
    }
}
