create new person: add an action and put action buttons in a dropdown

This commit is contained in:
2021-08-27 09:30:15 +02:00
parent 34df295801
commit 52a0c0e95b
3 changed files with 26 additions and 7 deletions

View File

@@ -76,12 +76,28 @@
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
<div style="display: none">
{# TODO remove this field (vendee) #}
{{ form_row(form.center, { 'label' : 'Center'|trans }) }}
</div>
<ul class="record_actions sticky-form-buttons">
<li>
{{ form_widget(form.editPerson, { 'attr': { 'class': 'btn btn-create' }}) }}
</li>
<li>
{{ form_widget(form.createPeriod, { 'attr': { 'class': 'btn btn-create' }}) }}
<li class="dropdown">
<a class="btn btn-create dropdown-toggle"
href="#" role="button" id="newPersonMore" data-bs-toggle="dropdown" aria-expanded="false">
{{ 'Add the person'|trans }}
</a>
<ul class="dropdown-menu" aria-labelledby="newPersonMore">
<li>
{{ form_widget(form.editPerson, { 'attr': { 'class': 'dropdown-item' }}) }}
</li>
<li>
{{ form_widget(form.createPeriod, { 'attr': { 'class': 'dropdown-item' }}) }}
</li>
<li>
{{ form_widget(form.createHousehold, { 'attr': { 'class': 'dropdown-item' }}) }}
</li>
</ul>
</li>
</ul>