* Added credits_awarded to /admin/badges forms * Award credits only if badge has them * Removed information about credits and listings in the new badge email when not needed * Specs for number of credits awarded for badges * Added missing newline * Fix typo Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> * Improve new_badge_email.text.erb Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> * Fixed number of credits in notification * Added specs for number of credits in notifications Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
31 lines
980 B
Text
31 lines
980 B
Text
<h2 class="crayons-title mb-6">Create badge</h2>
|
|
|
|
<div class="crayons-card p-6">
|
|
<%= form_for [:admin, @badge], method: :post do |form| %>
|
|
<div class="form-group">
|
|
<%= form.label :title %>
|
|
<%= form.text_field :title, class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :slug, "Slug:" %>
|
|
<%= form.text_field :slug, class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :description, "Description:" %>
|
|
<%= form.text_field :description, class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :badge_image, "Badge Image:" %>
|
|
<%= form.file_field :badge_image, class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :credits_awarded, "Credits awarded:" %>
|
|
<%= form.text_field :credits_awarded, class: "form-control" %>
|
|
</div>
|
|
<%= submit_tag "Create Badge", class: "btn btn-primary" %>
|
|
<% end %>
|
|
</div>
|