vedia/views/votes_new.erb
2025-12-04 01:47:17 +01:00

21 lines
735 B
Text

<h1 class="mb-5"><%= _("New vote") %></h1>
<% if @errors %>
<% @errors.each do |error| %>
<% if error.attribute == :title and error.type == :blank %>
<p class="alert alert-warning mb-4"><%= _("Enter a title.") %></p>
<% end %>
<% end %>
<% end %>
<form action="/votes/new" method="post">
<div class="mb-3">
<label for="title" class="form-label"><%= _("Title") %></label>
<input type="text" name="title" class="form-control">
</div>
<div class="mb-3">
<label for="description" class="form-label"><%= _("Description") %></label>
<textarea type="text" name="description" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-primary"><%= _("Create new vote") %></button>
</form>