<div class="box wide">
  <h1><%= @origin.identifier %></h1>

  <% if @origin.banned_at %>
    <label class="required">Status:</label>
    <span class="d">
      Banned
    </span>
    <br>

    <label class="required">Banned Reason:</label>
    <span class="d">
      <%= @origin.banned_reason %>
    </span>
    <br>

    <label class="required">Banned At:</label>
    <span class="d">
      <%= @origin.banned_at %>
    </span>
    <br>

    <label class="required">Banned by User:</label>
    <span class="d">
      <%= @origin.banned_by_user.username %>
    </span>
  <% end %>

  <%= form_with model: @origin do |f| %>
    <%= hidden_field_tag :new_origin, @origin.new_record? %>

    <div class="boxline">
      <%= f.label :banned_reason, "#{caption_of_button(@origin)} Reason:", class: 'required' %>
      <%= f.text_field :banned_reason, value: '' %>
    </div>

    <div class="boxline">
        <%= f.submit caption_of_button(@origin), class: 'deletion' %>
    </div>
  <% end %>
</div>
