Sha256: 9fd887a440c38ca5435983b530b2800b90e3312aa0d113bd625ab9f623cf5e36

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

<div id="<%= dom_id(yes_no) %>" class="choice_field" style="white-space: nowrap;">
  <% css_class = "#{yes_no.css_class} " -%>
  <% yes_no.choices.each_with_index do |choice, num| -%>
    <% dom_id = dom_id(yes_no) + "_" + pretty_tag(choice[1]) 
       css_class += yes_no.validation_class(@answer_sheet) if num == 0
       checked = yes_no.has_answer?(choice[1],@answer_sheet) -%>
    <div class="field field_check yesno">
      <%= radio_button_tag "answers[#{yes_no.id}]", choice[1], checked, 
            :id => dom_id, 
            :class => css_class,
            :disabled => @answer_sheet.frozen?&&!@presenter.try(:reference?),
            :readonly => @answer_sheet.frozen?&&!@presenter.try(:reference?) %>
      <label class="choice horiz" for="<%= dom_id %>"><%= choice[0] %></label>
    </div>
  <% end -%>
  <div class="clear"></div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fe-1.0.0 app/views/fe/questions/fe/_yes_no_field.erb