+
+ <%= 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 %>
- <%= icon_tag "minus" %>
- Delete avatar
- <% end %>
+ <% 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 %>
+ <%= icon_tag "minus" %>
+ Delete avatar
<% end %>
-
+ <% end %>
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
- <%= link_to "Cancel and go back", user_path(@user), data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
- <% end %>
+ <%= 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" %>
-
+ <%= form_with url: user_avatar_url(@user), method: :delete, id: "avatar-delete-form" %>