<?php

namespace App\Form;

use App\Entity\Assetdisposal;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class AssetdisposalType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('disposaldate', DateType::class, [
                'attr' => ['class' => 'form-control',
                'style' => 'line-height:20px;'],
                'widget' => 'single_text',
                'empty_data' => null,    
                'label' => 'Disposal Date*',                            
                ])
            ->add('disposalamount', NumberType::class, [
                'attr' => ['class' => 'form-control'], 
                'label' => 'Disposal Amount*',                                 
                ])
            ->add('remarks',TextType::class, [       
                'attr' => ['class' => 'form-control'],  
                'required' => false,              
            ])
          //  ->add('sellamount')            
          //  ->add('type')
          //  ->add('status')
           // ->add('assetregister')
        ;
    }

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