Sha256: ef961a055a44d70e5798901fb915fcfcc61f1d8471aeb6938700f7eed8d018ed

Contents?: true

Size: 736 Bytes

Versions: 4

Compression:

Stored size: 736 Bytes

Contents

fieldset.checkbox_group class="#{'helena-error' if errors[question.code]}"
  legend= question_label(question, dummy: true)

  = form.simple_fields_for :answers do |answer_form|
    - question.sub_questions.each do |sub_question|
      .checkbox
        label
          - checked = (answers[sub_question.code].to_s == sub_question.value.to_s) if sub_question.value
          - checked ||= sub_question.preselected
          = answer_form.input_field sub_question.code, as:      :boolean,
                                                       value:   sub_question.value,
                                                       checked: checked
          = sub_question.text
  - if errors[question.code]
    .error= errors[question.code]

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
helena-2.1.0 app/views/helena/questions/_checkbox_group.html.slim
helena-2.0.2 app/views/helena/questions/_checkbox_group.html.slim
helena-2.0.1 app/views/helena/questions/_checkbox_group.html.slim
helena-2.0.0 app/views/helena/questions/_checkbox_group.html.slim