Browse Source
* update copy to handle pluralisation in the case of joint purchase for previous ownership, with associated testing changes * update copy to handle pluralisation in the case of joint purchase for staircasing, with associated testing changes * update copy to handle pluralisation in the case of joint purchase for buyer previous, with associated testing changes * make minor linting changes and update the evil test about number of pages * potential variation on how to achieve pluralisation * use built in rails methods of pluralising copypull/1393/head
Arthur Campbell
2 years ago
committed by
GitHub
17 changed files with 177 additions and 59 deletions
@ -1,12 +1,13 @@ |
|||||||
class Form::Sales::Pages::BuyerPrevious < ::Form::Page |
class Form::Sales::Pages::BuyerPrevious < ::Form::Page |
||||||
def initialize(id, hsh, subsection) |
def initialize(id, hsh, subsection, joint_purchase:) |
||||||
super |
super(id, hsh, subsection) |
||||||
@id = "buyer_previous" |
@joint_purchase = joint_purchase |
||||||
|
@depends_on = [{ "joint_purchase?" => joint_purchase }] |
||||||
end |
end |
||||||
|
|
||||||
def questions |
def questions |
||||||
@questions ||= [ |
@questions ||= [ |
||||||
Form::Sales::Questions::BuyerPrevious.new(nil, nil, self), |
Form::Sales::Questions::BuyerPrevious.new(nil, nil, self, joint_purchase: @joint_purchase), |
||||||
] |
] |
||||||
end |
end |
||||||
end |
end |
||||||
|
@ -1,12 +1,13 @@ |
|||||||
class Form::Sales::Pages::PreviousOwnership < ::Form::Page |
class Form::Sales::Pages::PreviousOwnership < ::Form::Page |
||||||
def initialize(id, hsh, subsection) |
def initialize(id, hsh, subsection, joint_purchase:) |
||||||
super |
super(id, hsh, subsection) |
||||||
@id = "previous_ownership" |
@joint_purchase = joint_purchase |
||||||
|
@depends_on = [{ "joint_purchase?" => @joint_purchase }] |
||||||
end |
end |
||||||
|
|
||||||
def questions |
def questions |
||||||
@questions ||= [ |
@questions ||= [ |
||||||
Form::Sales::Questions::Prevown.new(nil, nil, self), |
Form::Sales::Questions::Prevown.new(nil, nil, self, joint_purchase: @joint_purchase), |
||||||
] |
] |
||||||
end |
end |
||||||
end |
end |
||||||
|
Loading…
Reference in new issue