Browse Source

Don't count read-only questions for section status

pull/199/head
baarkerlounger 4 years ago
parent
commit
a72cc841ba
  1. 2
      app/models/form/subsection.rb
  2. 3
      spec/fixtures/forms/2021_2022.json

2
app/models/form/subsection.rb

@ -64,6 +64,6 @@ class Form::Subsection
end end
def displayed_to_user?(case_log, question) def displayed_to_user?(case_log, question)
question.page.routed_to?(case_log) && question.enabled?(case_log) question.page.routed_to?(case_log) && question.enabled?(case_log) && !question.read_only?
end end
end end

3
spec/fixtures/forms/2021_2022.json vendored

@ -537,7 +537,8 @@
"min": 0, "min": 0,
"step": 1, "step": 1,
"width": 4, "width": 4,
"readonly": true "readonly": true,
"requires_js": true
} }
} }
} }

Loading…
Cancel
Save