Sha256: 2ee323aa899fcc168d277050781224dafa95d83cc6d1b21029e69c839b5fc5bd
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
.radio_matrix.form-group{ class: "#{'has-error' if errors.present?}" } %label{class: "#{'text-danger' if errors.present?}"} = question.question_text = ' *' if question.required .table-responsive %table.table %thead %tr %th - question.labels.each do |label| %th{ width: "#{80 / question.labels.count}%" } = label.text %tbody - question.sub_questions.each do |sub_question| %tr %td = sub_question.text - if errors[sub_question.code] .help-block.text-danger= errors[sub_question.code] - question.labels.each do |label| - checked = answers[sub_question.code].to_s == label.value.to_s if answers[sub_question.code].present? - checked ||= (label.preselected? ? true : false) %td{ width: "#{80 / question.labels.count}%" } %label = form.simple_fields_for :answers do |answer_form| = answer_form.radio_button sub_question.code, label.value, checked: checked %span.hide-text= label.text
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
helena-1.0.0.rc1 | app/views/helena/questions/_radio_matrix.html.haml |
helena-0.3.3 | app/views/helena/questions/_radio_matrix.html.haml |