<%= form_with model: @user, method: :patch, class: "flex flex-column gap", data: { controller: "form upload-preview" } do |form| %>
<% if @user.avatar.attached? %>
<%= tag.button type: :submit, form: "avatar-delete-form", class: "btn btn--negative txt-small", data: { turbo_confirm: "Are you sure you want to remove your avatar? This can't be undone." } do %>
<%= image_tag "minus.svg", aria: { hidden: "true" }, size: 20 %>
Delete avatar
<% end %>
<% end %>
<%= translation_button :user_name %>
<%= translation_button :email_address %>
<%= translation_button :password %>
<%= link_to "Cancel and go back", user_path(@user), data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
<% end %>
<%= form_with url: user_avatar_url(@user), method: :delete, id: "avatar-delete-form" %>