Sha256: 438cdd9327abf8da0e7357f628c029967e9e4f0435017c8cf616005ff0b1562b

Contents?: true

Size: 783 Bytes

Versions: 5

Compression:

Stored size: 783 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: %>

    <%= translated_attribute(answer_option.body) %>

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-meetings-0.28.4 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.28.3 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.28.2 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.28.1 app/views/decidim/meetings/polls/answers/_single_option.html.erb
decidim-meetings-0.28.0 app/views/decidim/meetings/polls/answers/_single_option.html.erb