Files
nairobi/app/views/polls/questions/_new_answer.html.erb
Javi Martín 06be5e132f Fix label in form to add own answer
The label text was always in English, and it wasn't associated with any
input field.

The `SecureRandom` part is a quick hack so we don't get duplicate IDs.
Using "your_answer_#{question.id}" might work as well, but right now I'm
not sure if the form is sometimes rendered twice for the same question.
2019-08-27 17:22:22 +02:00

7 lines
378 B
Plaintext

<%= form_tag(create_answer_question_path(question, token: token), method: :post, remote: true) do %>
<% id = "your_answer_#{SecureRandom.hex}" %>
<%= label_tag :answer, t("poll_questions.show.your_answer"), for: id %>
<%= text_field_tag :answer, nil, class: "medium-10", id: id %>
<%= submit_tag t("poll_questions.show.add_answer"), class: "button success" %>
<% end %>