<%= "Edit badge #{@badge.id}" %>

<%= link_to "Back to All Badges", admin_badges_path, class: "c-link c-link--block" %>
<%= form_for [:admin, @badge], method: :patch do |form| %>
<%= form.label :title, "Title", class: "crayons-field__label" %>

Badge's link is auto-generated based on the title: <%= link_to @badge.path, @badge.path %>

<%= form.text_field :title, class: "crayons-textfield" %>
<%= form.label :description, "Description", class: "crayons-field__label" %> <%= form.text_field :description, class: "crayons-textfield" %>
<%= form.label :badge_image, "Badge image", class: "crayons-field__label" %> <% if @badge.badge_image %> badge image <% end %> <%= form.file_field :badge_image %>
<%= form.label :credits_awarded, "Credits awarded:", class: "crayons-field__label" %> <%= form.text_field :credits_awarded, class: "crayons-textfield" %>
<%= form.check_box :allow_multiple_awards, class: "crayons-checkbox" %> <%= form.label :allow_multiple_awards, class: "crayons-field__label" do %> Allow multiple awards

Allows this badge to be awarded multiple times to the same user

<% end %>
<%= submit_tag "Update badge", class: "c-btn c-btn--primary" %>
<% end %>