Sha256: 532cc2fa8d6c2ab5b71a2a1141d9a91c5972a071d222d5fe616e7c3b266be9b7

Contents?: true

Size: 860 Bytes

Versions: 9

Compression:

Stored size: 860 Bytes

Contents

.checkbox_group.form-group{ class: "#{'has-error' if errors[question.code]}" }
  %label
    != question.question_text
    = ' *' if question.required
  = 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,
                                                       class:   'form-control'
          = sub_question.text
  - if errors[question.code]
    .help-block.text-danger= errors[question.code]

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
helena-1.3.1 app/views/helena/questions/_checkbox_group.html.haml
helena-1.3.0 app/views/helena/questions/_checkbox_group.html.haml
helena-1.1.0 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.3 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.2 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.1 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.0.rc4 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.0.rc3 app/views/helena/questions/_checkbox_group.html.haml
helena-1.0.0.rc2 app/views/helena/questions/_checkbox_group.html.haml