You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
976 B

10 months ago
  1. <%= form_with(model: score, class: "contents") do |form| %>
  2. <% if score.errors.any? %>
  3. <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
  4. <h2><%= pluralize(score.errors.count, "error") %> prohibited this score from being saved:</h2>
  5. <ul>
  6. <% score.errors.each do |error| %>
  7. <li><%= error.full_message %></li>
  8. <% end %>
  9. </ul>
  10. </div>
  11. <% end %>
  12. <div class="my-5">
  13. <%= form.label :name %>
  14. <%= form.text_field :name, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
  15. </div>
  16. <div class="my-5">
  17. <%= form.label :grade %>
  18. <%= form.number_field :grade, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
  19. </div>
  20. <div class="inline">
  21. <%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
  22. </div>
  23. <% end %>