|
29 | 29 | {{ form_start(form) }}
|
30 | 30 | {{ component('editor_toolbar', {id: 'user_basic_about'}) }}
|
31 | 31 | {{ form_row(form.about, {label: false, attr: {
|
32 |
| - placeholder: 'about', |
33 |
| - 'data-controller': 'input-length rich-textarea autogrow', |
| 32 | + placeholder: 'about', |
| 33 | + 'data-controller': 'input-length rich-textarea autogrow', |
34 | 34 | 'data-entry-link-create-target': 'user_about',
|
35 | 35 | 'data-action' : 'input-length#updateDisplay',
|
36 | 36 | 'data-input-length-max-value' : constant('App\\DTO\\UserDto::MAX_ABOUT_LENGTH')
|
37 | 37 | }}) }}
|
38 | 38 | {{ form_row(form.username, {label: 'username', attr: {
|
39 |
| - 'data-controller': 'input-length autogrow', |
| 39 | + 'data-controller': 'input-length autogrow', |
40 | 40 | 'data-entry-link-create-target': 'user_about',
|
41 | 41 | 'data-action' : 'input-length#updateDisplay',
|
42 | 42 | 'data-input-length-max-value' : constant('App\\DTO\\UserDto::MAX_USERNAME_LENGTH')
|
43 | 43 | }}) }}
|
44 | 44 | {{ form_row(form.avatar, {label: 'avatar'}) }}
|
| 45 | + {% if app.user.avatar is not same as null %} |
| 46 | + <div class="actions"> |
| 47 | + <ul style="width: 100%"> |
| 48 | + <img width="40" |
| 49 | + height="40" |
| 50 | + src="{{ asset(app.user.avatar.filePath)|imagine_filter('entry_thumb') }}" |
| 51 | + alt="{{ app.user.avatar.altText }}" /> |
| 52 | + <button formaction="{{ path('user_settings_avatar_delete') }}" |
| 53 | + class="btn-link" |
| 54 | + aria-label="{{ 'remove_user_avatar'|trans }}" |
| 55 | + title="{{ 'remove_user_avatar'|trans }}" |
| 56 | + data-action="confirmation#ask" data-confirmation-message-param="{{ 'are_you_sure'|trans }}"> |
| 57 | + <i class="fa-solid fa-xmark" aria-hidden="true"></i> |
| 58 | + </button> |
| 59 | + </ul> |
| 60 | + </div> |
| 61 | + {% endif %} |
45 | 62 | {{ form_row(form.cover, {label: 'cover'}) }}
|
| 63 | + {% if app.user.cover is not same as null %} |
| 64 | + <div class="actions"> |
| 65 | + <ul style="width: 100%"> |
| 66 | + <img width="40" |
| 67 | + height="40" |
| 68 | + src="{{ asset(app.user.cover.filePath)|imagine_filter('entry_thumb') }}" |
| 69 | + alt="{{ app.user.cover.altText }}" /> |
| 70 | + <button formaction="{{ path('user_settings_cover_delete') }}" |
| 71 | + class="btn-link" |
| 72 | + aria-label="{{ 'remove_user_cover'|trans }}" |
| 73 | + title="{{ 'remove_user_cover'|trans }}" |
| 74 | + data-action="confirmation#ask" data-confirmation-message-param="{{ 'are_you_sure'|trans }}"> |
| 75 | + <i class="fa-solid fa-xmark" aria-hidden="true"></i> |
| 76 | + </button> |
| 77 | + </ul> |
| 78 | + </div> |
| 79 | + {% endif %} |
46 | 80 | <div class="row actions">
|
47 | 81 | {{ form_row(form.submit, {label: 'save', attr: {class: 'btn btn__primary'}}) }}
|
48 | 82 | </div>
|
|
0 commit comments