mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
add ordoring field & Display Activity type by Category
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Chill\ActivityBundle\Form;
|
||||
|
||||
use Chill\ActivityBundle\Entity\ActivityTypeCategory;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
@@ -21,7 +22,12 @@ class ActivityTypeCategoryType extends AbstractType
|
||||
'No' => false
|
||||
),
|
||||
'expanded' => true
|
||||
));
|
||||
))
|
||||
->add('ordering', NumberType::class, [
|
||||
'required' => true,
|
||||
'scale' => 5
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
|
@@ -7,6 +7,7 @@ use Chill\ActivityBundle\Form\Type\ActivityFieldPresence;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
@@ -39,6 +40,10 @@ class ActivityTypeType extends AbstractType
|
||||
return $this->translatableStringHelper->localize($activityTypeCategory->getName());
|
||||
},
|
||||
])
|
||||
->add('ordering', NumberType::class, [
|
||||
'required' => true,
|
||||
'scale' => 5
|
||||
])
|
||||
;
|
||||
|
||||
$fields = [
|
||||
|
Reference in New Issue
Block a user