Files
grecia/app/views/legislation/questions/_answer_form.html.erb
2016-12-28 16:21:58 +01:00

13 lines
769 B
Plaintext

<% if question.question_options.any? %>
<%= form_for answer, url: legislation_process_question_answers_path(process, question, answer), remote: true , html: { class: "controls-stacked participation-allowed"} do |f| %>
<% question.question_options.each do |question_option| %>
<label class="control radio <%= 'active' if @answer.legislation_question_option_id == question_option.id %>">
<%= f.radio_button :legislation_question_option_id, question_option.id, label: false, disabled: answer.persisted? %>
<span class="control-indicator"></span>
<%= question_option.value %>
</label>
<% end %>
<%= f.submit t('legislation.questions.show.answer_question'), class: "button" unless answer.persisted? %>
<% end %>
<% end %>