mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-14 13:21:25 +00:00
Remove the label if there is only one scope and no scope picking field is displayed.
This commit is contained in:
@@ -27,7 +27,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class SingleTaskType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {}
|
||||
public function __construct(
|
||||
private readonly ParameterBagInterface $parameterBag,
|
||||
private readonly CenterResolverDispatcherInterface $centerResolverDispatcher,
|
||||
private readonly ScopeResolverDispatcher $scopeResolverDispatcher,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
@@ -64,8 +68,8 @@ class SingleTaskType extends AbstractType
|
||||
if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) {
|
||||
$builder
|
||||
->add('circle', ScopePickerType::class, [
|
||||
'center' => $center,
|
||||
'role' => $options['role'],
|
||||
'subject' => $task,
|
||||
'required' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block title 'Tasks for {{ name }}'|trans({ '{{ name }}' : person|chill_entity_render_string }) %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl">
|
||||
<div class="task-list"">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl tasks">
|
||||
<div class="col-md-9 col-xxl tasks">
|
||||
{% include '@ChillTask/SingleTask/AccompanyingCourse/list.html.twig' %}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user