Allow a user to change and remove his profile picture from user settings.

This commit is contained in:
Jan Böhmer 2023-01-25 00:10:17 +01:00
parent 04b99cd247
commit 0063d360ce
4 changed files with 60 additions and 1 deletions

View file

@ -25,6 +25,15 @@
{{ form_row(settings_form.last_name) }}
{{ form_row(settings_form.department) }}
{{ form_row(settings_form.email) }}
{{ form_row(settings_form.avatar_file) }}
<div class="mb-3 row {% if user.masterPictureAttachment is null %}d-none{% endif %}">
<div class="offset-sm-3 col-sm-9">
{% if user.masterPictureAttachment %}
<img src="{{ attachment_thumbnail(user.masterPictureAttachment, 'thumbnail_md') }}" alt="avatar" class="rounded" style="height: 75px;">
{% endif %}
{{ form_widget(settings_form.remove_avatar) }}
</div>
</div>
</div>
<div class="tab-pane fade" id="configuration" role="tabpanel" aria-labelledby="profile-tab">
{{ form_row(settings_form.language) }}