Browse Source

feat: update cya design lettings

pull/1696/head
natdeanlewissoftwire 3 years ago
parent
commit
cbea66760a
  1. 13
      app/models/form/lettings/questions/address_line1.rb
  2. 5
      app/models/form/lettings/questions/county.rb
  3. 5
      app/models/form/lettings/questions/postcode_for_full_address.rb
  4. 5
      app/models/form/lettings/questions/town_or_city.rb

13
app/models/form/lettings/questions/address_line1.rb

@ -6,7 +6,7 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
@header = "Address line 1" @header = "Address line 1"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Q12 - Address" @check_answer_label = "Q12 - Address lines 1 and 2"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end
@ -14,17 +14,6 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
[ [
log.address_line1, log.address_line1,
log.address_line2, log.address_line2,
log.postcode_full,
log.town_or_city,
log.county,
].select(&:present?).join("\n") ].select(&:present?).join("\n")
end end
def get_extra_check_answer_value(log)
return unless log.is_la_inferred?
la = LocalAuthority.find_by(code: log.la)&.name
la.presence
end
end end

5
app/models/form/lettings/questions/county.rb

@ -5,10 +5,7 @@ class Form::Lettings::Questions::County < ::Form::Question
@header = "County (optional)" @header = "County (optional)"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Q12 - County"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end
def hidden_in_check_answers?(_log = nil, _current_user = nil)
true
end
end end

5
app/models/form/lettings/questions/postcode_for_full_address.rb

@ -17,10 +17,7 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
}, },
} }
@plain_label = true @plain_label = true
@check_answer_label = "Q12 - Postcode"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end
def hidden_in_check_answers?(_log = nil, _current_user = nil)
true
end
end end

5
app/models/form/lettings/questions/town_or_city.rb

@ -5,10 +5,7 @@ class Form::Lettings::Questions::TownOrCity < ::Form::Question
@header = "Town or city" @header = "Town or city"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Q12 - Town or city"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end
def hidden_in_check_answers?(_log = nil, _current_user = nil)
true
end
end end

Loading…
Cancel
Save