2022-11-01 14:57:36 +01:00
|
|
|
{% extends '@default/base.html.twig' %}
|
2022-04-11 16:05:12 +02:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Profile of {{ user.username }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
|
|
|
|
<div class="container box rounded bg-dark mt-5 mb-5">
|
2022-11-10 13:48:29 +01:00
|
|
|
|
2022-04-11 16:05:12 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 border-right">
|
|
|
|
<div class="d-flex flex-column align-items-center text-center p-3 py-5">
|
2022-11-10 13:48:29 +01:00
|
|
|
{% if user.avatar is not null %}
|
|
|
|
<img class="rounded-circle mt-5 mb-4"
|
|
|
|
src="{{ avatar_asset(user.avatar)|imagine_filter('squared_thumbnail_small') }}"
|
|
|
|
alt="profile image"/>
|
|
|
|
{% endif %}
|
|
|
|
{# {{ form_row(userForm.avatarName, { 'label': false }) }} #}
|
|
|
|
<form
|
|
|
|
action="{{ path('user_upload_avatar', { id: user.id}) }}"
|
|
|
|
method="POST"
|
|
|
|
enctype="multipart/form-data"
|
|
|
|
class="dropzone" id="dropzoneForm">
|
|
|
|
</form>
|
|
|
|
<div id="preview-content">{{ avatar_asset(user.avatar)|imagine_filter('squared_thumbnail_small') }}</div>
|
2022-04-11 16:05:12 +02:00
|
|
|
<span class="font-weight-bold">{{ user.username }}</span>
|
2022-11-05 17:18:04 +01:00
|
|
|
<span class="text-white-50"><span class="fa fa-lg fa-envelope me-1"></span>{{ user.email }}</span>
|
2022-04-11 16:05:12 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-10 13:48:29 +01:00
|
|
|
<div class="col-md-8 border-right">
|
2022-04-11 16:05:12 +02:00
|
|
|
<div class="p-3 py-5">
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
|
|
<h4 class="text-right">User Profile</h4>
|
|
|
|
</div>
|
|
|
|
<div class="row mt-2">
|
2022-11-10 13:48:29 +01:00
|
|
|
{{ form_start(userForm) }}
|
2022-11-01 14:57:36 +01:00
|
|
|
{{ form_row(userForm.username) }}
|
|
|
|
{{ form_row(userForm.firstName) }}
|
|
|
|
{{ form_row(userForm.lastName) }}
|
|
|
|
{{ form_row(userForm.email) }}
|
|
|
|
{{ form_row(userForm.newPassword.first) }}
|
|
|
|
{{ form_row(userForm.newPassword.second) }}
|
2022-11-10 13:48:29 +01:00
|
|
|
{{ form_rest(userForm) }}
|
|
|
|
{{ form_end(userForm) }}
|
2022-04-11 16:05:12 +02:00
|
|
|
</div>
|
2022-11-01 14:57:36 +01:00
|
|
|
<div class="mb-5 text-center float-end">
|
|
|
|
<button class="btn btn-primary profile-button" type="submit">Save Profile</button>
|
2022-04-11 16:05:12 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|