Remove the label if there is only one scope and no scope picking field is displayed.

This commit is contained in:
2025-11-17 10:48:15 +00:00
parent 04bc1c5de8
commit a43181d60d
9 changed files with 65 additions and 34 deletions

View File

@@ -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,
]);
}

View File

@@ -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>

View File

@@ -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>