diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 7540d4872..9606250e6 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -31,7 +31,6 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Chill\MainBundle\Form\Type\UserPickerType; use Chill\MainBundle\Form\Type\ScopePickerType; use Chill\MainBundle\Form\Type\ChillDateType; - use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\CallbackTransformer; use Chill\PersonBundle\Form\DataTransformer\PersonToIdTransformer; @@ -104,7 +103,7 @@ class ActivityType extends AbstractType if ($options['accompanyingPeriod']) { $accompanyingPeriod = $options['accompanyingPeriod']; } - +dump($options['data']->getType()); if ($activityType->isVisible('socialIssues') && $accompanyingPeriod) { $builder->add('socialIssues', EntityType::class, [ 'label' => $activityType->getLabel('socialIssues'), @@ -255,6 +254,8 @@ class ActivityType extends AbstractType 'label' => $activityType->getLabel('documents'), 'required' => $activityType->isRequired('documents'), 'allow_add' => true, + 'button_add_label' => 'activity.Insert a document', + 'button_remove_label' => 'activity.Remove a document' ]); } diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php index 402df733b..71d465b6c 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -34,7 +34,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface { $period = $parameters['accompanyingCourse']; - $menu->addChild($this->translator->trans('List of activities'), [ + $menu->addChild($this->translator->trans('Activity list'), [ 'route' => 'chill_activity_activity_list', 'routeParameters' => [ 'accompanying_period_id' => $period->getId(), diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig index b8a389015..3024148e1 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/edit.html.twig @@ -19,12 +19,12 @@ {{ form_row(edit_form.scope) }} {% endif %} -{%- if form.socialActions is defined -%} - {{ form_row(form.socialActions) }} +{%- if edit_form.socialActions is defined -%} + {{ form_row(edit_form.socialActions) }} {% endif %} -{%- if form.socialIssues is defined -%} - {{ form_row(form.socialIssues) }} +{%- if edit_form.socialIssues is defined -%} + {{ form_row(edit_form.socialIssues) }} {% endif %} {%- if edit_form.reasons is defined -%} @@ -86,7 +86,6 @@ {% set accompanying_course_id = accompanyingCourse.id %} {% endif %} -{{ form_widget(edit_form) }}