Allow users (and admins) to decide whether their email should be shown on their public profile

This commit is contained in:
Jan Böhmer 2023-04-08 19:53:05 +02:00
parent 71b0c2d83e
commit 5b5e8a4fd5
8 changed files with 104 additions and 3 deletions

View file

@ -21,6 +21,7 @@
{{ form_row(form.first_name) }}
{{ form_row(form.last_name) }}
{{ form_row(form.email) }}
{{ form_row(form.showEmailOnProfile) }}
{{ form_row(form.department) }}
{{ form_row(form.aboutMe) }}
{% endblock %}

View file

@ -29,8 +29,11 @@
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}user.email.label{% endtrans %}</label>
<div class="col-md-8">
{# <p class="form-control-plaintext">{{ user.email }}</p>#}
<a class="form-control-plaintext" href="mailto:{{ user.email }}">{{ user.email }}</a>
{% if user.showEmailOnProfile %}
<a class="form-control-plaintext" href="mailto:{{ user.email }}">{{ user.email }}</a>
{% else %}
<span class="form-control-plaintext text-muted">-</span>
{% endif %}
</div>
</div>
<div class="form-group row">

View file

@ -25,6 +25,7 @@
{{ form_row(settings_form.last_name) }}
{{ form_row(settings_form.department) }}
{{ form_row(settings_form.email) }}
{{ form_row(settings_form.showEmailOnProfile) }}
{{ 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">