add scope type to report [transfer]

[ci skip]
This commit is contained in:
2015-06-23 21:36:02 +02:00
parent 4d2b3f2a61
commit c75ba202b4
2 changed files with 23 additions and 13 deletions

View File

@@ -39,9 +39,10 @@ class ReportType extends AbstractType
->add('user')
->add('date', 'date',
array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
//->add('scope')
->add('scope', 'scope')
->add('cFData', 'custom_field',
array('attr' => array('class' => 'cf-fields'), 'group' => $options['cFGroup']))
array('attr' => array('class' => 'cf-fields'),
'group' => $options['cFGroup']))
;
}
@@ -57,11 +58,15 @@ class ReportType extends AbstractType
$resolver->setRequired(array(
'em',
'cFGroup',
'role',
'center'
));
$resolver->setAllowedTypes(array(
'em' => 'Doctrine\Common\Persistence\ObjectManager',
'cFGroup' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup'
'cFGroup' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup',
'role' => 'Symfony\Component\Security\Core\Role\Role',
'center' => 'Chill\MainBundle\Entity\Center'
));
}