Sha256: 4e56c8df71a35b0f2bd1fd0a2ca326cfb945b8b1f7f15361a5be3a7efd3d1b68

Contents?: true

Size: 801 Bytes

Versions: 4

Compression:

Stored size: 801 Bytes

Contents

<% choice = answer.choices.first if answer %>

<% question.answer_options.each_with_index do |answer_option, idx| %>
  <% choice_id = "#{field_id}_choices_#{idx}" %>

  <%= label_tag "#{choice_id}_body" do %>
    <%= radio_button_tag "answer[choices][#{question.id}][body]",
                         translated_attribute(answer_option.body),
                         answer_option.id == choice.try(:decidim_answer_option_id),
                         id: "#{choice_id}_body", disabled: disabled %>

    <%= translated_attribute(answer_option.body) %>

    <%= hidden_field_tag "answer[choices][#{question.id}][answer_option_id]",
                         answer_option.id,
                         id: "#{choice_id}_answer_option",
                         disabled: disabled %>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-meetings-0.27.9 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.27.8 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.27.7 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.27.6 app/views/decidim/meetings/polls/answers/_single_option.html.erb