h1
  ' Aliasing tag
  = @tag.name

= form_for @changeset, ~p"/tags/#{@tag}/alias", [method: "put"], fn f ->
  = if @changeset.action do
    .alert.alert-danger
      p Oops, something went wrong! Please check the errors below.

  .field
    => label f, "Alias target:"
    = text_input f, :target_tag, value: alias_target(@tag), class: "input"
    = error_tag f, :tag
    = error_tag f, :aliased_tag

  .field
    => submit "Alias tag", class: "button"

br
= button_to "Remove tag alias", ~p"/tags/#{@tag}/alias", method: "delete", class: "button", data: [confirm: "Are you really, really sure?", disable_with: raw("Saving&hellip;")]

br
= link "Back", to: ~p"/tags/#{@tag}"
