123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <%= form_with(model: character, local: true) do |form| %>
- <% if character.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(character.errors.count, "error") %> prohibited this character from being saved:</h2>
- <ul>
- <% character.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <table class="table table-light table-striped table-padded">
- <thead>
- <tr>
- <div class="field">
- <td><%= form.label :avatar %></td>
- <td><%= form.file_field :avatar %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :name %></td>
- <td class="text-right"><%= form.text_field :name %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :health %></td>
- <td class="text-right"><%= form.number_field :health %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :strength %></td>
- <td class="text-right"><%= form.number_field :strength %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :intelligence %></td>
- <td class="text-right"><%= form.number_field :intelligence %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :agility %></td>
- <td class="text-right"><%= form.number_field :agility %></td>
- </div>
- </tr>
- <tr>
- <div class="field">
- <td><%= form.label :luck %></td>
- <td class="text-right"><%= form.number_field :luck %></td>
- </div>
- </tr>
- <tr>
- <div class="actions">
- <td></td>
- <td><%= form.submit "Add Character to Party" %></td>
- <td></td>
- </div>
- </tr>
- </table>
- <% end %>
|