1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-15 20:46:57 +00:00

Allow nil when modifiying match wrestlers, allow nil when stating a match, fixed tournament navbar on wrestler edit, fixed tournament navbar on edit match wrestlers

This commit is contained in:
2022-01-24 21:54:50 +00:00
parent 7220ffe3c6
commit 58d088907a
7 changed files with 52 additions and 23 deletions

View File

@@ -2,12 +2,12 @@
<%= form_for(@match) do |f| %>
<div class="field">
<%= f.label "Wrestler 1" %><br>
<%= f.collection_select :w1, @wrestlers, :id, :name %>
<%= f.collection_select :w1, @wrestlers, :id, :name, include_blank: true %>
</div>
<div>vs</div>
<div class="field">
<%= f.label "Wrestler 2" %><br>
<%= f.collection_select :w2, @wrestlers, :id, :name %>
<%= f.collection_select :w2, @wrestlers, :id, :name, include_blank: true %>
</div>
<div class="actions">
<%= f.submit onclick: "return confirm('Is the name of the winner ' + document.getElementById('match_winner_id').options[document.getElementById('match_winner_id').selectedIndex].text + '?')", :class=>"btn btn-success" %>