update add user with profile image upload and first draft of profile updating
This commit is contained in:
parent
edfe6936f5
commit
fe47746c1f
@ -83,6 +83,10 @@
|
||||
<label for='user_form_rate' class='form-label'>Rate</label>
|
||||
<input type='number' name='{{ field_name(form.rate) }}' id='user_form_rate' class='form-control' min='0' step='0.01'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='user_form_file' class='form-label'>Profile Image</label>
|
||||
<input type='file' name='{{ field_name(form.imageName) }}' id='user_form_file' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Add User</button>
|
||||
|
@ -8,5 +8,56 @@
|
||||
|
||||
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
|
||||
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ form_errors(form) }}
|
||||
<div class='container'>
|
||||
<div class='row'>
|
||||
<div class='col' id='profile-image'>
|
||||
<input type='hidden' name='id' value='{{ currentUser.id }}'/>
|
||||
<img class='profile-image' src='{% if currentUser.imageName %}/uploads/user_images/{{ currentUser.imageName }}{% endif %}'/>
|
||||
|
||||
{{ form_row(form.imageName) }}
|
||||
</div>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='profile_form_name' class='form-label'>Name</label>
|
||||
<input type='text' name='{{ field_name(form.name) }}' id='profile_form_name' class='form-control' value='{{ currentUser.name }}'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='profile_form_email' class='form-label'>Email</label>
|
||||
<input type='email' name='{{ field_name(form.email) }}' id='profile_form_email' class='form-control' value='{{ currentUser.email }}'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='profile_form_password' class='form-label'>Password</label>
|
||||
<input type='password' name='{{ field_name(form.password.first) }}' id='profile_form_password' class='form-control' autocomplete='new-password'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='profile_form_confirmPassword' class='form-label'>Confirm Password</label>
|
||||
<input type='password' name='{{ field_name(form.password.second) }}' id='profile_form_confirmPassword' class='form-control' autocomplete='new-password'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col text-center'>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
{{ form_row(form.submit) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_css %}
|
||||
<style rel='stylesheet'>
|
||||
.profile-image {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user