<commit_before><?php

namespace Sistema\Bundle\FrontendBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Sistema\Bundle\FrontendBundle\Repository\UnidadMedidaRepository;

class RecepcionMaterialType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('boleta_recepcion', 'boleta_recepcion_selector' , ['attr' => ['class'=> 'inputText', 'readonly' => true ] ])
            ->add('material', null, [ 'required' => true ])
            ->add('unidad_medida', 'entity', [ 'class' => 'FrontendBundle:UnidadMedida',
                'property' => 'nombre',
                'query_builder' => function(UnidadMedidaRepository $unidadMedidaRepository) {
                    return $unidadMedidaRepository->getUnidadMedidaTonelada();
                },
                'attr' => [ 'readonly' => true ],
                'required' => true ] )
            ->add('fecha_ingreso', 'date', ['widget' => 'single_text'])
            ->add('cantidad', 'text', ['attr' => ['class'=> 'inputText', 'readonly' => true ] ])
            ->add('accion', 'hidden', ['mapped' => false, 'data' => ''])
            ->add('recepcion_material', 'hidden', ['mapped' => false, 'data' => ''])
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Sistema\Bundle\FrontendBundle\Entity\RecepcionMaterial'
        ));
    }

    public function getName()
    {
        return 'sistema_bundle_frontendbundle_recepcionmaterialtype';
    }
}<commit_msg>Unidad de Medida Tonelada close #4<commit_after><?php

namespace Sistema\Bundle\FrontendBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Sistema\Bundle\FrontendBundle\Repository\UnidadMedidaRepository;

class RecepcionMaterialType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('boleta_recepcion', 'boleta_recepcion_selector' , ['attr' => ['class'=> 'inputText', 'readonly' => true ] ])
            ->add('material', null, [ 'required' => true ])
            ->add('unidad_medida', 'entity', [ 'class' => 'FrontendBundle:UnidadMedida',
                'property' => 'nombre',
                'query_builder' => function(UnidadMedidaRepository $unidadMedidaRepository) {
                    return $unidadMedidaRepository->getUnidadMedidaTonelada();
                },
                'attr' => [ 'readonly' => true ],
                'required' => true ] 
                )
            ->add('fecha_ingreso', 'date', ['widget' => 'single_text'])
            ->add('cantidad', 'text', ['attr' => ['class'=> 'inputText', 'readonly' => true ] ])
            ->add('accion', 'hidden', ['mapped' => false, 'data' => ''])
            ->add('recepcion_material', 'hidden', ['mapped' => false, 'data' => ''])
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Sistema\Bundle\FrontendBundle\Entity\RecepcionMaterial'
        ));
    }

    public function getName()
    {
        return 'sistema_bundle_frontendbundle_recepcionmaterialtype';
    }
}
{'fraction_non_alphanumeric': 0.1493432324386065, 'fraction_numerical': 0.00028555111364934324, 'mean_word_length': 2.967157417893545, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2891916', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1017, 'n_words': 169}