|
|
|
@ -1,5 +1,6 @@ |
|
|
|
class Form::Question |
|
|
|
class Form::Question |
|
|
|
include FormattingHelper |
|
|
|
include FormattingHelper |
|
|
|
|
|
|
|
include CollectionTimeHelper |
|
|
|
|
|
|
|
|
|
|
|
attr_accessor :id, :description, :questions, :disable_clearing_if_not_routed_or_dynamic_answer_options, |
|
|
|
attr_accessor :id, :description, :questions, :disable_clearing_if_not_routed_or_dynamic_answer_options, |
|
|
|
:type, :min, :max, :step, :width, :fields_to_add, :result_field, |
|
|
|
:type, :min, :max, :step, :width, :fields_to_add, :result_field, |
|
|
|
@ -299,6 +300,12 @@ class Form::Question |
|
|
|
answer_options.keys.reject { |x| x.match(/divider/) } |
|
|
|
answer_options.keys.reject { |x| x.match(/divider/) } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def example_date_formatted(log) |
|
|
|
|
|
|
|
if type == "date" |
|
|
|
|
|
|
|
date_mid_collection_year_formatted(log.startdate) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
def selected_answer_option_is_derived?(log) |
|
|
|
def selected_answer_option_is_derived?(log) |
|
|
|
|