22 lines
960 B
Text
22 lines
960 B
Text
<h1 class="mb-5"><%= _("Edit vote description") %></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/<%= @vote.secure_id %>/edit" method="post">
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label"><%= _("Title") %></label>
|
|
<input type="text" name="title" value="<%= params[: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"><%= params[:description] %></textarea>
|
|
<small class="form-text text-muted"><%= _("You can use <a href=\"https://www.markdownguide.org/basic-syntax/\">Markdown</a>.") %></small>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><%= _("Save") %></button>
|
|
</form>
|