<%= errors_summary_for @user %> <%= bootstrap_form_with model: @user, url: profile_path, local: true do |form| %>
<% if @user.avatar.attached? %> <%= image_tag(profile_variant(@user.avatar), class: "rounded-circle", alt: "User Avatar") %> <% else %> <%= text_avatar(@user, size: 6.25) %> <% end %>

<% # TODO: Use null object pattern %> <% if Current.account %> <%= @user.role_for(Current.account).to_s.titleize %> <% end %>

<%= form.file_field :avatar, accept: "image/*", direct_upload: true %> <%= form.text_field :first_name %> <%= form.text_field :last_name %> <%= form.time_zone_select :time_zone, nil, {default: @user.time_zone}, class: "form-control custom-select" %>
<%= form.submit t("profiles.form.submit"), class: "btn btn-block btn-primary", data: { disable_with: t("shared.disable_with") } %>
<% end %>