<%= form_for([@user, @pseud], html: { multipart: true }) do |f| %>
<dl>
  <dt><%= f.label :name, t(".name") %></dt>
  <dd>
    <% if @pseud&.name == @user.login %>
      <p class="important informational"><%= @pseud.name %></p>
      <p class="footnote"><%= t(".cannot_change_matching_pseud_html", change_username_link: link_to(t(".change_username"), change_username_user_path(@user))) %></p>
    <% else %>
      <%= f.text_field :name, class: "observe_textlength", disabled: logged_in_as_admin? %>
      <%= generate_countdown_html("pseud_name", Pseud::NAME_LENGTH_MAX) %>
    <% end %>
  </dd>

  <dt><%= f.label :is_default, t(".make_default") %></dt>
  <dd><%= f.check_box :is_default, disabled: ((@pseud.name && @user.login == @pseud.name && @pseud.is_default?) || logged_in_as_admin?) %></dd>

  <dt><%= f.label :description, t(".description") %></dt>
  <dd>
    <p><%= allowed_html_instructions %></p>
    <%= f.text_area :description, class: "observe_textlength" %>
    <%= generate_countdown_html("pseud_description", Pseud::DESCRIPTION_MAX) %>
  </dd>

  <dt><%= t(".icon") %></dt>
  <dd>
    <ul class="notes">
      <% unless @pseud.new_record? %>
        <li><%= icon_display(@user, @pseud) %> <%= t(".icon_notes.current") %></li>
      <% end %>
      <li><%= t(".icon_notes.limit") %></li>
      <li><%= t(".icon_notes.format") %></li>
      <li><%= t(".icon_notes.size") %></li>
    </ul>
    <% if @pseud.icon.attached? %>
      <%= f.check_box :delete_icon, checked: false %>
      <%= f.label :delete_icon, t(".icon_delete") %>
    <% end %>
  </dd>

  <dt><%= f.label :icon, t(".icon_upload") %></dt>
  <dd><%= f.file_field :icon, disabled: logged_in_as_admin? %></dd>

  <dt>
    <%= f.label :icon_alt_text, t(".icon_alt") %>
    <%= link_to_help "icon-alt-text" %>
  </dt>
  <dd>
    <%= f.text_field :icon_alt_text, class: "observe_textlength", disabled: logged_in_as_admin? %>
    <%= generate_countdown_html("pseud_icon_alt_text", ArchiveConfig.ICON_ALT_MAX) %>
  </dd>

  <dt>
    <%= f.label :icon_comment_text, t(".icon_comment") %>
    <%= link_to_help("pseud-icon-comment") %>
  </dt>
  <dd>
    <%= f.text_field :icon_comment_text, class: "observe_textlength", disabled: logged_in_as_admin? %>
    <%= generate_countdown_html("pseud_icon_comment_text", ArchiveConfig.ICON_COMMENT_MAX) %>
  </dd>

  <% if policy(@pseud).can_edit? %>
    <dt><%= f.label :ticket_number, class: "required" %></dt>
    <dd>
      <%= f.text_field :ticket_number, class: "required" %>
    </dd>
  <% end %>

  <dt class="landmark"><%= t(".submit") %></dt>
  <dd class="submit actions"><%= f.submit button_text %></dd>
</dl>

<% end %>
