6 changed files with 43 additions and 1 deletions
@ -0,0 +1,15 @@
|
||||
class Form::Sales::Pages::PrivacyNotice < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "privacy_notice" |
||||
@header = "Department for Levelling Up, Housing and Communities privacy notice" |
||||
@description = "Make sure that the buyer has seen the Department for Levelling Up, Housing and Communities (DLUHC) privacy notice before completing this log" |
||||
@subsection = subsection |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::PrivacyNotice.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
||||
@ -0,0 +1,17 @@
|
||||
class Form::Sales::Questions::PrivacyNotice < ::Form::Question |
||||
def initialize(id, hsh, page) |
||||
super |
||||
@id = "privacynotice" |
||||
@check_answer_label = "Buyer has seen the privacy notice?" |
||||
@header = "Declaration" |
||||
@guidance_partial = "test" |
||||
@type = "checkbox" |
||||
@hint_text = "" |
||||
@page = page |
||||
@answer_options = ANSWER_OPTIONS |
||||
end |
||||
|
||||
ANSWER_OPTIONS = { |
||||
"privacynotice" => { "value" => "The tenant has seen the DLUHC privacy notice" }, |
||||
}.freeze |
||||
end |
||||
@ -0,0 +1,7 @@
|
||||
class AddPrivacyNoticeToSalesLog < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_table :sales_logs, bulk: true do |t| |
||||
t.column :privacynotice, :int |
||||
end |
||||
end |
||||
end |
||||
Loading…
Reference in new issue