Allow editing candidates
This commit is contained in:
parent
62e70e3935
commit
a5a9e92e18
3 changed files with 40 additions and 0 deletions
13
views/candidates_edit.erb
Normal file
13
views/candidates_edit.erb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<h1 class="mb-5"><%= _("Edit candidate") %></h1>
|
||||
|
||||
<form action="/votes/<%= @vote.secure_id %>/candidates/<%= @candidate.id %>" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label"><%= _("Name") %></label>
|
||||
<input type="text" name="name" value="<%= @candidate.name %>" class="form-control">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="description" class="form-label"><%= _("Description") %></label>
|
||||
<textarea type="text" name="description" class="form-control"><%= @candidate.description %></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><%= _("Save") %></button>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue