Put multiple actions on the same line

This commit is contained in:
ricola 2025-12-04 17:17:12 -06:00
parent cc6a684bc6
commit 243d27781d

View file

@ -24,7 +24,8 @@
<div class="card-body">
<h3 class="mb-3"><%= candidate.name %></h3>
<%= markdown(candidate.description) %>
<form action="/votes/<%= @vote.secure_id %>/candidates/<%= candidate.id %>" method="get" class="mb-3">
<div class="d-flex">
<form action="/votes/<%= @vote.secure_id %>/candidates/<%= candidate.id %>" method="get" class="me-3">
<button type="submit" class="btn btn-outline-primary"><%= _("Edit") %></button>
</form>
<form action="/votes/<%= @vote.secure_id %>/candidates/<%= candidate.id %>/delete" method="post">
@ -32,6 +33,7 @@
</form>
</div>
</div>
</div>
<% end %>
<div class="card mb-4">
@ -65,20 +67,24 @@
</div>
</div>
<form action="/votes/<%= @vote.secure_id %>/open" method="get" class="mb-3">
<% if @vote.candidates.length < 2 %>
<% if @vote.candidates.length < 2 %>
<p class="alert alert-warning mb-4"><%= _("Add at least 2 candidates before opening the vote to participants.") %></p>
<% end %>
<div class="d-flex">
<form action="/votes/<%= @vote.secure_id %>/open" method="get" class="me-3">
<% if @vote.candidates.length < 2 %>
<fieldset disabled="">
<% end %>
<button type="submit" class="btn btn-primary"><%= _("Open vote to participants") %></button>
<% if @vote.candidates.length < 2 %>
</fieldset>
<% end %>
</form>
<form action="/votes/<%= @vote.secure_id %>/delete" method="post" class="mb-5">
</form>
<form action="/votes/<%= @vote.secure_id %>/delete" method="post" class="mb-5">
<button type="submit" class="btn btn-outline-danger"><%= _("Delete vote") %></button>
</form>
</form>
</div>
<h2 class="mb-4"><%= _("Organizers") %></h2>